open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
2.88k stars 2.25k forks source link

Not able to get traces into kafka consumer from otel collector #34142

Open edificeinsightworksapp opened 1 month ago

edificeinsightworksapp commented 1 month ago

Hello,

Not able to get traces into Kafka consumer output from collector. please find the below otel-config file: Our pipeline is from our app--otel-kafka, spans are getting generated and displayed in the otel output debug log. But not going to Kafka topic and no error msg either. If I post a msg directly to Kafka from any other producer, data is received to Kafka. Request to let me know what would be the issue or any way i can debug more?

Starting the collector with below command:

docker run -d \ -p 4317:4317 -v $(pwd)/otel-collector-config.yaml:/etc/otelcol/otel-collector-config.yaml \ otel/opentelemetry-collector:latest

otel-collector-config.yaml

receivers:
  otlp:
    protocols:
      grpc:

processors:
  batch:
  queued_retry:

exporters: 
  debug:
    verbosity: detailed
  kafka:
    brokers:
      - localhost:9092
    #topic: jaeger-spans
    protocol_version: 3.7.1
  logging:
    verbosity: detailed
    loglevel: debug

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [debug,kafka,logging]
  telemetry:
    logs:
      level: "debug"
      encoding: "json"
      development: true

Thanks

github-actions[bot] commented 1 month ago

Pinging code owners for exporter/kafka: @pavolloffay @MovieStoreGuy. See Adding Labels via Comments if you do not have permissions to add labels yourself.

Frapschen commented 1 month ago

@edificeinsightworksapp Hi, please make sure your kafka brokers address work for your. Docker network is isolate, I don't think localhost:9092 is a right address to your kafak brokers