Skip to content

Commit b203263

Browse files
committed
Cast to Number type instead of Long
1 parent f313fa1 commit b203263

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public void addTaskMetrics(
157157
try {
158158
// As of spark 3.5, all SQL metrics are Long, safeguard if it changes in new
159159
// versions
160-
hist.accept((Long) acc.value());
160+
hist.accept(((Number) acc.value()).doubleValue());
161161
externalAccumulableHistograms.put(acc.id(), hist);
162162
} catch (ClassCastException ignored) {
163163
}

0 commit comments

Comments
 (0)