open-telemetry / open-telemetry/opentelemetry-python-contrib

Extracting span attributes before span creation and passing them to `start_span`/`start_as_current_span`

Open
#430 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.