metry 0.1.1

All-in-one telemetry framework, based on tracing crate.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::future::Future;

use tracing_core::Subscriber;
use tracing_subscriber::{registry::LookupSpan, Layer};

/// Trait representing box wrapper for a telemetry layer.
/// Structs implementing [TracingLayer] are then used to store the layer
/// configuration and called to initialize the layer.
pub trait TelemetryLayerBuilder {
    /// Initialize the layer from provided config.
    fn layer<S>(
        self,
    ) -> impl Future<Output = Result<Box<dyn Layer<S> + Send + Sync + 'static>, String>> + Send
    where
        S: Subscriber + Send + Sync,
        for<'a> S: LookupSpan<'a>;
}