We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e541864 commit fc8d09bCopy full SHA for fc8d09b
1 file changed
dd-java-agent/instrumentation/pekko-http-1.0/src/baseTest/scala/PekkoHttpTestWebServer.scala
@@ -136,7 +136,11 @@ object PekkoHttpTestWebServer {
136
private val exceptionHandler = ExceptionHandler {
137
case e: Exception =>
138
val span = activeSpan()
139
- TraceUtils.handleException(span, e)
+ if (span != null) {
140
+ // The exception handler is bypassing the normal instrumentation flow, so we need to handle things here
141
+ TraceUtils.handleException(span, e)
142
+ span.finish()
143
+ }
144
complete(
145
HttpResponse(status = EXCEPTION.getStatus, entity = e.getMessage)
146
)
0 commit comments