Type Alias opentelemetry_sdk::Scope
source · pub type Scope = InstrumentationLibrary;
Expand description
A logical unit of the application code with which the emitted telemetry can be associated.
Aliased Type§
struct Scope {
pub name: Cow<'static, str>,
pub version: Option<Cow<'static, str>>,
pub schema_url: Option<Cow<'static, str>>,
pub attributes: Vec<KeyValue>,
}
Fields§
§name: Cow<'static, str>
The library name.
This should be the name of the crate providing the instrumentation.
version: Option<Cow<'static, str>>
The library version.
§Examples
let library = opentelemetry::InstrumentationLibrary::builder("my-crate").
with_version(env!("CARGO_PKG_VERSION")).
with_schema_url("https://opentelemetry.io/schemas/1.17.0").
build();
schema_url: Option<Cow<'static, str>>
Schema url used by this library.
attributes: Vec<KeyValue>
Specifies the instrumentation scope attributes to associate with emitted telemetry.