Metrics (Trace Connected) in Open Beta #102275
Replies: 77 comments 120 replies
-
|
@Dhrumil-Sentry We would like to try this out |
Beta Was this translation helpful? Give feedback.
-
|
|
Beta Was this translation helpful? Give feedback.
-
|
I'd love to try this! Our org slug is |
Beta Was this translation helpful? Give feedback.
-
|
Will you support high cardnality attribute values - user id, tenant id, etc.? What will you consider as a billable metric item? |
Beta Was this translation helpful? Give feedback.
-
|
Exactly what we need right now! Great timing with the availability. navi-ventures as the slug |
Beta Was this translation helpful? Give feedback.
-
|
Hey, really excited to read this is available – we'd love to try this out. |
Beta Was this translation helpful? Give feedback.
-
|
I would like to try with |
Beta Was this translation helpful? Give feedback.
-
|
Hello, we would like to try the beta. Slug is dealzone. Thanks! |
Beta Was this translation helpful? Give feedback.
-
|
Perfect timing for this feature! We would love to try: |
Beta Was this translation helpful? Give feedback.
-
|
we would love to try the beta! slug is nexus-ai-0s. Thanks!! |
Beta Was this translation helpful? Give feedback.
-
|
nice! could we try out the beta at |
Beta Was this translation helpful? Give feedback.
-
|
Would love to try it out! The org is |
Beta Was this translation helpful? Give feedback.
-
|
I really need this, my Organization Slug is |
Beta Was this translation helpful? Give feedback.
-
|
Requesting access for https://clemann-developments.sentry.io please |
Beta Was this translation helpful? Give feedback.
-
|
We really want to try this out. Can we please get access for the organization |
Beta Was this translation helpful? Give feedback.
-
|
Hello there! Is there a way to test this feature in a self-hosted deployment? Cheers |
Beta Was this translation helpful? Give feedback.
-
|
Are there any updates around the Rust SDK? getsentry/sentry-rust#938 doesn't mention anything and there also doesn't seem to be any activity on the PRs. |
Beta Was this translation helpful? Give feedback.
-
|
Are there any updates on when Metric Alerts will be available? |
Beta Was this translation helpful? Give feedback.
-
|
|
Beta Was this translation helpful? Give feedback.
-
|
Usage quota and billing? Are they still TBD? What are we thinking of? Size ? Number? Event? 🤔 |
Beta Was this translation helpful? Give feedback.
-
|
Hi! We would love to test this at |
Beta Was this translation helpful? Give feedback.
-
|
Hi. I’m a little unsure on how “counters” work. Say I create a counter with the name |
Beta Was this translation helpful? Give feedback.
-
|
Can you enable for "thoughtexchange" please? Thank you! |
Beta Was this translation helpful? Give feedback.
-
|
hey, when this feature is expected to be rolled out, along with alerts? |
Beta Was this translation helpful? Give feedback.
-
|
The metric size limit is actually a bit annoying in practice. It prevents me from attaching useful stuff like db query plans or a db query itself to the metric (which the high cardinality nature of sentry metrics should allow me to do easily - I can add it to logs!). I can easily attach this info when I use sentry errors, tracing, or logs, so it feels weird when I can't do it with metrics. Right now I have to do something like so: /**
* This sends both a monitoring metric and a debug log for the duration of a data query.
* - The metric enables dashboards and alerts regarding query performance.
* - The debug log provides deeper context (like query plans and arguments) for investigating
* latency. Attaching large metadata directly to metrics often triggers size limit
* constraints (e.g., 2 KiB limits).
*/
function recordQueryDuration(
args: QueryArgs,
queryDurationMs: number,
response: Response | undefined = undefined,
) {
const attributes: Record<string, unknown> = {
"url.full": window.location.href,
"query.is_slow": queryDurationMs > 10000,
page: "query_explorer",
};
// Extract internal trace IDs from headers if present
const traceId = response?.headers?.get("x-provider-internal-trace-id");
if (traceId) {
attributes["provider.trace_id"] = traceId;
}
Sentry.metrics.distribution("analytics.query_duration_ms", queryDurationMs, {
unit: "millisecond",
attributes,
});
const logAttributes: Record<string, unknown> = {
...attributes,
"analytics.query_duration_ms": queryDurationMs,
};
// Add redacted query arguments to the log context
for (const [key, value] of Object.entries(redactQueryArgs(args))) {
logAttributes[`query.args.${key}`] = value;
}
// Extract and attach the execution plan if available
const queryPlan = response?.headers?.get("x-provider-query-plan");
if (queryPlan) {
logAttributes["query.plan"] = extractPlan(response);
}
Sentry.logger.debug("Data Provider Query", logAttributes);
}I know logs just give me the metric, but I want the nice UX. I guess the alternative would be to add numeric attributes from logs to the metrics views (but then I would want unit support!). |
Beta Was this translation helpful? Give feedback.
-
|
hello, I'd like to try this. slug is |
Beta Was this translation helpful? Give feedback.
-
|
Hi, Am planning to plot custom charts with my own sveltekit dashboard. Thanks |
Beta Was this translation helpful? Give feedback.
-
|
I think there a way
…On Mon, Mar 16, 2026, 10:39 AM Hari ***@***.***> wrote:
Hi all,
Am planning to plot custom charts with my own sveltekit dashboard.
is there a way to extract metrics data from my self-hosted sentry ?
Thanks
Hari
—
Reply to this email directly, view it on GitHub
<#102275 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/B7VALJGLS4EJPGZEDEYWEAL4Q7KV3AVCNFSM6AAAAACKPXAN3WVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMMJVGY4TAMQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
|
Hey, we've just started using Metrics and looking to pull the data out via the REST API. While Metrics are not listed in the docs, it is known by the API when I set the However, when playing around with various params, I just can't seem to get the data out. Stuck on this This is my request: Any help around getting the correctly formatted request would be super helpful. The most important is to get the |
Beta Was this translation helpful? Give feedback.
-
|
Ok, I'll take a look.
…On Mon, Mar 16, 2026, 8:47 AM Jackson Lewis ***@***.***> wrote:
Hey, we've just started using Metrics and looking to pull the data out via
the REST API. While Metrics are not listed in the docs
<https://docs.sentry.io/api/explore/query-explore-events-in-table-format/#:~:text=REQUIRED-,choices,-%3A>,
it is known bu the API when I set the dataset to "metrics".
However, when playing around with various params, I just can't seem to get
the data out. Stuck on this 400 response.
{
"detail": "Need at least one function"
}
This is my request: https://sentry.io/api/0/organizations/
<org>/events/?project=<project>&statsPeriod=24h&environment=dev&dataset=metrics
Any help around getting the correctly formatted request would be super
helpful. The most important is to get the value, and some custom
attributes I've setup.
—
Reply to this email directly, view it on GitHub
<#102275 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/B7VALJH7IVFYBXF3BNYRLJL4Q7ZXXAVCNFSM6AAAAACKPXAN3WVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMMJVHEYTAMI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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.failedcounter 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:
So instead of “metric alert → guesswork,” debugging becomes a single flow: Metric spike → open a sample → trace waterfall → root cause.
How the UX works
Aggregates tab shows trends and totals across any attributes (e.g. sum(metrics_value) grouped by email_type).
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
More details: getsentry/sentry-python#5042
JavaScript
You need to be on a min version of 10.20.0 for our JavaScript SDKs
Each metric event includes:
name,kind,value,attributestrace_id,span_id→ used to link with other telemetryunit,byte_sizeMore 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.failedjob.processed/job.retriedcheckout.started/checkout.failedpayment.declined/refund.issuedqueue.depth/pool.in_usesearch.zero_resultsFeedback
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
Beta Was this translation helpful? Give feedback.
All reactions