Attribute Macro observe_async

Source
#[observe_async]
Expand description

A procedural macro that automatically injects telemetry code into async functions that do not return a Result type.

This macro wraps async functions and adds instrumentation to measure:

  1. Latency - how long the function takes to execute
  2. Success counter - function completion count

ยงExample

use hyperactor_actor::observe_async;

#[observe_async("my_module")]
async fn process_data(data: &str) -> String {
    // Function implementation
    // Telemetry will be automatically collected
}