-
Notifications
You must be signed in to change notification settings - Fork 506
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
Chore/metrics advanced #2204
Chore/metrics advanced #2204
Conversation
Move Delta selector into same file as Default, and update duplication in benches.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2204 +/- ##
=======================================
- Coverage 79.0% 79.0% -0.1%
=======================================
Files 122 122
Lines 21056 21059 +3
=======================================
- Hits 16651 16647 -4
- Misses 4405 4412 +7 ☔ View full report in Codecov by Sentry. |
@@ -169,7 +169,7 @@ where | |||
/// | |||
/// [exporter-docs]: https://github.com/open-telemetry/opentelemetry-specification/blob/a1c13d59bb7d0fb086df2b3e1eaec9df9efef6cc/specification/metrics/sdk_exporters/otlp.md#additional-configuration | |||
pub fn with_delta_temporality(self) -> Self { | |||
self.with_temporality_selector(DeltaTemporalitySelector) | |||
self.with_temporality_selector(DeltaTemporalitySelector::new()) |
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.
the future of these methods in OTLP crate is unknown based on #1811
However, this change itself is fine.
@@ -44,7 +45,11 @@ fn init_meter_provider() -> opentelemetry_sdk::metrics::SdkMeterProvider { | |||
} | |||
}; | |||
|
|||
let exporter = opentelemetry_stdout::MetricsExporterBuilder::default().build(); | |||
// Build exporter using Delta Temporality. |
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.
While the concept is somewhat advanced, it is a common ask. Could you make this in the metrics-basic itself, as a code comment, so users can pick between delta vs cumulative by removing commented out code?
(It is possible that we'll have different ways to configure this in the future, but this change is still very good)
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.
LGTM.
If you can make the change in metrics-basic, that'd be sweet. It is okay to do it in a follow up as well.
Awesome! I will make the requested changes for this tomorrow for the example. |
Issue That prompted these changes: #1060
References:
Changes
DeltaTemporalitySelector
:DeltaTemporalitySelector
to same file asDefaultTemporalitySelector
.pub
so its usable for pipeline setup.Example:
DeltaTemporalitySelector
.Merge requirement checklist
CHANGELOG.md
files updated for non-trivial, user-facing changes