Skip to content

Commit 93aa163

Browse files
committed
suggestion
1 parent e6fc70b commit 93aa163

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

dd-trace-core/src/main/java/datadog/trace/common/metrics/ConflatingMetricsAggregator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,8 @@ public boolean publish(List<? extends CoreSpan<?>> trace) {
293293

294294
private boolean shouldComputeMetric(CoreSpan<?> span) {
295295
return (span.isMeasured() || span.isTopLevel() || spanKindEligible(span))
296-
&& span.getLongRunningVersion() <= 0 // either not long-running or unpublished long-running span
296+
&& span.getLongRunningVersion()
297+
<= 0 // either not long-running or unpublished long-running span
297298
&& span.getDurationNano() > 0;
298299
}
299300

dd-trace-core/src/test/groovy/datadog/trace/common/metrics/ConflatingMetricAggregatorTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ class ConflatingMetricAggregatorTest extends DDSpecification {
833833
when:
834834
CountDownLatch latch = new CountDownLatch(1)
835835
aggregator.publish([
836-
new SimpleSpan("service", "operation", "resource", "type", true, true, false, 0, 100, HTTP_OK, true, 1),
836+
new SimpleSpan("service", "operation", "resource", "type", true, true, false, 0, 100, HTTP_OK, true, 12345),
837837
new SimpleSpan("service", "operation", "resource", "type", true, true, false, 0, 100, HTTP_OK, true, 0)
838838
])
839839
aggregator.report()

0 commit comments

Comments
 (0)