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

Update the span attributes to follow the latest semantic conventions

Open
#3,495 0 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

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.