-
Notifications
You must be signed in to change notification settings - Fork 80
Changing logging metrics to use starttime processor #2148
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
| otel.DeltaToCumulative(), | ||
| otel.MetricStartTime(), | ||
| // Transfrom from double -> int64 after we apply the metricstarttime processor | ||
| // This prevents us from hitting b/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a bug tracker and summarize briefly the issue.
| // DeltaToCumulative keeps in memory information of previous delta points | ||
| // to generate a valid cumulative monotonic metric. | ||
| otel.DeltaToCumulative(), | ||
| otel.MetricStartTime(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What strategy are we using to set the start times ? Is this equivalent to the Google Cloud exporter strategy ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It uses the subtract_initial_point strategy
metricstarttime/loggingmetrics_7:
strategy: subtract_initial_point
This is what is done on the exporter:
https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/blob/main/exporter/collector/internal/normalization/standard_normalizer.go#L250-L257
From my understanding, they both drop the first point when the starttime is zero and cache it as a reference value for the next points.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good ! Thank you! Yes, it makes sense to use that strategy as a replacement for the exporter "standard_normalization".
|
I have a more general question of this approach, that would also encompass the #2093 PR. Since we removed the
Some details :
|
Talked offline, but documenting here for posterity:
|
|
This issue has been fixed by #2152 and this workaround is no longer needed. |
Description
The current implementation implicitly relies on the exporter to set the starttime of the metric.
This makes the behavior explicit. It is also required to move to the OTLP exporter, since it does not adjust the starttime.
Related issue
b/452074867
How has this been tested?
Current integration tests.
Checklist: