Skip to content

elasticsearchexporter: mapping mode from scope #39110

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

Conversation

axw
Copy link
Contributor

@axw axw commented Apr 1, 2025

Description

Add support for specifying the mapping mode as a scope attribute, "elastic.mapping.mode". If specified, this overrides both X-Elastic-Mapping-Mode from client metadata as well as the default mode specified through collector configuration.

Simplify StartSession by removing the error result, since the only time it can fail is if the BulkIndexerConfig is invalid, and we ensure that cannot happen. We now also pre-create arrays of encoders, routers, and data point hashers; this simplifies and speeds up acquisition of these during execution.

This is based on #38667

Link to tracking issue

N/A

Testing

Added unit tests.

Documentation

Updated README.

@axw axw force-pushed the elasticsearchexporter-scopeattr-mappingmode branch from f9f842f to 14b98fe Compare April 1, 2025 23:58
@axw axw force-pushed the elasticsearchexporter-scopeattr-mappingmode branch from 14b98fe to e71b432 Compare April 2, 2025 01:00
Add support for specifying the mapping mode as
a scope attribute, "elastic.mapping.mode". If
specified, this overrides X-Elastic-Mapping-Mode.

Simplify StartSession by removing the error result,
since the only time it can fail is if the
BulkIndexerConfig is invalid, and we ensure that
cannot happen.

We now also pre-create arrays of encoders, routers,
and data point hashers. This simplifies and speeds
up acquisition of these during execution.
@axw axw force-pushed the elasticsearchexporter-scopeattr-mappingmode branch from e71b432 to 6cf7592 Compare April 2, 2025 01:01
@axw axw marked this pull request as ready for review April 2, 2025 01:21
@axw axw requested a review from a team as a code owner April 2, 2025 01:21
@axw axw requested a review from bogdandrutu April 2, 2025 01:21
Copy link
Contributor

@carsonip carsonip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for the late review, totally missed the ping. lgtm at a high level. Can you rebase and resolve the conflicts? There should be some conflicting changes on main now

@axw
Copy link
Contributor Author

axw commented Apr 15, 2025

@carsonip done, PTAL

Copy link
Contributor

@carsonip carsonip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat! thanks

@andrzej-stencel andrzej-stencel merged commit 0796f50 into open-telemetry:main Apr 23, 2025
172 checks passed
@github-actions github-actions bot added this to the next release milestone Apr 23, 2025
@axw axw deleted the elasticsearchexporter-scopeattr-mappingmode branch April 23, 2025 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants