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

Server spans should use templated route/url as the span name #434

Open
owais opened this issue Apr 13, 2021 · 0 comments
Open

Server spans should use templated route/url as the span name #434

owais opened this issue Apr 13, 2021 · 0 comments

Comments

@owais
Copy link
Contributor

owais commented Apr 13, 2021

From Otel spec:

In case of HTTP servers, these endpoints are often mapped by the server frameworks to more concise HTTP routes, e.g. /api/users/{user_id}, which are recommended as the low cardinality span names.

https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md#name


All server instrumentations should be updated to confirm with the spec.

  • URL/Route templates should be used as the span name.
  • When it is not possible retrieve the templated URL/route, instrumentations should fall-back on the view/controller/function name. For example, UserHandler.get where UserHandler is a Python class and get is the method that served the HTTP request.
  • Finally if none of the above are possible, instrumentations should fall back on HTTP {method}. For example, HTTP GET for GET requests and so on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant