Skip to content

Commit

Permalink
CHeck if currentSpan is not null
Browse files Browse the repository at this point in the history
  • Loading branch information
Кирилл committed Dec 20, 2023
1 parent f808500 commit 71e96a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/kotlin/io/emeraldpay/dshackle/rpc/BlockchainRpc.kt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ class BlockchainRpc(
}.doOnError {
failMetric.increment()
}.doFinally {
providerSpanHandler?.sendSpans(tracer.currentSpan().context())
if (tracer.currentSpan() != null) {
providerSpanHandler?.sendSpans(tracer.currentSpan().context())
}
}
}

Expand Down

0 comments on commit 71e96a1

Please sign in to comment.