filter-out-the-ping-route-url-from-sentry-487 #489
No reviewers
Labels
No labels
Kestra
bug
enhancement
someday
subtask
☁️ api
🎛️ infrastructure
🐞 sentry
📆 2025 Season
📝 pages
allpicks
📝 pages
picks
📝 pages
standings
🚀 performance
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
johnsturgeon/tgfp-web!489
Loading…
Reference in a new issue
No description provided.
Delete branch "filter-out-the-ping-route-url-from-sentry-487"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This PR adds a Sentry
before_send_transactionhook to drop/pinghealth-check transactions (issue #487), which is a clean, correct, and well-commented one-function change. The functional change looks good; the main concern is that theuv.lockdiff bundles a large, undisclosed transitive-dependency refresh that is unrelated to the stated purpose.Worth fixing
uv.lock— unrelated dependency churn bundled into a one-line feature. Beyond the version bump to2.31.1, the lock refresh bumps ~15 transitive packages (including major jumps likeisort6→9 andrich14→15) and pulls in two brand-new packages,agent-detector2.0.0 andmypy-extensions1.1.0, the former as a new transitive dep offastapi-cloud-cli0.25.0. None of this is mentioned in the PR (which has no description) and none of it is needed to filter/ping. This inflates the review surface and quietly expands the supply-chain footprint. Please either split the lock refresh into its own PR or, at minimum, call out in the description that auv lockrefresh was intentional and confirmagent-detectoris a trusted upstream addition. Notepyproject.toml:9-12explicitly frames the pinning policy as "change the mechanism and not the resolution" — a wholesale resolution bump runs against that stated intent.No test for
_drop_ping_transaction(app/main.py:85). It's a pure function that's trivial to unit test, and the repo already has atests/suite. A couple of assertions would lock in the behavior and guard the(event.get("request") or {})fallback: e.g.{"request": {"url": "http://x/ping"}}→None,{"request": {"url": "http://x/picks"}}→ returns the event unchanged, and{}(no request key) → returns the event. Worth adding since the whole point of the change is that these events get dropped.Nits
app/main.py:85— Sentry's documented idiom for skipping a route entirely is atraces_samplerreturning0for/ping, which avoids sampling the transaction in the first place rather than building it and discarding it at send time.before_send_transactionworks and is perfectly acceptable here; just noting the alternative in case you'd prefer not to pay the tracing cost for a constantly-polled endpoint.