-
Notifications
You must be signed in to change notification settings - Fork 893
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 url from HttpServerAttributesExtractor #4209
Remove url from HttpServerAttributesExtractor #4209
Conversation
if (publicAddress == null) { | ||
return null; | ||
} | ||
return publicAddress.builder().build().getScheme(); |
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.
Can we use
return publicAddress.builder().build().getScheme(); | |
return publicAddress.get().getScheme(); |
instead of building another copy?
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.
oh that's much better(!)
…p-server-attributes-extractor
@@ -120,7 +115,6 @@ void normal() { | |||
assertThat(attributes.build()) | |||
.containsOnly( | |||
entry(SemanticAttributes.HTTP_METHOD, "POST"), | |||
entry(SemanticAttributes.HTTP_URL, "http://github.com"), | |||
entry(SemanticAttributes.HTTP_TARGET, "github.com"), |
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.
I suspect I fudged - this test case should probably be changed to something that looks more normal, e.g. /repositories/1
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.
fixed 😄
@Nullable | ||
protected String host(Request request) { | ||
return null; | ||
URI uri = publicAddress.get(); |
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.
Private method to get the public address (the simplification I was hoping for with my TODO didn't materialize...
docs/semantic-conventions.md
Outdated
**[1]:** Most server instrumentation captures `http.scheme`, `http.host`, and `http.target` | ||
(and does not capture `http.url`). |
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.
**[1]:** Most server instrumentation captures `http.scheme`, `http.host`, and `http.target` | |
(and does not capture `http.url`). | |
**[1]:** Most server instrumentations capture `http.scheme`, `http.host`, and `http.target` | |
(and do not capture `http.url`). |
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.
I went back and forth on this 😂
…p-server-attributes-extractor
…p-server-attributes-extractor
follow-up to #4195
resolves #3700
resolves #3699