-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Kafka Receiver does not include topic or receiver as a label #35336
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Looks like this fix may be as simple as adding the missing attributes in a few places, such as:
|
Hey, I just wanted to clarify that you are referring to the internal metrics, correct? Then the fields you're looking to include are:
Is that correct? |
@MovieStoreGuy yes, exactly. Without those attributes, it can be challenging to understand how things are performing on a single deployment with multiple replicas and multiple Kafka receivers configured. |
@MovieStoreGuy, looks like this was partially fixed in v0.104.x version of OTEL Contrib with the "name" and "partition" attributes being added: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/release/v0.104.x/receiver/kafkareceiver/kafka_receiver.go. The problem is in the the v0.103.x version that @jhuizingh is referring to, so would recommend to them to upgrade to v0.104.x to at least obtain the new "name" and "partition" internal telemetry attributes. As for the add topic attribute ask... I think adding topic attribute to a few of the relevant metrics makes a lot of sense because it will make it easier to observe what topic is actually being consumed rather than only having kafkareceiver/receiver name yaml as an item the troubleshooter has to backtrack to, just to obtain the topic name. To address his other request to add topic to the attributes, I do have PR #36068 lined up. Please review :) |
Component(s)
receiver/kafka
What happened?
Description
The metrics emitted by the Kafka Receiver to not contain enough labels to determine which Kafka Receiver and topic they are referring to if you use multiple instances of the Kafka Receiver. Many other receivers include a
receiver
label which shows exactly which receiver the metric comes from by name, but the Kafka Receiver does not.Steps to Reproduce
Create an otel collector with the following relevant pieces
Expected Result
Metric in the form:
Actual Result
Metric in the form:
Collector version
0.103.1
Environment information
Environment
AWS EKS
Kubernetes v 1.30.3
Image: opentelemetry-collector-contrib
Helm Chart: opentelemetry-collector-0.95.0
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: