-
Notifications
You must be signed in to change notification settings - Fork 17
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
[processor/lsminterval] Behaviour of timestamp for aggregated metrics #158
Comments
Maybe this is something that should be configurable (event timestamp vs arrival timestamp). If we truncate the event timestamp, we'll need to add another dimension for late arrivals. Otherwise, we could create another data point for the same timestamp for the same time series, leading to duplicate rejections. This was one of the reasons that made it hard for use to adopt TSDB for APM. |
Good point! It seems duplicate rejection would always be the case with APM logic for late arrivals which didn't make their realtime aggregation bucket. The current lsmintervalprocessor doesn't consider timestamp as an aggregation dimension but if we want to do it, we would have to truncate the event timestamp making data rejection a lot more probable. We could add another dimension, like a current truncated aggregation processing window which should make it unique but this would mean a new timeseries for every aggregation period... not sure if this is a good idea. Alternatively, if we decide to leave things as they are i.e. aggregating with arrival timestamp then the resulting data might be a bit skewed. We could decide to only aggregate late arrivals up to a limit and minimize the deviation of the skew but not sure if that is any better. |
What I'm thinking of is to add a numeric dimension (for example named While that would work well with delta temporality, I don't think it would really work with cumulative temporality. |
Hmm, that's a neat trick which gives me another idea. We could use the concept of |
That won't allow us to accept timestamps that are arbitrarily late. But TSDB already has limitations on late-arriving data, so that's probably fine. Also, if we use nanosecond precision timestamps, it will be even less of an issue. Maybe we should have a configurable set of strategies as the ideal strategy probably depends on the capabilities of the backend (nanosecond support, support for late arrivals, etc.) |
LSM interval creates aggregated metrics without utilizing the timestamp of the incoming events. The timestamp of the aggregated event is set to the latest timestamp of the aggregated datapoints. This behaviour is based on the upstream intervalprocessor on which the lsmintervalprocessor is based on.
OTOH, apm-aggregation uses truncated event timestamp (based on aggregation interval) for bucketing data. Due to this, old metrics are grouped in a separate bucket. This would mean that, aggregations for old spans would have a new timestamp in OTel.
The text was updated successfully, but these errors were encountered: