Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

We’re introducing Metrics that let you send counters, gauges, and distributions from your code to track things like email.sent, checkout.failed, or queue.depth — and pivot directly into the related traces, logs, and errors when something looks off.

TraceConnectedMetrics.mp4

Get started with sending metrics from JavaScript or Python projects with these docs: https://docs.sentry.io/product/explore/metrics/getting-started/

Why we built this

Metrics in most tools stop at charts — they show that something changed, but not why. When a checkout.failed counter spikes, you’re forced to switch tools and manually line up logs or traces to find the cause.

With Sentry, every metric event carries a trace_id.

That means you can:

  • click into a sample and see the exact trace that produced the metric,
  • open the related spans, logs, and errors,
  • understand why the metric moved — slow database query, failed API call, bad deploy, etc.

So instead of “metric alert → guesswork,” debugging becomes a single flow: Metric spike → open a sample → trace waterfall → root cause.

How the UX works

image

Aggregates tab shows trends and totals across any attributes (e.g. sum(metrics_value) grouped by email_type).

image

Samples tab shows individual metric events with direct links to their trace — so you can jump straight into the logs, spans, and errors that occurred at the same moment. Allowing you to drill into any spikes or dips in your metrics and find relevant errors,traces or logs to look at.

How to get started

If you'd like access please comment with your org slug below or drop us a note at feedback-metrics@sentry.io

Python

You need to be on a min version of 2.43.0 of our Python SDKs

import sentry_sdk
from sentry_sdk import metrics

sentry_sdk.init(
    dsn="___PUBLIC_DSN___",
    _experiments={
        "enable_metrics": True,
    },
)
metrics.count("checkout.failed", 1, attributes={"route": "/checkout", "tenant": "acme"})
metrics.gauge("queue.depth", 42, attributes={"queue": "emails"})
metrics.distribution("cart.amount_usd", 187.5, attributes={"currency": "USD", "tenant": "acme"})

More details: getsentry/sentry-python#5042

JavaScript

You need to be on a min version of 10.20.0 for our JavaScript SDKs

Sentry.init({
  dsn: '<your-dsn>',
  _experiments: { enableMetrics: true },
});

// Counter — increment a metric (defaults to +1)
Sentry.metrics.count('checkout.failed', 1, {
  attributes: {
    route: '/checkout',
    tenant: 'acme',
    provider: 'stripe',
  },
});

// Gauge — set a current value
Sentry.metrics.gauge('queue.depth', 42, {
  unit: 'items',
  attributes: {
    queue: 'emails',
    region: 'us-east-1',
  },
});

// Distribution — record numeric values to compute p95, avg, sum, etc.
Sentry.metrics.distribution('cart.amount_usd', 187.5, {
  unit: 'usd',
  attributes: {
    currency: 'USD',
    tenant: 'acme',
  },
});

Each metric event includes:

  • name, kind, value, attributes
  • trace_id, span_id → used to link with other telemetry
  • optional unit, byte_size

More details: getsentry/sentry-javascript#18055

When (and why) to use Metrics

Metrics are best for application and code based health signals — numeric indicators of whether your application logic is behaving as expected.

You should reach for metrics when you want to quantify what your code is doing

Examples:

  • email.sent / email.failed
  • job.processed / job.retried
  • checkout.started / checkout.failed
  • payment.declined / refund.issued
  • queue.depth / pool.in_use
  • search.zero_results

Feedback

We’re working on shipping Alerts, Saved Queries and dashboard widget building support very soon

We’d love to hear your feedback about the following

  • Are the SDK APIs easy enough to send your desired metrics ?
  • Any feedback about the Metrics Explorer UX - What could make this a better experience for you ?
  • Any default metrics that you’d like Sentry to send automatically
You must be logged in to vote

Replies: 45 comments · 72 replies

Comment options

@Dhrumil-Sentry We would like to try this out
This is our sentry org url https://gohighlevel.sentry.io/

You must be logged in to vote
7 replies
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 7, 2025
Maintainer Author

@mohitpatel-ghl - That was a bug in the copy we're showing - It's supported for all JS platforms - please see the SDK instructions here: getsentry/sentry-javascript#18055

@mohitpatel-ghl
Comment options

Any default metrics that you’d like Sentry to send automatically
@Dhrumil-Sentry

We want to track the heap memory consumption, sometimes on users side page is becomes unresponsive or crashes due to excessing memory consumption.
We already have the logic on our code which computes memory at every certain interval, i'm just thinking if this metric feature could be a good approach to log it to sentry & then analyze it over there. Any suggestions over here in respect to metrics feautre

@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 10, 2025
Maintainer Author

@mohitpatel-ghl Given you already have the logic to compute this - you can add this as a distribution metric so that you can track the p50,p90 of memory consumption across users. Def a good use case for metrics

@mohitpatel-ghl
Comment options

And @Dhrumil-Sentry does this metrics feature depends on any sampling like trace sampling rate or any other. Because sometimes we observed that all data is not being logged on dashboard

@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 12, 2025
Maintainer Author

@mohitpatel-ghl the trace sample rate only applies to spans and not to these metrics. There can be a few mins of delay in us ingesting metrics and making them available to query. You can also go to the Stats page in the Org settings and select Metrics and confirm nothing was dropped on our server side.

If you still think any data is being dropped - Can you please open an issue here: https://github.com/getsentry/sentry-javascript/issues - we'd need a few more details from you to be able to debug

Comment options

stan-yz please! This came just in time.

You must be logged in to vote
1 reply
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 6, 2025
Maintainer Author

@eddie-at-stan you should have access now -Would love to hear any feedback !

Comment options

I'd love to try this! Our org slug is scorecard

You must be logged in to vote
1 reply
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 7, 2025
Maintainer Author

@TwoTau You should have access now

Here's the JS: getsentry/sentry-javascript#18055 and Python: getsentry/sentry-python#5042 SDK instructions

Please let us know if you hit any friction

Comment options

Will you support high cardnality attribute values - user id, tenant id, etc.? What will you consider as a billable metric item?
Would love to try this 🤩 . Our org slug is spectaflow.

You must be logged in to vote
1 reply
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 7, 2025
Maintainer Author

@pshomov We're using a high volume event store for this solution - So we can definitely support high cardinality values like user_id etc.

We don't know pricing details yet but there will be no charge to using these Metrics while we're on Open Beta for a few months atleast.

I will say that the solution is mean to help developers track metrics with high cardinality tags and we're more likely to restrict how many attributes you could attach vs causing a cost explosion due to high cardinality - But all of this is TBD and we'd appreciate any feedback

Your org has access now. Here's the JS: getsentry/sentry-javascript#18055 and Python: getsentry/sentry-python#5042 SDK instructions

Any feedback appreciated !

Comment options

Exactly what we need right now! Great timing with the availability. navi-ventures as the slug

You must be logged in to vote
1 reply
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 7, 2025
Maintainer Author

@matt-roberts-navi Your org has access now. Here's the JS: getsentry/sentry-javascript#18055 and Python: getsentry/sentry-python#5042 SDK instructions . Let us know what you think !

Comment options

Hey, really excited to read this is available – we'd love to try this out.
Our Sentry org URL is https://oddboxhq.sentry.io – let me know if you need anything else!

You must be logged in to vote
4 replies
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 7, 2025
Maintainer Author

@leoht Your org has access now. Here's the JS: getsentry/sentry-javascript#18055 and Python: getsentry/sentry-python#5042 SDK instructions. Let me know if you hit any snags

@leoht
Comment options

Great thanks! Will give it a try

@leoht
Comment options

@Dhrumil-Sentry Just tried to implement a few metrics (using the Python SDK), though it seems they're not showing up in the UI at all. I'm still only able to see the default landing page with the tutorial/demo, though I'm able to see the corresponding trace in the UI.

What's the best way to give feedback on this one? Happy to open an issue

@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 7, 2025
Maintainer Author

@leoht Can you please leave a comment on the Python SDK discussion with an example of a metric you're sending with the SDK: getsentry/sentry-python#5042

We'd need the version of the SDK you're using as well 🙏 - Thanks a lot for sharing feedback

Comment options

I would like to try with kylan-ph org slug. Thanks!

You must be logged in to vote
4 replies
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 9, 2025
Maintainer Author

@KyGuy2002 Your org has access now. Here's the JS: getsentry/sentry-javascript#18055 and Python: getsentry/sentry-python#5042 SDK instructions .

@KyGuy2002
Comment options

Thank you! Does this not work with the cloudflare sdk yet? Im not seeing the method on "@sentry/cloudflare": "^10.23.0" but I do see it on "@sentry/react": "^10.23.0"

@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 10, 2025
Maintainer Author

@KyGuy2002 - thanks for the catch - We need to export these changes from the Cloudflare side - We'll do this very soon

@KyGuy2002
Comment options

Ok sounds good. Thanks for the response.

Comment options

Hello, we would like to try the beta. Slug is dealzone. Thanks!

You must be logged in to vote
1 reply
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 9, 2025
Maintainer Author

@lirigithub Your org has access now. Here's the JS: getsentry/sentry-javascript#18055 and Python: getsentry/sentry-python#5042 SDK instructions .

Let us know if you have any feedback or face any troubles

Comment options

Perfect timing for this feature! We would love to try: homa-ej.

You must be logged in to vote
1 reply
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 10, 2025
Maintainer Author

@EandrewJones Your org should have access now - Please find the JS/Python instructions here:

https://docs.sentry.io/platforms/javascript/guides/nextjs/metrics/
https://docs.sentry.io/platforms/python/metrics/

Let us know if you have any trouble getting started !

Comment options

we would love to try the beta! slug is nexus-ai-0s. Thanks!!

You must be logged in to vote
1 reply
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 10, 2025
Maintainer Author

@idobenamram Your org should has access- Please find the JS/Python instructions here:

https://docs.sentry.io/platforms/javascript/guides/nextjs/metrics/
https://docs.sentry.io/platforms/python/metrics/

Would love to hear any feedback about the UX/SDK experience once you try this 🙏

Comment options

nice! could we try out the beta at foil? 🙏 (using the Node.js lib)

You must be logged in to vote
1 reply
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 10, 2025
Maintainer Author

@mjlescano Your org should has access- Please find the JS/Python instructions here:

https://docs.sentry.io/platforms/javascript/guides/nextjs/metrics/
https://docs.sentry.io/platforms/python/metrics/

Let us know if you hit any snags

Comment options

Would love to try it out! The org is datascenes. Thank you!

You must be logged in to vote
1 reply
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 11, 2025
Maintainer Author

@olena-gurushots Your org should has access- Please find the JS/Python instructions here:

https://docs.sentry.io/platforms/javascript/guides/nextjs/metrics/
https://docs.sentry.io/platforms/python/metrics/

Let us know if you hit face any troubles

Comment options

I really need this, my Organization Slug is teable

You must be logged in to vote
1 reply
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 11, 2025
Maintainer Author

@boris-w Your org should has access- Please find the JS/Python instructions here:

https://docs.sentry.io/platforms/javascript/guides/nextjs/metrics/
https://docs.sentry.io/platforms/python/metrics/

Any feedback is appreciated

Comment options

Requesting access for https://clemann-developments.sentry.io please

You must be logged in to vote
1 reply
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 12, 2025
Maintainer Author

@ClemannD You should have access. Please see these docs to get started: https://docs.sentry.io/platforms/javascript/guides/nextjs/metrics/

Let us know if you hit any snags

Comment options

We really want to try this out. Can we please get access for the organization truva?

You must be logged in to vote
2 replies
@gaurav-peswani-truva
Comment options

Also are the metric examples mentioned in the description the only supported values or we can send any key as desired? We are planning to use this for sending Prisma metrics mentioned at https://www.prisma.io/docs/orm/prisma-client/observability-and-logging/metrics.

@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 12, 2025
Maintainer Author

@gaurav-peswani-truva You should have access. Please see these docs to get started: https://docs.sentry.io/platforms/javascript/guides/nextjs/metrics/

You can send any counter/gauge/distribution type metric using the Sentry SDK - the examples I mentioned are only representative

Let us know if you hit any snags

Comment options

This is not yet available for self-hosted instances, right?

You must be logged in to vote
1 reply
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 24, 2025
Maintainer Author

@abriginets it's not available for self hosted yet - It will be when this is generally available to all customers

Comment options

Can we have access to it?
Slug: lh-innovationhub

You must be logged in to vote
1 reply
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Dec 5, 2025
Maintainer Author

@fguillen Sorry for the late reply! You should already have access - Here are the docs to get started: https://docs.sentry.io/product/explore/metrics/getting-started/

What type of metrics do you want to track ?

Comment options

Hey, @Dhrumil-Sentry Metrics we can send , what is the price for this feature.
wanted to mention we are using the cloud version (saas) with plan of $29.

You must be logged in to vote
1 reply
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 28, 2025
Maintainer Author

@sakibalig - This SKU is currently in Beta and there is no charge to using this while we're in Open Beta which will be for a few months atleast.

We don't have pricing nailed down yet but we won't have a model where adding more cardinality blows up your costs - We'll give adequate notice before the Open Beta period ends

Comment options

We were using this in the alpha and was soo helpful,
can we have it enabled again:
our slug in the sentry cloud is 'leia'

You must be logged in to vote
1 reply
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Nov 28, 2025
Maintainer Author

@LeonRueda You should have access, Please see these docs to gets started: https://docs.sentry.io/product/explore/metrics/getting-started/

What type of metrics are you tracking ?

Comment options

Looks great!

Would love to try it out, assuming there is support in the Ruby SDK. 💎

You must be logged in to vote
1 reply
@AbhiPrasad
Comment options

We don't have Ruby SDK support just yet, please subscribe to this GH issue to know when we'll add support for that: getsentry/sentry-ruby#2776

Comment options

This seems really nice, can we have access? https://lastmilesolutions.sentry.io/

You must be logged in to vote
3 replies
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Dec 1, 2025
Maintainer Author

@corneliusvanerkelens You should have access - but currently we support Python and Browser JavaScript platforms only - We're working on supporting more SDKs and you can track that here: https://docs.sentry.io/product/explore/metrics/getting-started/#upcoming-sdks

@corneliusvanerkelens
Comment options

Thanks! It should already be available in the php SDK itself right? https://github.com/getsentry/sentry-php/releases/tag/4.19.0

@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Dec 2, 2025
Maintainer Author

@corneliusvanerkelens - Yes the team is just working on the docs for Laravel and Symfony but the PHP docs are here: https://docs.sentry.io/platforms/php/metrics/

Comment options

Our slug is abra-hospitality – would love to try it.

You must be logged in to vote
1 reply
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Dec 2, 2025
Maintainer Author

@r0zar you should have access, Here are the docs to gets started: https://docs.sentry.io/product/explore/metrics/getting-started/

Comment options

Hey @Dhrumil-Sentry, we'd love to try metrics. Our org slug is newplay. We're tracking Node and React Native.

You must be logged in to vote
1 reply
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Dec 4, 2025
Maintainer Author

@zerefel You should have access - We support Node already but React Native support is being worked on.

Here are the docs: https://docs.sentry.io/product/explore/metrics/getting-started/#javascript

Comment options

Hi All,

We now support sending Metrics using PHP, Laravel and Symfony SDKs ! Check our docs to get started: https://docs.sentry.io/product/explore/metrics/getting-started/#php

You must be logged in to vote
0 replies
Comment options

Will be a way to backfill metrics data from an existing source?
Some use-cases:

  • Migrate data from another source like prometheus, posthog, amplitude, etc.
  • Adding metrics to existing features, example: We start collect checkout.completedmetric at Dec 05, but we have a lot of checkout completed before this data.
You must be logged in to vote
2 replies
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Dec 5, 2025
Maintainer Author

@LeonanFragaLeonardo - We're currently focussed on ensuring we have the necessary features like alerting and dashboards ready + support from more our SDK platforms

We're tracking interest for an OTLP Metrics drain in this issue : #103487 - would this help you migrate data ?

Wrt backfilling data - when events hit our server they all have the current timestamp and we've never supported backfills of these sorts before - but I'll discuss this with the team too

@smeubank
Comment options

https://supabase.com/docs/guides/telemetry/metrics

would be interested to have the ability to scrap prometheus compatible metrics from Supabase directly, and have a template dashboard similar to this grafana json we provide. They wouldn't be trace connected, but it would be an readily applicable solution

Comment options

Requesting Metrics access

Org slug: paytrie

Use case: Tracking CPN (Circle Payments Network) payment route availability and quote errors by destination country/currency.

SDK: @sentry/react v10.25.0

You must be logged in to vote
1 reply
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Dec 8, 2025
Maintainer Author

@ChinmayGopal931 you should have access - Please see these docs to get started: https://docs.sentry.io/product/explore/metrics/getting-started/

Let us know if you hit any friction

Comment options

@Dhrumil-Sentry sign me up!! slug: qliktechnologies

You must be logged in to vote
1 reply
@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Dec 10, 2025
Maintainer Author

@wichopy We've not rolled this out to customers on Enterprise plans since it's still in Beta - Your account CSM will soon be reaching out to you with more details 🙏

Comment options

@Dhrumil-Sentry we'd would like to try this out too. our org is 'solv-health-4m'. We are on the latest nodejs SDK and are sending events to test it, but I don't see metrics on the UI yet.

You must be logged in to vote
3 replies
@maddalax
Comment options

ah just realized we are on an enterprise plan, assuming we can't be enrolled then?

@Dhrumil-Sentry
Comment options

Dhrumil-Sentry Dec 10, 2025
Maintainer Author

@maddalax I've informed your CSM and they'll reach out to you but we generally don't roll out Beta features to Enterprise plans since things are still being actively worked on

@maddalax
Comment options

Sounds good, our company is pretty small / agile, I imagine we'd be fine with it even if it's beta. Thanks, will chat with them

Comment options

my organization: dorianmariecom, thanks, would love to try

You must be logged in to vote
0 replies
Comment options

Can we try this out please? Our org slug is innoved-learning

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Morty Proxy This is a proxified and sanitized view of the page, visit original site.