-
Notifications
You must be signed in to change notification settings - Fork 867
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
Add missing InstrumenterBuilder.addRequestListener() #5655
Changes from all commits
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 |
---|---|---|
|
@@ -232,10 +232,11 @@ public void end( | |
|
||
if (!requestListeners.isEmpty() || !requestMetricListeners.isEmpty()) { | ||
long endNanos = getNanos(endTime); | ||
for (RequestListener requestListener : requestListeners) { | ||
// TODO (trask) call end in the reverse order that start was called? | ||
for (RequestListener requestListener : requestMetricListeners) { | ||
requestListener.end(context, attributes, endNanos); | ||
} | ||
for (RequestListener requestListener : requestMetricListeners) { | ||
for (RequestListener requestListener : requestListeners) { | ||
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. Nit: do we actually need two lists of listeners? Can't we merge 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. I'll send that in a separate PR b/c it moves the requestListeners to after the span is started (which I think is ok, but I'd like to get eyes specifically on that change) |
||
requestListener.end(context, attributes, endNanos); | ||
} | ||
} | ||
|
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.
We probably don't have to do that - unlike
start()
, theend()
method cannot modify the context; also, we're passing the timestamp as an argument, so the exact time of invocation should not matter too.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.
ya, I just always think of start/end pairs telescoping :)