You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
metricstarttimeprocessor: Implementation of the subtractinitial strategy (#38594)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Addresses #38379.
Some of this logic already existed in the [GCM
exporter](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/blob/main/exporter/collector/internal/normalization/standard_normalizer.go).
For each resource, and for each timeseries
- Skip if the point is not a cumulative sum, histogram, exp histogram,
or summary.
- Lookup the timeseries in the cache. If it is not present, drop this
point from the batch, and store the timestamp and value (including
bucket counts, etc) in the cache.
- Subtract cumulative values (e.g. sum, bucket counts) of the cached
timeseries from the current timeseries, and set the start timestamp to
the cached point's timestamp.
<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes#38379.
<!--Describe what testing was performed and which tests were added.-->
#### Testing
Added unit and integration tests.
<!--Describe the documentation added.-->
#### Documentation
Readme already covers this strategy
<!--Please delete paragraphs that you did not use before submitting.-->
---------
Signed-off-by: Ridwan Sharif <[email protected]>
0 commit comments