Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mauri870 opened this issue Oct 30, 2024 · 2 comments · May be fixed by #36110
Open

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

mauri870 opened this issue Oct 30, 2024 · 2 comments · May be fixed by #36110
Labels
enhancement New feature or request exporter/elasticsearch needs triage New item requiring triage

Comments

@mauri870
Copy link
Contributor

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

@mauri870 mauri870 added enhancement New feature or request needs triage New item requiring triage labels Oct 30, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@mauri870 mauri870 changed the title Automatic Mapping mode detection via request metadata [exporter/elasticsearch] Automatic Mapping mode detection via request metadata Oct 30, 2024
@mauri870
Copy link
Contributor Author

Linked a prototype PR that I have ready. It is missing some error handling and fixes for otel mode, will keep it as draft for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request exporter/elasticsearch needs triage New item requiring triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant