Skip to main content

Module otel

Module otel 

Source
Expand description

Optional OpenTelemetry build-pipeline tracing (issue #422).

Compiles to an empty stub when the otel feature is off, so callers can always reference otel::init_if_enabled without #[cfg]-guarding every call site. OpenTelemetry build-pipeline tracing scaffolding (issue #422).

This module is intentionally a scaffold. The full deliverable ships in two phases:

  1. Phase A (this commit) โ€” otel Cargo feature, --trace CLI flag, an init_if_enabled initialiser that attaches a tracing-subscriber JSON formatter to stdout, and one demo span around pipeline::execute_build_pipeline via #[tracing::instrument].

  2. Phase B (deferred follow-up) โ€” per-plugin spans inside PluginManager::run_*, file-count + duration + peak-RSS delta fields, OTLP/gRPC + Jaeger exporter wiring, and a Grafana dashboard JSON. Phase B requires tokio to be introduced; the rest of SSG is rayon-based, so that architectural decision is deliberately deferred.

When the otel feature is off, this module compiles to an empty stub โ€” init_if_enabled is a no-op. Callers may invoke it unconditionally and it will simply do nothing.

Functionsยง

init_if_enabled
Initialises tracing if both: