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] Truncate timestamp to millis for metrics to avoid TSDB grouping issue #37165

Closed
carsonip opened this issue Jan 13, 2025 · 4 comments
Labels

Comments

@carsonip
Copy link
Contributor

Component(s)

exporter/elasticsearch

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

See known issues in ES exporter readme and #37150 about version conflict in TSDB due to nanoseconds precision in metrics.

Describe the solution you'd like

As discussed in #37150 (comment) , it is better for ES exporter to handle this OOTB to truncate timestamp to milliseconds.

Scope is not decided yet - whether it is 1. for metrics only and 2. for OTel mapping mode only.

Describe alternatives you've considered

No response

Additional context

No response

@carsonip carsonip added enhancement New feature or request needs triage New item requiring triage labels Jan 13, 2025
@carsonip
Copy link
Contributor Author

/label -needs-triage

Copy link
Contributor

Pinging code owners:

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

@felixbarny
Copy link
Contributor

felixbarny commented Jan 13, 2025

I think it should be for metrics only. IMO, we should also not modify the source events (so that we can use consumer.Capabilities{MutatesData: false}) but instead adjust the grouping hash and the timestamp serialization. We may also want to include a mode that emits timestamps in nanos precision for metrics. But I think that can come later in case there are users that need that. I'd assume that for the vast majority of metrics use cases, millisecond precision is fine. For reference, Prometheus also only supports ms precision timestamps.

@carsonip
Copy link
Contributor Author

As discussed, this should be good to close, as workaround for majority of version conflict errors is stated in #37150

It is also useful to surface TSDB issue due to millis instead of dropping data in es exporter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants