Skip to content
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

[receiver/kafkametrics] Kafka consumer offset gives a random value instead of an actual offset #33309

Closed
an-mmx opened this issue May 30, 2024 · 1 comment · Fixed by #33336
Closed
Labels
bug Something isn't working needs triage New item requiring triage receiver/kafkametrics

Comments

@an-mmx
Copy link
Contributor

an-mmx commented May 30, 2024

Component(s)

receiver/kafkametrics

What happened?

Description

It seems there is an issue in the code:
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/kafkametricsreceiver/consumer_scraper.go#L145

For the consumer offset (RecordKafkaConsumerGroupOffsetDataPoint) it should send consumerOffset instead of offsetSum.

Steps to Reproduce

  1. Precondition: having Kafka topic with more than 1 partition.
  2. Run the receiver, use debug output.
  3. Compare Kafka consumer offset metrics with actual in the Kafka ui.

Expected Result

The Kafka consumer offset represent actual consumer offset value

Actual Result

We can see that consumer offset value doesn't match with the actual value from Kafka ui.

Collector version

v0.101.0

Environment information

Environment

Any

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@an-mmx an-mmx added bug Something isn't working needs triage New item requiring triage labels May 30, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@an-mmx an-mmx changed the title [receiver/kafkametricsreceiver] Kafka consumer offset gives a random value instead of an actual offset [receiver/kafkametrics] Kafka consumer offset gives a random value instead of an actual offset Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New item requiring triage receiver/kafkametrics
Projects
None yet
1 participant