Skip to content

Add experimental http client url.template attribute #13581

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

Merged
merged 3 commits into from
Mar 27, 2025

Conversation

laurit
Copy link
Contributor

@laurit laurit commented Mar 25, 2025

Add filling url.template to HttpExperimentalAttributesExtractor. Also modify HttpSpanNameExtractor to use the url template in http client span name.

@laurit laurit marked this pull request as ready for review March 25, 2025 17:27
@laurit laurit requested a review from a team as a code owner March 25, 2025 17:27
}

@Override
public String extract(REQUEST request) {
String method = getter.getHttpRequestMethod(request);
if (method == null || !knownMethods.contains(method)) {
String template = urlTemplateExtractor.apply(request);
Copy link
Member

Choose a reason for hiding this comment

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

small preference to move this line down just before the last line of the method

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did the same change for route in the server extractor.

@laurit laurit merged commit 7d1aeb4 into open-telemetry:main Mar 27, 2025
86 checks passed
@laurit laurit deleted the url-template branch March 27, 2025 11:30
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.

3 participants