Skip to content

Commit

Permalink
Fix recording exceptions on server spans
Browse files Browse the repository at this point in the history
  • Loading branch information
vinay-kosaraju committed May 4, 2024
1 parent 740a6fc commit 0c765c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ public void filter(ContainerRequestContext request, ContainerResponseContext res
span.setAttribute(SemanticAttributes.HTTP_RESPONSE_BODY_SIZE, response.getLength());
}
}
span.end();
}

private static String normalizePath(String path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha
if (request.getAttribute(TracingFilter.REQUEST_SCOPE) instanceof Scope scope) {
scope.close();
}
if (request.getAttribute(TracingFilter.REQUEST_SPAN) instanceof Span span) {
span.end();
}
}
}
}

0 comments on commit 0c765c2

Please sign in to comment.