Description
Component(s)
exporter/elasticsearch
Describe the issue you're reporting
Trying to export traces to both Jaeger and Elasticsearch but there are no otel related attributes in Elasticsearch exported data. I'm using an Opentelemetry Java agent.
Exported trace in Jaeger:
... "tags": [ { "key": "otel.library.name", "type": "string", "value": "io.opentelemetry.rabbitmq-2.7" }, { "key": "otel.library.version", "type": "string", "value": "1.30.0-alpha" }, { "key": "thread.name", "type": "string", "value": "pool-6-thread-4" }, { "key": "messaging.destination.name", "type": "string", "value": "<default>" }, { "key": "messaging.operation", "type": "string", "value": "process" }, { "key": "messaging.system", "type": "string", "value": "rabbitmq" }, { "key": "messaging.message.payload_size_bytes", "type": "int64", "value": 89 }, { "key": "messaging.rabbitmq.destination.routing_key", "type": "string", "value": "..." }, { "key": "thread.id", "type": "int64", "value": 62 }, { "key": "span.kind", "type": "string", "value": "consumer" }, { "key": "internal.span.format", "type": "string", "value": "proto" } ] ...
Elasticsearch:
{ "_index": "trace_index", "_id": "y0Es5ooBnMZJW47qYVws", "_version": 1, "_seq_no": 1545, "_primary_term": 13, "found": true, "_source": { "@timestamp": "2023-09-30T12:59:28.252146600Z", "Attributes": { "messaging": { "destination": { "name": "<default>" }, "message": { "payload_size_bytes": 89 }, "operation": "process", "rabbitmq": { "destination": { "routing_key": "..." } }, "system": "rabbitmq" }, "thread": { "id": 77, "name": "pool-6-thread-10" } }, "Duration": 67, "EndTimestamp": "2023-09-30T12:59:28.252213700Z", "Kind": "SPAN_KIND_CONSUMER", "Link": "[]", "Name": "...", "ParentSpanId": "f9e140fe07c276e3", "Resource": { ... }, "SpanId": "5a29c7977f3b1532", "TraceId": "96e6b94f282db97ae089ab79771d0a5a", "TraceStatus": 0 } }
Here is Otel collector (ver: 0.85.0) config:
receivers:
otlp:
protocols:
http:
processors:
batch:
exporters:
otlp:
endpoint: "jaeger:4317"
elasticsearch/trace:
endpoints: "http://elasticsearch:9200"
traces_index: trace_index
mapping:
dedup: false
service:
pipelines:
traces:
receivers: [otlp]
exporters: [otlp,elasticsearch/trace]