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

[elasticsearchexporter] Consistently store the structured body of logs and events in otel mode #37387

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

felixbarny
Copy link
Contributor

@felixbarny felixbarny commented Jan 21, 2025

The OTel community has reached a consensus that all structured data for events defined by semantic conventions should be stored in attributes (open-telemetry/semantic-conventions#1651 (comment)). The body for events may contain opaque/external data, which sounds like a job for the flattened field type.

Therefore, it no longer makes sense to map the body for logs and events differently.

The corresponding Elasticsearch mapping change has been merged already: elastic/elasticsearch#120547

@felixbarny felixbarny changed the title Consistently store the structured body of logs and events in otel mode [elasticsearchexporter] Consistently store the structured body of logs and events in otel mode Jan 21, 2025
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.

code change lgtm, thanks

.chloggen/elasticsearchexporter_log_body.yaml Outdated Show resolved Hide resolved
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.

lgtm, thanks!

@felixbarny felixbarny marked this pull request as ready for review January 22, 2025 17:19
@felixbarny felixbarny requested a review from a team as a code owner January 22, 2025 17:19
@felixbarny
Copy link
Contributor Author

Hey @andrzej-stencel, I think this is ready to be merged. Could you have a look? 🙂

# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking
Copy link
Member

Choose a reason for hiding this comment

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

The otel mapping mode used to be unstable, but that warning has been removed in the latest version, v0.118.0. This change is now a breaking change in a Beta stability component. What are the consequences to users upgrading the collector? Will this cause the data to be rejected by Elasticsearch? Can this be somehow alleviated by the user?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Data will still be ingested, no rejections. It will just be mapped differently. The field body.structured already exists, it will just be used for all kinds of bodies.

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.

4 participants