Skip to main content

TracerProvider

Trait TracerProvider 

Source
pub trait TracerProvider:
    Send
    + Sync
    + Debug {
    // Required method
    fn get_tracer(
        &self,
        namespace_name: Option<&'static str>,
        crate_name: &'static str,
        crate_version: Option<&'static str>,
    ) -> Arc<dyn Tracer> ⓘ;
}
Expand description

The TracerProvider trait is the entrypoint for distributed tracing in the SDK.

It provides a method to get a tracer for a specific name and package version.

Required Methods§

Source

fn get_tracer( &self, namespace_name: Option<&'static str>, crate_name: &'static str, crate_version: Option<&'static str>, ) -> Arc<dyn Tracer> ⓘ

Returns a tracer for the given name.

Arguments:

  • namespace_name: The namespace of the package for which the tracer is requested. See this page for more information on namespace names.
  • crate_name: The name of the crate for which the tracer is requested.
  • crate_version: The version of the crate for which the tracer is requested.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§