Skip to main content

telemetry

Function telemetry 

Source
pub async fn telemetry() -> Result<Telemetry, Error>
Expand description

Waits for the app to settle and returns the Telemetry recorded for the current test, including all service spans, inter-service requests, Pub/Sub deliveries, queries, and log lines.

Inspect spans via Span::what and the helper filters on Telemetry:

ⓘ
let recorded = system::telemetry().await?;
assert_eq!(recorded.requests().service("catalog").count(), 1);
assert!(recorded.deliveries().all(|d| matches!(d.what, What::Delivery { handled: true, .. })));
assert_eq!(recorded.errors(), Vec::<String>::new());

Telemetry::render formats the same trace tree printed on test failure, and Telemetry::shape strips run-specific values for snapshot testing.