Skip to main content

Module telemetry_schema

Module telemetry_schema 

Source
Expand description

Canonical telemetry schema for the FrankenTUI runtime (bd-17ar5).

Defines the unified vocabulary of tracing targets, event names, metric names, and structured field contracts used across the runtime, effect system, subscription manager, and harness infrastructure.

§Purpose

Without a shared schema, telemetry becomes fragmented across modules. This module provides:

  • Named constants for tracing targets (e.g., TARGET_RUNTIME)
  • Canonical event names for structured log correlation
  • Metric name constants for counter/gauge telemetry
  • A schema manifest for validation and documentation

§Usage

ⓘ
use ftui_runtime::telemetry_schema::{TARGET_RUNTIME, event};

tracing::info!(
    target: TARGET_RUNTIME,
    event = event::RUNTIME_STARTUP,
    "runtime started"
);

Modules§

decision
Point-in-time decision event names (section 3.3 of the spec).
event
Structured event names emitted by the runtime.
field
Common structured field names used in tracing spans and events.
metric
Monotonic counter and gauge metric names.
span
Names of the tracing spans the runtime opens (see docs/spec/telemetry-events.md, sections 3.1 and 3.2). Every info_span! / debug_span! site uses these constants; the no_stray_target_literals test keeps it that way.

Constants§

ALL_DECISIONS
Complete list of registered decision event names.
ALL_EVENTS
Complete list of registered event names.
ALL_METRICS
Complete list of registered metric names.
ALL_SPANS
Complete list of registered span names.
ALL_TARGETS
Complete list of registered tracing targets.
SCHEMA_VERSION
Schema version for forward compatibility.
TARGET_A11Y
Accessibility: per-frame tree diffs and screen-reader announcements (emitted only when ProgramConfig::accessibility is set).
TARGET_BOCPD
Bayesian online change-point detection.
TARGET_EFFECT
Effect/command execution and queue telemetry.
TARGET_EPROCESS
E-process throttle decisions.
TARGET_GUARDRAILS
Frame guardrails (memory / effect-queue budgets): soft trims, emergency frame drops.
TARGET_PROCESS
Process subscription lifecycle (spawn, exit, restart).
TARGET_RESIZE
Resize coalescer decisions.
TARGET_RUNTIME
Runtime lifecycle events (startup, shutdown, lane resolution).
TARGET_RUNTIME_LOG
Terminal log emission policy and byte counts.
TARGET_VOI
Value-of-information sampling decisions.