Crate hyperactor_telemetry

Crate hyperactor_telemetry 

Source

Re-exports§

pub use opentelemetry;
pub use tracing;

Modules§

env
in_memory_reader
recorder
sinks
Exporters for the unified telemetry layer. Each exporter implements the TraceExporter trait and handles writing events to a specific backend (SQLite, Scuba, glog, etc).
sqlite
task
trace
trace_dispatcher
Unified telemetry layer that captures trace events once and fans out to multiple exporters on a background thread, eliminating redundant capture and moving work off the application thread.

Macros§

context_span
Create a context span at ERROR level with skip_record enabled. This is intended to create spans whose only purpose it is to add context to child events; the span itself is never independently recorded.
declare_observable_gauge
Create a thread safe static observable gauge that can be set to a specific value based on the provided callback. This is useful for metrics that need to be calculated or retrieved dynamically. The callback will be executed whenever the gauge is observed by the metrics system.
declare_static_counter
Create a thread safe static counter that can be incremeneted or decremented. This is useful to avoid creating temporary counters. You can safely create counters with the same name. They will be joined by the underlying runtime and are thread safe.
declare_static_gauge
Create a thread safe static gauge that can be set to a specific value. This is useful to avoid creating temporary gauges. You can safely create gauges with the same name. They will be joined by the underlying runtime and are thread safe.
declare_static_histogram
Create a thread safe static histogram that can be incremeneted or decremented. This is useful to avoid creating temporary histograms. You can safely create histograms with the same name. They will be joined by the underlying runtime and are thread safe.
declare_static_timer
Create a thread safe static timer that can be used to measure durations. This macro creates a histogram with predefined boundaries appropriate for the specified time unit. Supported units are “ms” (milliseconds), “us” (microseconds), and “ns” (nanoseconds).
declare_static_up_down_counter
Create a thread safe static counter that can be incremeneted or decremented. This is useful to avoid creating temporary counters. You can safely create counters with the same name. They will be joined by the underlying runtime and are thread safe.
key_value
Create key value pairs for use in opentelemetry. These pairs can be stored and used multiple times. Opentelemetry adds key value attributes when you bump counters and histograms. so MY_COUNTER.add(42, &[key_value!(“key”, “value”)]) and MY_COUNTER.add(42, &[key_value!(“key”, “other_value”)]) will actually bump two separete counters.
kv_pairs
Construct the key value attribute slice using mapping syntax. Example:
spawn

Structs§

DefaultTelemetryClock
Key
The key part of attribute KeyValue pairs.
KeyValue
A key-value pair describing an attribute.
Level
Describes the level of verbosity of a span or event.
TelemetrySample
Timer
TimerGuard

Enums§

TimeUnit
Value
The value part of attribute KeyValue pairs.

Constants§

MAST_HPC_JOB_NAME_ENV
skip_record
A marker field used to indicate that a span should not be recorded as individual start/end span events; rather the span is purely used to provide context for child events.

Traits§

TelemetryClock
TelemetryTestHandle

Functions§

initialize_logging
Set up logging based on the given execution environment. We specialize logging based on how the logs are consumed. The destination scuba table is specialized based on the execution environment. mast -> monarch_tracing/prod devserver -> monarch_tracing/local unit test -> monarch_tracing/test scuba logging won’t normally be enabled for a unit test unless we are specifically testing logging, so you don’t need to worry about your tests being flakey due to scuba logging. You have to manually call initialize_logging() to get this behavior.
initialize_logging_for_test
testing
initialize_logging_with_log_prefix
Set up logging based on the given execution environment. We specialize logging based on how the logs are consumed. The destination scuba table is specialized based on the execution environment. mast -> monarch_tracing/prod devserver -> monarch_tracing/local unit test -> monarch_tracing/test scuba logging won’t normally be enabled for a unit test unless we are specifically testing logging, so you don’t need to worry about your tests being flakey due to scuba logging. You have to manually call initialize_logging() to get this behavior.
initialize_logging_with_log_prefix_mock_scuba
log_file_path
meter
Creates a named [Meter] via the currently configured global [MeterProvider].
recorder
The recorder singleton that is configured as a layer in the the default tracing subscriber, as configured by initialize_logging.
swap_telemetry_clock
Hotswap the telemetry clock at runtime. This allows changing the clock implementation after initialization, which is useful for testing or switching between real and simulated time.
username