-
Notifications
You must be signed in to change notification settings - Fork 860
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
Remove Attributes combination from onEnd #11959
base: main
Are you sure you want to change the base?
Changes from all commits
41b9c6e
c07bfaa
4b8311a
5e04034
dcb4798
7cf6900
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 |
---|---|---|
|
@@ -76,13 +76,6 @@ public static <REQUEST, RESPONSE> HttpServerAttributesExtractorBuilder<REQUEST, | |
@Override | ||
public void onStart(AttributesBuilder attributes, Context parentContext, REQUEST request) { | ||
super.onStart(attributes, parentContext, request); | ||
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. Only the attributes that are added at the start will be available for sampling. Moving all the attributes to the 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. So I need to figure out which attributes impact sampling, and those attributes are the minimum set need to retain, right? According to semantic-conventions(e.g. http-spans), I'd like to extract the unique attributes of span at the start without needing to pass them on. The common attributes attributes should be extracted at the end. |
||
|
||
internalUrlExtractor.onStart(attributes, request); | ||
internalServerExtractor.onStart(attributes, request); | ||
internalClientExtractor.onStart(attributes, request); | ||
|
||
internalSet(attributes, HttpAttributes.HTTP_ROUTE, getter.getHttpRoute(request)); | ||
internalSet(attributes, UserAgentAttributes.USER_AGENT_ORIGINAL, userAgent(request)); | ||
} | ||
|
||
@Override | ||
|
@@ -94,7 +87,13 @@ public void onEnd( | |
@Nullable Throwable error) { | ||
|
||
super.onEnd(attributes, context, request, response, error); | ||
internalSet(attributes, UserAgentAttributes.USER_AGENT_ORIGINAL, userAgent(request)); | ||
|
||
internalUrlExtractor.onEnd(attributes, request); | ||
internalServerExtractor.onEnd(attributes, request); | ||
internalClientExtractor.onEnd(attributes, request); | ||
|
||
internalSet(attributes, HttpAttributes.HTTP_ROUTE, getter.getHttpRoute(request)); | ||
internalNetworkExtractor.onEnd(attributes, request, response); | ||
|
||
internalSet(attributes, HttpAttributes.HTTP_ROUTE, httpRouteGetter.apply(context)); | ||
|
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.
The modification here is useless.