Skip to content
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

Merged
merged 2 commits into from
Jan 31, 2022

Conversation

mateuszrzeszutek
Copy link
Member

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.

@@ -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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@breedx-splk breedx-splk left a 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.

@trask
Copy link
Member

trask commented Jan 28, 2022

This really does feel considerably cleaner to me

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

@trask trask merged commit 8b767ac into open-telemetry:main Jan 31, 2022
@mateuszrzeszutek mateuszrzeszutek deleted the http-attributes-getter branch February 1, 2022 06:27
RashmiRam pushed a commit to RashmiRam/opentelemetry-auto-instr-java that referenced this pull request May 23, 2022
…ce (open-telemetry#5267)

* Refactor HTTP attributes extractors to use composition over inheritance

* Rename remaining variables: *Extractor to *Getter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants