Skip to main content

Crate valence_telemetry

Crate valence_telemetry 

Source
Expand description

Valence self-telemetry port.

Audience: integrators installing metrics at boot and adapter authors implementing custom sinks.

Structs§

ConsoleSink
Writes telemetry to stderr (development and bench).
NoOpSink
Discards all telemetry (default for tests and minimal hosts).
RecordedCounter
Captured counter increment.
RecordedEvent
Captured structured log event.
RecordedGauge
Captured gauge sample.
RecordingSink
Append-only in-memory sink for assertions in unit and integration tests.

Traits§

TelemetrySink
Host-injectable telemetry sink for Valence ORM metrics and events.

Functions§

install_telemetry_sink
Install the process-wide Valence telemetry sink (tests and host boot).
json_value_to_fields
Flatten a JSON object into string field pairs for sinks that only store tuples.
telemetry_sink
Current sink, or NoOpSink when none is installed.
try_log_event
Emit a structured event from flat field tuples.
try_log_event_value
Emit a structured event from a JSON payload (instrumentation default).
try_record_counter
Emit a counter when a sink is installed.
try_record_gauge
Emit a gauge when a sink is installed.