-
Notifications
You must be signed in to change notification settings - Fork 909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Span.recordException for logging throwable #813
Changes from 2 commits
b5ba3af
2059831
bb53d51
1da01ba
90c20e9
fcf849d
a154bc6
d8a96cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,12 +95,10 @@ class DropwizardTest extends HttpServerTest<DropwizardTestSupport> { | |
operationName "${this.testResource().simpleName}.${endpoint.name().toLowerCase()}" | ||
spanKind INTERNAL | ||
errored endpoint == EXCEPTION | ||
childOf((SpanData) parent) | ||
attributes { | ||
if (endpoint == EXCEPTION) { | ||
errorAttributes(Exception, EXCEPTION.body) | ||
} | ||
if (endpoint == EXCEPTION) { | ||
errorEvent(Exception, EXCEPTION.body) | ||
} | ||
childOf((SpanData) parent) | ||
} | ||
} | ||
|
||
|
@@ -126,11 +124,6 @@ class DropwizardTest extends HttpServerTest<DropwizardTestSupport> { | |
"${SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH.key()}" { it == responseContentLength || /* async */ it == null } | ||
"servlet.context" "" | ||
"servlet.path" "" | ||
if (endpoint.errored) { | ||
"error.msg" { it == null || it == EXCEPTION.body } | ||
"error.type" { it == null || it == Exception.name } | ||
"error.stack" { it == null || it instanceof String } | ||
} | ||
Comment on lines
-129
to
-133
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no replacement for this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't think so - the exception is recorded in the handler span so isn't on this one. Not sure if this is an issue with the instrumentation or expected though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, makes sense, i think this is expected |
||
if (endpoint.query) { | ||
"$MoreAttributes.HTTP_QUERY" endpoint.query | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉