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

Improved resource naming for HTTP client requests #31570

Open
morley92 opened this issue Nov 28, 2024 · 0 comments
Open

Improved resource naming for HTTP client requests #31570

morley92 opened this issue Nov 28, 2024 · 0 comments

Comments

@morley92
Copy link

We're sending OTEL HTTP client spans via the DataDog agent.

Trace metrics are successfully mapped from these HTTP client spans as you would expect e.g. trace.client.hits.by_http_status. These have some standard attributes included such as http.status_code etc.

The resource_name attribute of the trace metric however is simply the HTTP request method e.g. GET. This is not very useful for aggregating such trace metrics by the request path - which is a common use of such metrics.

Looking through the source, it appears that the resource_name is calculated based on a combination of http.request.method and http.route. If http.route is not found then it will simply use http.request.method - which is the behaviour we're seeing.

The semantic guidelines for HTTP client spans using OTEL don't specify http.route as a valid attribute - this is actually intended for HTTP server spans. url.full is the closest stable attribute as far as I can tell.

Is this a bug or intentional?

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

No branches or pull requests

1 participant