File tree 6 files changed +8
-6
lines changed
opentelemetry-stdout/src/metrics
6 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ impl PushMetricExporter for MetricExporter {
143
143
self . client . export ( metrics) . await
144
144
}
145
145
146
- async fn force_flush ( & self ) -> OTelSdkResult {
146
+ fn force_flush ( & self ) -> OTelSdkResult {
147
147
// this component is stateless
148
148
Ok ( ( ) )
149
149
}
Original file line number Diff line number Diff line change 2
2
3
3
## vNext
4
4
5
+ - * Breaking* Make ` force_flush() ` in ` PushMetricExporter ` synchronous
6
+
5
7
- * Breaking (Affects custom Exporter/Processor/MetricReader authors only)* Removed
6
8
` opentelelemetry_sdk::logs::error::{LogError, LogResult} ` . These were not
7
9
intended to be public. If you are authoring custom processor/exporters, use
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ pub trait PushMetricExporter: Send + Sync + 'static {
20
20
) -> impl std:: future:: Future < Output = OTelSdkResult > + Send ;
21
21
22
22
/// Flushes any metric data held by an exporter.
23
- fn force_flush ( & self ) -> impl std :: future :: Future < Output = OTelSdkResult > + Send ;
23
+ fn force_flush ( & self ) -> OTelSdkResult ;
24
24
25
25
/// Releases any held computational resources.
26
26
///
Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ impl PushMetricExporter for InMemoryMetricExporter {
272
272
. map_err ( |_| OTelSdkError :: InternalFailure ( "Failed to lock metrics" . to_string ( ) ) )
273
273
}
274
274
275
- async fn force_flush ( & self ) -> OTelSdkResult {
275
+ fn force_flush ( & self ) -> OTelSdkResult {
276
276
Ok ( ( ) ) // In this implementation, flush does nothing
277
277
}
278
278
Original file line number Diff line number Diff line change @@ -557,7 +557,7 @@ mod tests {
557
557
}
558
558
}
559
559
560
- async fn force_flush ( & self ) -> OTelSdkResult {
560
+ fn force_flush ( & self ) -> OTelSdkResult {
561
561
Ok ( ( ) )
562
562
}
563
563
@@ -580,7 +580,7 @@ mod tests {
580
580
Ok ( ( ) )
581
581
}
582
582
583
- async fn force_flush ( & self ) -> OTelSdkResult {
583
+ fn force_flush ( & self ) -> OTelSdkResult {
584
584
Ok ( ( ) )
585
585
}
586
586
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ impl PushMetricExporter for MetricExporter {
58
58
}
59
59
}
60
60
61
- async fn force_flush ( & self ) -> OTelSdkResult {
61
+ fn force_flush ( & self ) -> OTelSdkResult {
62
62
// exporter holds no state, nothing to flush
63
63
Ok ( ( ) )
64
64
}
You can’t perform that action at this time.
0 commit comments