open-telemetry / open-telemetry/opentelemetry-python-contrib
Extracting span attributes before span creation and passing them to `start_span`/`start_as_current_span`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 1.1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 16
Description
Need for this: The ability to make sampling decision based on the attributes following semantic conventions.
I would like to customise the sampler and make my sampling decision based on incoming request metadata for web api. The instrumentations now create span with it's name and kind then conditionally populate tags if span is being recorded. If a sampler doesn't receive any metadata about the incoming request/DB call/other then I am being limited to make my decision based on tiny information available which isn't really helpful.
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
No files or tests are named in the issue. Start by tracing the instrumentation span-creation flow and the sampler interface, focusing on when incoming request or database metadata becomes available. Done should mean a defined, tested way for samplers to receive semantic-convention attributes before span creation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100