Skip to content

[BUG] pull-based ingestion with Kafka is "missing _source field" with OpenTelemetry as a source #19374

@timojohlo

Description

@timojohlo

Describe the bug

I am trying out the pull-based ingestion with Kafka described here.
The ingestion works with sample log lines, but when I try to ingest data that is pushed from OpenTelemetry to Kafka and then ingested by OpenSearch, I am getting the following error in OpenSearch:

[ERROR][o.o.i.p.DropIngestionErrorStrategy] [opensearch-cluster-master-2] Error processing update from kafka: java.lang.IllegalArgumentException: Missing _source field. Invalid message

The OpenTelemetry config for the kafka exporter consists of:

    exporters:
      kafka/test:
        brokers:
        - kafka:9092
        encoding: otlp_json
        topic: otel-logs

I believe, this _source field has to be set up by OpenSearch and is not something that has to be configured in the OpenTelemetry config?

Related component

Plugins

To Reproduce

  1. Install OpenSearch opensearch-3.2.1 Instance in kubernetes cluster
    helm install opensearch-kafka opensearch/opensearch --values values-opensearch.yaml --set "opensearch.opensearchPlugins[0]=ingestion-kafka"
  2. Install OpenSearch dashboard opensearch-dashboards-3.2.2 in kubernetes cluster
    helm install opensearch-kafka-dashboards opensearch/opensearch-dashboards
  3. Set up Kafka kafka-32.4.3 in kubernetes cluster
helm install kafka \
  --set replicaCount=3 \
  --set kraft.enabled=true \
  --set service.ports.client=9092 \
  --set listeners.client.protocol=PLAINTEXT \
  --set controller.replicaCount=3 \
  --set "persistence.enabled=false" \
  --set "provisioning.enabled=true" \
  --set "provisioning.topics[0].partitions=3" \
  --set "provisioning.topics[0].replicationFactor=3" \
  --set "provisioning.topics[0].name=otel-logs
  1. Install OpenTelemetry in kubernetes cluster
    helm install opentelemetry-operator open-telemetry/opentelemetry-operator
  2. Follow the description to set up the pull-based index here
  3. Check error logs with kubectl e.g.
    kubectl logs opensearch-cluster-master-2

Expected behavior

Logs from OpenTelemetry can be pulled into OpenSearch.

Additional Details

Plugins

  • ingestion-kafka

Screenshots
not applicable

Host/Environment (please complete the following information):

  • helm chart opensearch-dashboards-3.2.2
  • helm chart opensearch-3.2.1
  • helm chart opentelemetry-collector-contrib:0.133.0
  • helm chart opentelemetry-operator:0.93.0

Additional context
no other context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions