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.
Browser JavaScript
Angular
Astro
AWS Lambda
Azure Functions
Bun
Cloudflare
Connect
Electron
Ember
Express
Fastify
Gatsby
Google Cloud Functions
Hapi
Hono
Koa
Nest.js
Node.js
Next.js
Nuxt
React
React Router
Remix
Solid
SolidStart
Svelte
SvelteKit
TanStack Start
Vue
Wasm
.NET
.NET for Android
.NET for iOS, macOS, and Mac Catalyst
ASP.NET
ASP.NET Core
AWS Lambda
Azure Functions
Blazor WebAssembly
Entity Framework
Microsoft.Extensions.Logging
Google Cloud Functions
log4net
MAUI
NLog
Serilog
Windows Forms
WinUI
WPF
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 byendpointsum(api.request)wherestatus:500sum(api.request)grouped byregionwheremethod: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").
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").