open-telemetry / open-telemetry/opentelemetry-python-contrib
why do traceresponsepropagators not extract?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 1.1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 16
Description
Currently, the Responsepropagator defines an inject method in its interface, but not an extract method? Why is this so?
If I receive a traceresponse in my response, the next thing I would want to do is extract this traceresponse header into a Context. But as I understand, all the otel provided extraction operations only know how to extract from traceparent (so I either need to roll a propagator of my own, or a custom Getter). This need to get traceparent from traceresponse feels likely enough that it should be accounted for somehow.
if the current interface for response propagators is the preferred state, would a Getter be the recommended approach or would we be open to extending the Response interface to support extraction (or modifying the TraceContext propagators to also look for traceresponse)
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 with opentelemetry/instrumentation/propagators.py at the linked ResponsePropagator interface and trace how TraceContext propagators handle response headers. Compare the existing inject path with extraction APIs and related tests. Done requires a settled design for traceresponse extraction, including whether the interface, Getter, or propagator behavior should change, plus tests for the chosen approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend-api-design, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100