open-telemetry / open-telemetry/opentelemetry-python-contrib
Update the span attributes to follow the latest semantic conventions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 1.1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 16
Description
What problem do you want to solve?
We are still use some deprecated trace attributes like MESSAGING_URL in the kafka instrumentations.
https://github.com/open-telemetry/opentelemetry-python-contrib/blob/4a1e0ce94183a7f57990ab283a3ccc0dbf445ccd/instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/utils.py#L133
Additionally, we are also using some deprecated attributes, such as NET_HOST_PORT and NET_PEER_PORT, in our database instrumentation.
Maybe we should update them to follow the latest semconv.
Describe the solution you'd like
Just update them to the latest semconv like changing MESSAGING_URL to server.address and update the test cases as well.
Describe alternatives you've considered
No response
Additional Context
No response
Would you like to implement a fix?
Yes
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 instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/utils.py at the referenced span-attribute code, then locate the database instrumentation using NET_HOST_PORT and NET_PEER_PORT. Update the deprecated attributes to the latest semantic conventions, including MESSAGING_URL to server.address, and update the related test cases to verify the new attributes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kafka, python
- Domain
- observability-sre
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100