open-telemetry / opentelemetry-collector

OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
4.36k stars 1.44k forks source link

Kafka receiver metrics abnormal behavior #3149

Closed hyde404 closed 3 years ago

hyde404 commented 3 years ago

Hello,

We are currently facing an issue with metrics consumption from kafka receiver running on kubernetes.

Here's what we are trying to achieve:

Metrics from app ---->(receiver: otlp) OTLP Collector 1 (exporter: kafka)---> KAFKA <--- (receiver: kafka) OTLP Collector 2(exporter: prometheus)

but we get this error message :

Error: cannot build pipelines: cannot build receivers: receiver kafka/metrics does not support metrics but it was used in a metrics pipeline
2021/05/12 20:03:10 application run finished with error: cannot build pipelines: cannot build receivers: receiver kafka/metrics does not support metrics but it was used in a metrics pipeline

Here's a sample of my configuration:

OTLP Collector 1:

receivers:
  # Self monitor to have some metrics to test things up
  otlp:
    protocols:
      grpc:
      http:

...

exporters:
  kafka/metrics:
    brokers:
      - kafka-otelcol-bootstrap.<NAMESPACE>.svc.cluster.local:9092
    topic: otlp-metrics-receivers

service:
  extensions: [health_check, zpages]
  pipelines:
    metrics:
      receivers: [otlp]
      processors: []
      exporters: [kafka/metrics]

OTLP Collector 2 :

receivers:
  kafka/metrics:
    topic: otlp-metrics-receivers
    brokers:
      - kafka-otelcol-bootstrap.<NAMESPACE>.svc.cluster.local:9092
...

service:
  extensions: [health_check, zpages]
  pipelines:
    metrics:
      receivers: [kafka/metrics]
      processors: []
      exporters: [prometheus]

We already noticed "Supported pipeline types: traces, logs" on the kafka receiver front page but is it possible to use kafka for metrics another way ? Is it an incoming feature ?

Thank you !

secat commented 3 years ago

I just saw that there is a specific Kafka Metrics Receiver for metrics in the opentelemetry-collector-contrib project.

@bogdandrutu or @tigrannajaryan is there a plan to merge the functionality of the contrib Kafka Metrics Receiver into the official Kafka Receiver?

tigrannajaryan commented 3 years ago

@bogdandrutu or @tigrannajaryan is there a plan to merge the functionality of the contrib Kafka Metrics Receiver into the official Kafka Receiver?

No, as far as I know the two are completely different. One collects Kafka's own metrics, the other receives arbitrary telemetry payloads from Kafka.

secat commented 3 years ago

@tigrannajaryan thank you very much for the precisions!

Is there a roadmap to support the metrics signal through the Kafka Receiver?

alolita commented 3 years ago

@secat Metrics support using the Kafka receiver is not prioritized currently. Feel free to join in to contribute if you're interested in adding that support.