open-telemetry / open-telemetry/opentelemetry-python-contrib
Server spans should use templated route/url as the span name
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 1.1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 16
Description
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.
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.getwhereUserHandleris a Python class andgetis 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 GETfor GET requests and so on.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the repository's server instrumentations and the linked OpenTelemetry HTTP semantic conventions. Done means each server instrumentation uses a templated route or URL when available, then a view/controller/function name, and finally an HTTP {method} span name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100