Crates.io | pepe-telemetry |
lib.rs | pepe-telemetry |
version | 0.2.2 |
source | src |
created_at | 2022-11-17 13:14:27.733467 |
updated_at | 2024-01-22 14:16:13.898378 |
description | Tracing tools for PepeTeam template application |
homepage | https://pepe.team |
repository | https://github.com/crypto-pepe/pepe-rs |
max_upload_size | |
id | 717218 |
size | 8,735 |
Pepe Telemetry can be initialized using envorment variables only or using RUST_LOG
environment variable with provided config.
RUST_LOG
is common environment variable to set log level. See docs here
Variable name | Required | Note |
---|---|---|
RUST_LOG_FORMAT |
No | Log format. Options: plain , json . Default: plain |
RUST_LOG_JAEGER_ENDPOINT |
No | Jaeger endpoint for logs exporting |
pepe_telemetry::init_subscriber_from_env();
tracing::info!("hello, pepe!");
let config = Config {
svc_name: "pepe_telemetry_example".to_string(),
format: Format::Plain,
jaeger_endpoint: None
};
let subscriber = pepe_telemetry::get_subscriber(&config);
pepe_telemetry::init_subscriber(subscriber);
tracing::info!("hello, pepe!");