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

Kafka Receiver does not include topic or receiver as a label #35336

Open
jhuizingh opened this issue Sep 20, 2024 · 1 comment
Open

Kafka Receiver does not include topic or receiver as a label #35336

jhuizingh opened this issue Sep 20, 2024 · 1 comment
Labels
bug Something isn't working needs triage New item requiring triage receiver/kafka

Comments

@jhuizingh
Copy link
Contributor

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

  ... irrelevent parts omitted ...
  receivers:
    kafka/first:
      topic: kafka-topic-first
    kafka/second:
      topic: kafka-topic-second
  service:
    pipelines:
      metrics/kafka:
        receivers:
          - kafka/first
          - kafka/second
  ... irrelevent parts omitted ...

Expected Result

Metric in the form:

otelcol_kafka_receiver_offset_lag {
  cluster="mycluster",
  http_scheme="http",
  net_host_name="10.110.0.242",
  net_host_port="8888",
  partition="24",
  server_address="10.110.0.242",
  server_port="8888",
  service_name="otelcol-contrib",
  service_version="0.103.1",
  url_scheme="http",
  receiver="kafka/first",
  topic="kafka-topic-first"
}

Actual Result

Metric in the form:

otelcol_kafka_receiver_offset_lag {
  cluster="mycluster",
  http_scheme="http",
  net_host_name="10.110.0.242",
  net_host_port="8888",
  partition="24",
  server_address="10.110.0.242",
  server_port="8888",
  service_name="otelcol-contrib",
  service_version="0.103.1",
  url_scheme="http"
}

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

receivers:
    kafka/first:
      topic: kafka-topic-first
    kafka/second:
      topic: kafka-topic-second
  service:
    pipelines:
      metrics/kafka:
        receivers:
          - kafka/first
          - kafka/second

Log output

N/A

Additional context

No response

@jhuizingh jhuizingh added bug Something isn't working needs triage New item requiring triage labels Sep 20, 2024
Copy link
Contributor

Pinging code owners:

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

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/kafka
Projects
None yet
Development

No branches or pull requests

1 participant