[SDK] Use sdk_start_ts for MetricData start_ts for instruments having cumulative aggregation temporality.#2086
Merged
marcalff merged 2 commits intoopen-telemetry:mainfrom Apr 12, 2023
davidmandle:main
Merged
[SDK] Use sdk_start_ts for MetricData start_ts for instruments having cumulative aggregation temporality.#2086marcalff merged 2 commits intoopen-telemetry:mainfrom davidmandle:main
marcalff merged 2 commits intoopen-telemetry:mainfrom
davidmandle:main
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2086 +/- ##
==========================================
- Coverage 87.19% 87.17% -0.02%
==========================================
Files 166 166
Lines 4784 4784
==========================================
- Hits 4171 4170 -1
- Misses 613 614 +1
|
…ative aggregation temporality.
Contributor
Author
|
Thanks |
ays7
added a commit
to ays7/opentelemetry-cpp
that referenced
this pull request
May 18, 2023
* commit '7887d32da60f54984a597abccbb0c883f3a51649': (82 commits) [RELEASE] Release version 1.9.0 (open-telemetry#2091) Use sdk_start_ts for MetricData start_ts for instruments having cumulative aggregation temporality. (open-telemetry#2086) [SEMANTIC CONVENTIONS] Upgrade to version 1.20.0 (open-telemetry#2088) [EXPORTER] Add OTLP HTTP SSL support (open-telemetry#1793) Make Windows build environment parallel (open-telemetry#2080) make some hints (open-telemetry#2078) Make some targets parallel in CI pipeline (open-telemetry#2076) [Metrics SDK] Implement Forceflush for Periodic Metric Reader (open-telemetry#2064) Upgraded semantic conventions to 1.19.0 (open-telemetry#2017) Bump actions/stale from 7 to 8 (open-telemetry#2070) Include directory path added for Zipkin exporter example (open-telemetry#2069) Ignore more warning of generated protobuf files than not included in `-Wall` and `-Wextra` (open-telemetry#2067) Add `ForceFlush` for all `LogRecordExporter`s and `SpanExporter`s. (open-telemetry#2000) Remove unused 'alerting' section from prometheus.yml in examples (open-telemetry#2055) Clean warnings in ETW exporters (open-telemetry#2063) Fix default value of `OPENTELEMETRY_INSTALL_default`. (open-telemetry#2062) [EXPORTER] GRPC endpoint scheme should take precedence over OTEL_EXPORTER_OTLP_TRACES_INSECURE (open-telemetry#2060) Fix view names in Prometheus example (open-telemetry#2034) Fix some docs typo (open-telemetry#2057) Checking indices before dereference (open-telemetry#2040) ... # Conflicts: # exporters/ostream/CMakeLists.txt # sdk/src/metrics/state/metric_collector.cc # sdk/src/metrics/state/temporal_metric_storage.cc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
The OpenTelemetry data model for metrics states that "with cumulative aggregation temporality ... we expect to report the full sum since 'start'", and the accompanying diagram illustrates the same
start_timepresent in each report.However, prior to this change, cumulative metrics were being reported with a start time equal to the last report time. This broke compatibility with services expecting the documented behavior. (For example, without this change, Counter metrics submitted to the Google Cloud Monitoring API via the googlecloudexporter are not represented correctly).
For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes