Description
Component(s)
No response
What happened?
Description
When OTEL collector is configured with eventhub receiver & elasticsearchexporter,
Elasticsearch exporter is failing to export the logs to elasticsearch with the following errors.
error [email protected]/bulkindexer.go:379 failed to index document {"resource": {"service.instance.id": "<service_instance_id>", "service.name": "otelcol-contrib", "service.version": "0.128.0"}, "otelcol.component.id": "elasticsearch/otel", "otelcol.component.kind": "exporter", "otelcol.signal": "logs", "index": ".ds-<eventhub_dataset>.otel-<datastream_namespace>-<index_id>", "error.type": "document_parsing_exception", "error.reason": ""}
Elasticsearch has the following errors:
error fetching [attributes.azure.properties.timestamp]: Field [attributes.azure.properties.timestamp] of type [flattened] doesn't support formats.
Caused by type - illegal_argument_exception
NOTE:
It was working fine with otelcol-contrib version 0.114.0. May be the timestamp was not available in the attributes.azure.properties.log
field, but the field was getting ingested.
issue#36861 - Probably after this enhancement (which was added in 0.117.0), the error started occurring.
Steps to Reproduce
Use the latest version otel contrib collector image (version 0.128.0) with azure eventhub receiver and elasticsearch exporter. See the config in OpenTelemetry Collector configuration
block below
Expected Result
Elasticsearch exporter should ingest a multi-field attributes.azure.properties.log
with timestamp
Actual Result
No document is written to the index .ds-<eventhub_dataset>.otel-<datastream_namespace>-<index_id>
Collector version
v0.128.0
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
receivers:
azureeventhub:
connection: Endpoint=<eventhub_endpoint>
format: azure
exporter:
elasticsearch/otel:
endpoints:
- ${env:ELASTIC_ENDPOINT}
api_key: ${env:ELASTIC_API_KEY}
logs_dynamic_index:
enabled: true
mapping:
mode: otel
Log output
Additional context
No response