Skip to content

Commit

Permalink
fix collect interval
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb committed Jun 11, 2024
1 parent 894dd71 commit 05edd23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/self-diagnostics/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
rx.recv().expect("Could not receive from channel.");
println!("Got Ctrl-C, Doing shutdown and existing.");

// Metrics are exported by default every 30 seconds when using stdout exporter,
// Metrics are exported by default every 1 seconds when using stdout exporter,
// however shutting down the MeterProvider here instantly flushes
// the metrics, instead of waiting for the 30 sec interval.
// the metrics, instead of waiting for the 1 sec interval.
meter_provider.shutdown()?;
// shutdown again to trigger error message.
meter_provider.shutdown()?;
Expand Down

0 comments on commit 05edd23

Please sign in to comment.