observe_current_runtime

Function observe_current_runtime 

Source
pub fn observe_current_runtime()
Expand description

Observe metrics for the current Tokio runtime.

This is a convenience function that uses default configuration. For more control, use Config.

§Panics

Panics if called outside of a Tokio runtime context.

§Examples

use opentelemetry_instrumentation_tokio;

opentelemetry_instrumentation_tokio::observe_current_runtime();