Skip to content

[receiver/kafkareceiver] Add 'topic' attribute to kafka internal metrics #39550

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

Merged
merged 6 commits into from
Apr 24, 2025

Conversation

petern48
Copy link
Contributor

Description

Add 'topic' attribute to kafka existing internal metrics.

Link to tracking issue

Fixes #35336

Testing

Updated the existing kafkareceiver_test.go

Documentation

Changelog

@petern48
Copy link
Contributor Author

Not sure why the changelog action is failing. Seems correct to me and running that bash command locally gives me the right output.

> git diff --diff-filter=A --name-only $(git merge-base origin/main kafka_topic_metric_attr) kafka_topic_metric_attr ./.chloggen | grep -c \\.yaml
1

@MovieStoreGuy
Copy link
Contributor

@axw , would the exporter also benefit from adding internal metrics like this?

Copy link
Contributor

@axw axw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @petern48!

@MovieStoreGuy yes, I would say so. I know I bang on about franz-go a bit, but if at some point we switch over to it, we can potentially make use of its kotel instrumentation: https://github.com/twmb/franz-go/tree/master/plugin/kotel#metrics. It should be easier to keep the metrics consistent then.

@atoulme atoulme merged commit 8e9b92b into open-telemetry:main Apr 24, 2025
172 checks passed
@github-actions github-actions bot added this to the next release milestone Apr 24, 2025
@petern48 petern48 deleted the kafka_topic_metric_attr branch April 24, 2025 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kafka Receiver does not include topic or receiver as a label
5 participants