Skip to content

Commit 50612d7

Browse files
committed
Added more logs
1 parent bf7ae0c commit 50612d7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

dd-java-agent/instrumentation/spark/src/main/java/datadog/trace/instrumentation/spark/AbstractDatadogSparkListener.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,12 +1201,11 @@ private static void reportKafkaOffsets(
12011201

12021202
while (allPartitions.hasNext()) {
12031203
String partition = allPartitions.next();
1204-
String value = topicNode.get(partition).textValue();
1204+
Long value = topicNode.get(partition).asLong();
12051205
sortedTags.put(PARTITION_TAG, partition);
1206-
System.out.println("==== found partition '" + partition + "' ====");
1207-
AgentTracer.get()
1208-
.getDataStreamsMonitoring()
1209-
.trackBacklog(sortedTags, Long.parseLong(value));
1206+
System.out.println(
1207+
"==== found partition '" + partition + "', value '" + value.toString() + "' ====");
1208+
AgentTracer.get().getDataStreamsMonitoring().trackBacklog(sortedTags, value);
12101209

12111210
// for debug only, will be removed
12121211
span.setTag("dsm." + topic + "." + partition, value);

0 commit comments

Comments
 (0)