Repository navigation
feat: add opt-in ignoredSpanOps filter for Sentry (2.4.0) - #20
Merged
Merged
Conversation
Adds `filters.ignoredSpanOps`, passed to Sentry as `ignoreSpans`, which defaults to `middleware.express` and `router.express`. Those two ops are about 90% of agentic-api's Sentry span volume (45M of 50M prod spans over 7 days) and use up the performance quota. Sentry drops them client-side and re-parents their children. OTLP export is unaffected. Also aligns the biome.json schema with the installed CLI (2.5.15). Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
The shared package shouldn't decide which spans other services lose, so the default is now an empty list and each consumer lists the ops it wants dropped. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an opt-in
filters.ignoredSpanOpsoption, passed to Sentry asignoreSpans. It defaults to[], so nothing changes for consumers until they set it.Each consumer decides which ops to drop. For example, agentic-api will set:
Why agentic-api wants this: those two ops are about 90% of its Sentry spans. Over the last 7 days in prod:
middleware.express34M androuter.express11M, against 2.4M forhttp.server. They are why we keep hitting the Sentry performance quota.How it works: Sentry 10's
ignoreSpansdrops matching child spans on the client before sending, re-parents their children, and records them as client discards. It works on theSentrySpanProcessorpath that agentic-api uses withenableOtel: true. OTLP/Tempo export is unchanged. Sentry 11 has the same option, so this carries over when we upgrade.Also updates the
biome.jsonschema version to match the installed CLI (2.5.15).Context
We're staying on Sentry 10 for now. Sentry 11 drops
SentrySpanProcessor, so OTel spans can't go to Sentry and Tempo at the same time, and Sentry is our main trace UI.Test plan
npm run typecheck && npm run lint && npm test(57 passing; tests check the client'signoreSpanswith ops set and with the default)releaseworkflow, then bump agentic-api to 2.4.0 with@sentry/nodepinned to 10.76.2 andignoredSpanOpsset. Check in staging thatmiddleware.expressandrouter.expressno longer show up in Sentry.🤖 Generated with Claude Code