diff --git a/src/main/kotlin/io/emeraldpay/dshackle/config/spans/ProviderSpanHandler.kt b/src/main/kotlin/io/emeraldpay/dshackle/config/spans/ProviderSpanHandler.kt index c52157e4..6189e0cd 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/config/spans/ProviderSpanHandler.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/config/spans/ProviderSpanHandler.kt @@ -23,7 +23,7 @@ class ProviderSpanHandler( .build>() override fun end(context: TraceContext, span: MutableSpan, cause: Cause): Boolean { - if (span.traceId().length > 20) { + if (span.traceId().length > 20 && cause == Cause.FINISHED) { val key = span.parentId() ?: span.id() val spanList = spans.asMap().computeIfAbsent(key) { mutableListOf() } spanList.add(span)