-
Notifications
You must be signed in to change notification settings - Fork 843
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
Unexpected behavior for DELTA metric interval #4400
Comments
Yeah that is a bit strange isn't it? Here's the code that produces it. If we have previous recordings we use the start time from it. However if its the first collection, we need to set the start time to some value. We don't currently track the time of the last collection for each reader, so we take the overall start time of the sdk instead (which we do track because its needed for cumulative metrics). |
Not sure if it's related to DELTA or not - start is a constant similar to app start time from what I understand. So we expect that subtraction to get larger over time. If we explain what start means well enough, hopefully it's not too confusing? Unless I'm already confused 😅 |
@anuraaga here's another example that might help (or further confuse?)
|
Oh - yeah I thought start is supposed to be constant, is this correct behavior? |
Start is only constant when temporality is cumulative. When temporality is delta it represents the beginning of the collection window, which is the app start time if it's the first collection, or the time of the last collection. Check out this image from the data model. |
The following code:
reports the following metrics:
what is unexpected (to me at least) is that the metric "interval" (getEpochNanos - getStartEpochNanos) is ~20 seconds for
histo2
, instead of approximately 10 seconds as configured.I can see how the current behavior is technically correct, but I'm worried about user questions asking why the metric interval that we report isn't always approximately the value that they configured (e.g. via
OTEL_METRIC_EXPORT_INTERVAL
).The text was updated successfully, but these errors were encountered: