Skip to content

kafkaexporter: Improve internal telemetry #40834

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 11 commits into
base: main
Choose a base branch
from

Conversation

1pkg
Copy link

@1pkg 1pkg commented Jun 20, 2025

Description

This PR adds the following internal telemetry metrics to improve the exporter telemetry to make it easier to operate.

Click to expand
Name Description Type
kafka_exporter_records The number of exported records sum
kafka_exporter_bytes The number of exported bytes, accounting for client compression sum
kafka_exporter_bytes_uncompressed The number of exported uncompressed bytes sum
kafka_exporter_latency Time it took to export a batch of records histogram
kafka_broker_connects The number of connections opened sum
kafka_broker_disconnects The number of connections closed sum
kafka_broker_throttling_duration The throttling duration imposed by the broker when exporting messages histogram

Link to tracking issue

Fixes

#40815

Testing

Unit tests are added, also tested manually.

Documentation

Documentation is autogenerated with mdatagen.

@1pkg 1pkg requested review from MovieStoreGuy and a team as code owners June 20, 2025 01:37
Copy link

linux-foundation-easycla bot commented Jun 20, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

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.

Looks great! Just a few small things.

Maybe we should add exponential histogram support to mdatagen, and use that for measuring the latency. Not a blocker of course, just doesn't seem ideal to use explicit bounds.

@1pkg
Copy link
Author

1pkg commented Jun 20, 2025

Looks great! Just a few small things.

Maybe we should add exponential histogram support to mdatagen, and use that for measuring the latency. Not a blocker of course, just doesn't seem ideal to use explicit bounds.

I can raise an issue in opentelemetry-collector to add the support in mdatage and contribute the implementation. As this is not a blocker I will do this asynchronously.

@vigneshshanmugam
Copy link

Maybe we should add exponential histogram support to mdatagen, and use that for measuring the latency. Not a blocker of course, just doesn't seem ideal to use explicit bounds.

This is a problem we are running in to for other components as well, Worth raising it as a separate issue.

Copy link

@vigneshshanmugam vigneshshanmugam left a comment

Choose a reason for hiding this comment

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

LGTM other than the attribute duplication logic.

@1pkg 1pkg requested a review from axw June 21, 2025 00:43
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.

4 participants