Introducing Application Metrics: Track the signal, see the spike, jump to the trace
Blog post from Sentry
Sentry's newly launched Application Metrics offers a sophisticated method for tracking critical signals within applications, aiming to provide context and identify issues before they escalate into errors. This tool was pivotal in diagnosing a bug related to Session Replay, where replays failed in certain browsers after loading more than 1,000 video segments. Traditional approaches like spans and logs were inadequate due to their limitations in capturing outliers or maintaining structure over time. Application Metrics addresses these gaps by storing full events, including high-cardinality fields such as user and region, enabling detailed inquiries like identifying specific users affected by performance issues on different regions. The integration into the Sentry SDK requires minimal setup, and the metrics can be utilized in three primary forms: counters, distributions, and gauges, each with the ability to attach additional contextual attributes. This capability allows for a more comprehensive trace-connected debugging workflow, linking metrics to broader traces, logs, and errors, and facilitating targeted investigations for application health indicators, business KPIs, and resource utilization, while still acknowledging the distinct roles of metrics, errors, traces, and logs in application monitoring and debugging.