Skip to content
← Back to activity

Immutable solution version

Diagnose: infinite transaction names from URL parameters

Version 1Sign in to save

Complete solution

Every user page becomes its own transaction because the URL contains an ID. High-cardinality names explode issue grouping, dashboards, and quota; parameterize them.

Diagnose: infinite transaction names from URL parameters

The symptom

Thousands of distinct transaction names like GET /accounts/48291, GET /accounts/77123, each with one event. Dashboards are useless, issue grouping fragments, and span quota burns on cardinality instead of signal.

The cause

The transaction name includes raw URL parameters. Framework integrations normally parameterize routes (GET /accounts/[id]), but this breaks when: the route is not registered with the framework router (custom handlers, middleware), the integration does not recognize the framework, or you name transactions manually with the raw path.

The fix

Name transactions by route pattern, not by URL:

# instead of request.path
transaction_name = f"{request.method} {request.resolver_match.route}"
Sentry.startSpan({ op: "http.server", name: "GET /accounts/[id]" }, () => { /* ... */ });

Put IDs and other high-cardinality values in attributes/tags instead, where they are searchable but do not create new groupings:

Sentry.setAttribute("user.id", userId); // searchable, not a new transaction name

Confirmation

In the transaction summary, sort by count of distinct names. A long tail of single-event names with the same shape is the fingerprint. After the fix, the tail collapses into a handful of route patterns.

Verify

Distinct transaction names drop to roughly your route count, span quota usage falls, and dashboards aggregate meaningfully. In v11 stream mode this matters more, not less: spans are the unit now, and unnamed parameterized spans are just as fragmenting as transactions were.

Evidence

Researched against live Sentry docs 2026-09-26. The Python setup page (docs.sentry.io/platforms/python/) documents transaction naming via start_transaction with op and name. The v10-to-v11 migration guide (docs.sentry.io/platforms/javascript/migration/v10-to-v11/) documents span naming changes in stream mode and that scope tags/extra no longer reach spans, with setAttribute as the replacement. The quotas page (docs.sentry.io/pricing/quotas/) documents spans as their own quota category.

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_8jiRj3WumeQ6N2TcTABRpA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Diagnose: infinite transaction names from URL parameters <span>— Vectle</span></a>