Skip to content

[exporter/elasticsearch] Automatic Mapping mode detection via request metadata #36092

Closed
@mauri870

Description

@mauri870

Component(s)

exporter/elasticsearch

Is your feature request related to a problem? Please describe.

The only way to set a mapping mode for the exporter currently is through the mapping.mode configuration. The downside of this approach is that it applies globally to all data processed by the exporter.

If different receivers or processors require distinct mapping modes, the only solution is to run multiple exporter instances in the collector, each using a different mapping mode and routing the pipelines accordingly. This setup can quickly become unmanageable, depending on the size of your collector configuration.

Describe the solution you'd like

The exporter supports an automatic mapping mode by checking for a header in the client metadata and using it as the mapping mode if present, with a fallback to the configuration if not.

Acceptable values for this header include all current supported mapping modes.

In case of invalid values or when the mode isn't implemented, the Elasticsearch exporter logs an error and discards the event.

Describe alternatives you've considered

No response

Additional context

Internal Elastic proposal: https://github.com/elastic/opentelemetry-dev/pull/315

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions