Skip to main content

Module afdata_tracing

Module afdata_tracing 

Source
Expand description

AFDATA-compliant tracing layer.

Outputs log events using agent-first-data’s render function:

  • JSON: single-line JSONL (secrets redacted, original keys)
  • Plain: single-line logfmt (keys stripped, values formatted)
  • YAML: multi-line, structure-preserving (original keys and values kept, secrets redacted)

Span fields are flattened into every event line (e.g. request_id). All other tracing features (macros, spans, EnvFilter) work unchanged.

§Usage

use agent_first_data::afdata_tracing;
use tracing_subscriber::EnvFilter;

afdata_tracing::try_init(EnvFilter::new("info"), LogFormat::Json, Redactor::new())?;

Structs§

AfdataLayer
A tracing Layer that outputs AFDATA-compliant log lines to stdout.

Enums§

LogFormat
Output format for the AFDATA tracing layer.

Functions§

try_init
Try to initialize tracing with AFDATA output.