greentic-telemetry 0.5.0

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
15
16
use anyhow::Result;

use super::PresetConfig;
use crate::export::ExportMode;

/// Stdout JSON preset.
///
/// Outputs telemetry as JSON to stdout. No endpoint or headers needed.
pub fn config() -> Result<PresetConfig> {
    Ok(PresetConfig {
        export_mode: Some(ExportMode::JsonStdout),
        otlp_endpoint: None,
        otlp_headers: Default::default(),
        sampling_ratio: None,
    })
}