Set Up

Learn how to set up Sentry's Application Metrics using our supported SDKs.

To set up Sentry's Application Metrics, use the links below for supported SDKs. After it's been set up, you'll be able to send counters, gauges, and distributions from your code and view them in Sentry with direct links to related traces.

We're actively working on adding Application Metrics support to additional SDKs:

  • Rust

If you don't see your platform listed above, please reach out to us on GitHub or Discord and we'll get it prioritized.

Use descriptive, dot-separated names that indicate the metric's purpose:

  • Good: checkout.failed, email.sent, queue.depth
  • Avoid: metric1, counter, x

Add attributes to to query metrics like:

  • sum(api.request) grouped by endpoint
  • sum(api.request) where status:500
  • sum(api.request) grouped by region where method:POST

Always specify units for clarity:

  • Time: millisecond, seconds
  • Size: byte, kilobyte, megabyte

Add metrics at key decision points in your code:

  • Before/after critical operations: Track success and failure rates
  • At service boundaries: Monitor external API calls, database queries
  • Business logic: Capture important business events
  • Resource usage: Track queue depths, connection pools, cache sizes
Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").