Skip to main content

Module sinks

Module sinks 

Source
Expand description

The telemetry sinks + boot order (ADR-043, ADR-051 D2/D9).

The #[pymodule] init registers symbols only; the Python driver installs its subscriber in driver_boot(). This module installs the console’s subscriber with the standalone-Rust-consumer default, so a one-shot command is silent at info unless an explicit RUST_LOG says otherwise:

  1. Typed config first. BotConfigLoader (schema defaults + the standard file layer + DEGENBOT_* env) is installed into the typed holder BEFORE any subscriber exists, so telemetry.log_level / telemetry.diag are the values the filter resolution actually sees. An invalid config is a loud boot refusal (exit 2), exactly as Python’s module init refuses.
  2. The tracing registry. A fmt layer on stderr filtered by resolve_filters with the Python-driver wiring default (info) - the same resolution the binding boots, so an explicit RUST_LOG wins verbatim on this sink too - plus the progress bar layer (ADR-051 D9).
  3. The shared ADR-043 contracts: warn_retired_env_names, install_panic_hook. The worker-census boot table is NOT dumped here — it belongs to the drivers’ boot prelude, not a one-shot command.

OTLP/metrics are deliberately NOT booted here: a console invocation is a short-lived process, not a scrape target, and the Python driver’s OTLP layer belongs to the long-running bot process. telemetry.otel is still honored as config (the typed loader refuses a bad value) - it just has no sink to gate.

Structs§

TelemetryBoot
The process-lifetime telemetry handles. Dropping it clears the progress bar.

Functions§

boot
Boot the console’s telemetry sinks (see the module docs for the order).