iii-helpers 0.22.0

Shared helper primitives across iii SDKs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use iii_helpers::observability::OtelConfig;
use iii_helpers::observability::{flush_otel, init_otel, shutdown_otel};

#[tokio::test]
async fn init_otel_with_disabled_config_is_noop() {
    let cfg = OtelConfig {
        enabled: Some(false),
        ..Default::default()
    };
    let initialized = init_otel(cfg).await;
    assert!(!initialized, "disabled config should return false");
    flush_otel().await;
    shutdown_otel().await;
}