actix_web_opentelemetry/middleware/mod.rs
1use opentelemetry::InstrumentationScope;
2
3#[cfg(feature = "metrics")]
4#[cfg_attr(docsrs, doc(cfg(feature = "metrics")))]
5pub(crate) mod metrics;
6pub(crate) mod route_formatter;
7pub(crate) mod trace;
8
9pub(crate) fn get_scope() -> InstrumentationScope {
10 InstrumentationScope::builder("actix-web-opentelemetry")
11 .with_version(env!("CARGO_PKG_VERSION"))
12 .with_schema_url(opentelemetry_semantic_conventions::SCHEMA_URL)
13 .build()
14}