Skip to content

Conversation

@jaffrepaul
Copy link
Contributor

@jaffrepaul jaffrepaul commented Jan 29, 2026

Add tracesSampler with bot filtering and 30% user sampling

Filter out crawlers/bots while allowlisting AI agents at 100% for
docs consumption visibility. Real users sampled at 30% for high-traffic site.

Fixes DOCS-A4C

DESCRIBE YOUR PR

Tell us what you're changing and why. If your PR resolves an issue, please link it so it closes automatically.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

LEGAL BOILERPLATE

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

EXTRA RESOURCES

Add a tracesSampler function to drop spans from HeadlessChrome, bots,
crawlers, and other automated traffic. This prevents bot-induced span
throughput anomalies while maintaining 100% sampling for real users.

Fixes DOCS-A4C

Co-Authored-By: Claude <[email protected]>
@vercel
Copy link

vercel bot commented Jan 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment Jan 30, 2026 4:51pm
sentry-docs Ready Ready Preview, Comment Jan 30, 2026 4:51pm

Request Review

- Hoist bot patterns to module scope to avoid recreation on each trace
- Use single regex test instead of array iteration with includes()
- Add monitoring tool patterns: lighthouse, pagespeed, gtmetrix, pingdom, uptimerobot

Co-Authored-By: Claude <[email protected]>
Co-authored-by: Cursor <[email protected]>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

jaffrepaul and others added 2 commits January 29, 2026 14:56
Add allowlist for AI agents (ClaudeBot, GPTBot, Cursor, Codex, Copilot,
etc.) to ensure we have tracing data for agentic tools consuming our
markdown docs. These are checked before the bot filter so they won't
be dropped by the generic 'bot' pattern.

Co-Authored-By: Claude <[email protected]>
Co-authored-by: Cursor <[email protected]>
The generic 'bot' pattern incorrectly matched Cubot phone user agents
(e.g., "CUBOT GT99"), dropping traces for legitimate mobile users.
Replace with explicit bot names: googlebot, bingbot, slackbot, etc.

Co-Authored-By: Claude <[email protected]>
Co-authored-by: Cursor <[email protected]>
@jaffrepaul jaffrepaul force-pushed the docs-span-throughput-ogwo0y branch from 4fc2e5c to b6c90b3 Compare January 29, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants