telemetry-subscribers 0.4.1

Library for common telemetry and observability functionality
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

use tracing::{debug, info, warn};

fn main() {
    let _guard = telemetry_subscribers::TelemetryConfig::new("my_app")
        .with_env()
        .init();

    info!(a = 1, "This will be INFO.");
    debug!(a = 2, "This will be DEBUG.");
    warn!(a = 3, "This will be WARNING.");
    panic!("This should cause error logs to be printed out!");
}