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

Add http.route to HTTP client requests and extract from Spring WebClient #10506

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

HaloFour
Copy link
Contributor

Adds the semantic attribute http.route to the list of attributes supported by HTTP client requests, indicating a templated URI used when making the HTTP request as supported by the client framework.

Adds support for extracting that templated URI from the ClientRequest attributes when using Spring WebClient. This is based on the Spring actuator implementation for Spring Boot 2.x that extracts the URI template and formats it for the purposes of reporting to Micrometer:

https://github.com/spring-projects/spring-boot/blob/2.7.x/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/client/WebClientExchangeTags.java#L68

This implementation returns null if the attribute is not found to avoid reporting raw URIs.

@missTam
Copy link

missTam commented Oct 30, 2024

Hi @HaloFour @trask,

Will this PR be revisited?

Is there a current practical use of #675 without the underlying HTTP client infrastructure supporting it?

Is this the required implementation for it?

Please check the discussion.

Thank you!

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.

2 participants