greentic-telemetry 0.4.6

Thin telemetry facade for Greentic: tracing/logging/metrics with OTLP + WASM.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use anyhow::Result;

use super::PresetConfig;

pub fn config() -> Result<PresetConfig> {
    let endpoint = std::env::var("OTLP_ENDPOINT")
        .ok()
        .filter(|s| !s.is_empty());

    Ok(PresetConfig {
        otlp_endpoint: endpoint,
        ..PresetConfig::default()
    })
}