Skip to content

feat(kafka-clients): add messaging.kafka.bootstrap.servers attribute #14032

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

wl2027
Copy link
Contributor

@wl2027 wl2027 commented Jun 13, 2025

  • Java agent instrumentation obtains bootstrap.servers through constructor instrumentation
  • Library instrumentation obtains bootstrap.servers through reflection and kafka-clients interceptors
  • Use VirtualField for managing bootstrap servers storage
  • Include bootstrap.servers attribute in all relevant spans

#14031 #10647

wl2027 and others added 2 commits June 13, 2025 21:52
- Add VirtualFieldStore for managing bootstrap servers storage
- Instrument KafkaConsumer and KafkaProducer constructors
- Include bootstrap.servers attribute in all relevant spans

Addresses part of open-telemetry#14031 open-telemetry#10647
@wl2027 wl2027 requested a review from a team as a code owner June 13, 2025 14:07
@github-actions github-actions bot added the test native This label can be applied to PRs to trigger them to run native tests label Jun 13, 2025
wl2027 and others added 3 commits June 14, 2025 16:55
@otelbot-java-instrumentation
Copy link
Contributor

🔧 The result from spotlessApply was committed to the PR branch.

@wl2027
Copy link
Contributor Author

wl2027 commented Jun 16, 2025

Hi @laurit , Could you review this PR? Thanks!

@breedx-splk
Copy link
Contributor

Thanks! It would be nice if the new attribute would be proposed in https://github.com/open-telemetry/semantic-conventions/blob/main/docs/messaging/kafka.md as well...just sayin'.

Co-authored-by: jason plumb <75337021+breedx-splk@users.noreply.github.com>
@wl2027
Copy link
Contributor Author

wl2027 commented Jun 17, 2025

Thanks! It would be nice if the new attribute would be proposed in https://github.com/open-telemetry/semantic-conventions/blob/main/docs/messaging/kafka.md as well...just sayin'.

Thanks for the suggestion! I will first place this attribute in ExperimentalAttributesExtractor, and then create a separate PR to the semantic-conventions repository to propose this new attribute. This ensures standardization for implementations in other languages. However, I'm unsure whether other languages also find it difficult to obtain kafka-clients' server.* and network.* attributes, leading them to implement and use messaging.kafka.bootstrap.servers.

@wl2027
Copy link
Contributor Author

wl2027 commented Jun 23, 2025

Hi @laurit ,May I ask what should be done about the failures in the markdown-link-check and instrumentation restlet muzzle stages? These errors don't seem to be caused by my modifications, nor do they appear to be issues that my PR should address. Additionally, I've noticed that these two stages have also been failing in recent submissions from other PRs. Should I wait for these issues to be fixed before merge my code?

@trask
Copy link
Member

trask commented Jun 23, 2025

Hi @laurit ,May I ask what should be done about the failures in the markdown-link-check and instrumentation restlet muzzle stages? These errors don't seem to be caused by my modifications, nor do they appear to be issues that my PR should address. Additionally, I've noticed that these two stages have also been failing in recent submissions from other PRs. Should I wait for these issues to be fixed before merge my code?

you can ignore these failures, they will not hold up review or merging

@wl2027 wl2027 requested review from laurit and breedx-splk June 24, 2025 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test native This label can be applied to PRs to trigger them to run native tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants