-
Notifications
You must be signed in to change notification settings - Fork 879
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
Refactor HTTP attributes extractors to use composition over inheritance #5267
Refactor HTTP attributes extractors to use composition over inheritance #5267
Conversation
@@ -64,24 +67,51 @@ public RatpackTracingBuilder addClientAttributeExtractor( | |||
* | |||
* @param capturedHttpHeaders An instance of {@link CapturedHttpHeaders} containing the configured | |||
* HTTP request and response names. | |||
* @deprecated Use {@link #captureHttpServerHeaders(CapturedHttpHeaders)} instead. |
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.
👍
.../io/opentelemetry/javaagent/instrumentation/googlehttpclient/GoogleHttpClientSingletons.java
Outdated
Show resolved
Hide resolved
.../opentelemetry/javaagent/instrumentation/asynchttpclient/v2_0/AsyncHttpClientSingletons.java
Outdated
Show resolved
Hide resolved
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.
Thanks! This really does feel considerably cleaner to me. I called out a few consistency issues, but really looks good overall.
.../opentelemetry/javaagent/instrumentation/asynchttpclient/v2_0/AsyncHttpClientSingletons.java
Outdated
Show resolved
Hide resolved
.../java/io/opentelemetry/javaagent/instrumentation/jaxrsclient/v1_1/JaxRsClientSingletons.java
Outdated
Show resolved
Hide resolved
.../java/io/opentelemetry/javaagent/instrumentation/jaxrsclient/v2_0/JaxRsClientSingletons.java
Outdated
Show resolved
Hide resolved
...va/io/opentelemetry/javaagent/instrumentation/jaxrsclient/v2_0/ResteasyClientSingletons.java
Outdated
Show resolved
Hide resolved
...telemetry/instrumentation/jetty/httpclient/v9_2/internal/JettyClientInstrumenterBuilder.java
Outdated
Show resolved
Hide resolved
I agree, I thought it was clearer having the multiple extractors built on top of the getter compared to built on top of another extractor |
…ce (open-telemetry#5267) * Refactor HTTP attributes extractors to use composition over inheritance * Rename remaining variables: *Extractor to *Getter
I realized that it's probably better to do that before starting the
http.route
refactorings.HTTP client & server attributes extractors have share a common base class, so it was hard to split them into 2 PRs - that's why this one is so large. Still, ~90% of it is just renaming stuff in instrumentations.