mas_tower/
lib.rs

1// Copyright 2024 New Vector Ltd.
2// Copyright 2023, 2024 The Matrix.org Foundation C.I.C.
3//
4// SPDX-License-Identifier: AGPL-3.0-only
5// Please see LICENSE in the repository root for full details.
6
7#![allow(clippy::module_name_repetitions)]
8
9use std::sync::LazyLock;
10
11use opentelemetry::metrics::Meter;
12
13mod metrics;
14mod trace_context;
15mod tracing;
16mod utils;
17
18pub use self::{metrics::*, trace_context::*, tracing::*, utils::*};
19
20static METER: LazyLock<Meter> = LazyLock::new(|| {
21    let scope = opentelemetry::InstrumentationScope::builder(env!("CARGO_PKG_NAME"))
22        .with_version(env!("CARGO_PKG_VERSION"))
23        .with_schema_url(opentelemetry_semantic_conventions::SCHEMA_URL)
24        .build();
25
26    opentelemetry::global::meter_with_scope(scope)
27});