Skip to main content

slim_tracing/
lib.rs

1// Copyright AGNTCY Contributors (https://github.com/agntcy)
2// SPDX-License-Identifier: Apache-2.0
3
4//! Observability for the SLIM data plane.
5//!
6//! On **native** targets this provides the full OpenTelemetry + tracing-subscriber
7//! pipeline (logs, distributed traces, metrics).
8//!
9//! On **wasm32** targets a lightweight subscriber pipes tracing events to the
10//! browser console (`console.log` / `console.warn` / `console.error`). With the
11//! `otel_tracing` feature, W3C trace-context propagation is enabled for
12//! cross-service continuity (no OTLP export).
13
14#[cfg(not(target_arch = "wasm32"))]
15mod native;
16#[cfg(not(target_arch = "wasm32"))]
17pub use native::*;
18
19#[cfg(target_arch = "wasm32")]
20mod wasm;
21#[cfg(target_arch = "wasm32")]
22pub use wasm::*;