open-telemetry / open-telemetry/opentelemetry-python-contrib
CLIENT spans should update their parent span's kind to INTERNAL
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 1.1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 16
Description
Today all instrumentations that trace outgoing network calls generate spans with kind set to CLIENT. Most higher level libraries internally use lower level code to make such calls. If a user uses instrumentations for both of the libraries, they'll end up with two (or more) parent - child spans both with kind set to CLIENT. For example, requests may internally use urllib or a database client such as etcd may internally use requests, etc.
To remedy such cases, I propose all instrumentations that generate such client spans should always update their parent span's kind to INTERNAL. This way instrumentations do not need to be aware of each other and do not need to communicate with each other via context or any other mechanism.
Depends on: https://github.com/open-telemetry/opentelemetry-python/issues/1774
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 linked dependency, issue 1774, then inspect the instrumentations that create CLIENT spans. Determine how each can update its parent span kind to INTERNAL without coordination between instrumentations; done means the behavior is applied consistently across relevant client instrumentations and verified by appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, observability-sre
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100