#[observe_result]
Expand description
A procedural macro that automatically injects telemetry code into async functions that return a Result type.
This macro wraps async functions and adds instrumentation to measure:
- Latency - how long the function takes to execute
- Error counter - function error count
- Success counter - function completion count
ยงExample
use hyperactor_actor::observe_result;
#[observe_result("my_module")]
async fn process_request(user_id: &str) -> Result<String, Error> {
// Function implementation
// Telemetry will be automatically collected
}