- Documentation
- Learning Hub
- Section 5 of 5 Correlate signals
A working example
Slide 2 of 5
A working example
Suppose you track request latency and want to find slow requests for specific users.
- Instead of
http_request_duration_seconds{user_id="u-48221", ...}, which creates a series per user per label combination, - keep the metric as
http_request_duration_seconds{service="checkout", env="prod"}, - and log each request with
user_idandrequest_idattached as structured metadata.
When latency spikes, the metric tells you where and when. Then you query the logs for that service and window, filtering by structured metadata: {app="checkout"} | user_id="u-48221". You keep full debugging detail without paying for it on every series.