Skip to content

Commit c835f93

Browse files
committed
Properly handle objectClass attribute
1 parent 8a9a667 commit c835f93

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

dd-java-agent/agent-profiling/profiling-otel/src/main/java/com/datadog/profiling/otel/JfrToOtlpConverter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public JfrToOtlpConverter setIncludeOriginalPayload(boolean include) {
171171
* @throws IOException if reading JFR data fails
172172
*/
173173
public JfrToOtlpConverter addRecording(RecordingData recordingData) throws IOException {
174-
Path file = recordingData.getFile();
174+
Path file = recordingData.getPath();
175175
if (file != null) {
176176
return addFile(file, recordingData.getStart(), recordingData.getEnd());
177177
}
@@ -416,7 +416,7 @@ private void handleObjectSample(ObjectSample event, Control ctl) {
416416
int sampleTypeIndex = getSampleTypeAttributeIndex("alloc");
417417
String className = null;
418418
try {
419-
className = event.objectClass();
419+
className = event.objectClass().name();
420420
} catch (Exception ignored) {
421421
// objectClass field doesn't exist in this JFR event - skip it
422422
}

dd-java-agent/agent-profiling/profiling-otel/src/main/java/com/datadog/profiling/otel/jfr/ObjectSample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public interface ObjectSample {
2121
long allocationSize();
2222

2323
@JfrField("objectClass")
24-
String objectClass();
24+
JfrClass objectClass();
2525

2626
@JfrField("size")
2727
long size();

0 commit comments

Comments
 (0)