Repository navigation
Conversation
The hint only printed when a DSN was set. Agents rarely have one while they set up Sentry: the user adds it to production later, so the app and its tests run without it, and the agent finishes before the hint can print. It now prints without a DSN too, and starts by saying that no DSN is set and that this run sends nothing to Sentry. Every other condition for the hint is unchanged.
Contributor
PR risk: mediumFor commit Main concerns: reach. This label is a hint for reviewers, not an approval. |
Contributor
Coverage Results 📊✅ 59481 passed | ⏭️ 3127 skipped | Total: 62608 | Pass Rate: 95.01% | Execution Time: 163m 51s 📊 Comparison with Base Branch
➖ Removed Tests (1)View removed tests
All tests are passing successfully. ✅ Patch coverage is 100.00% (6 of 6 changed executable lines covered; target 80%). Changed files with executable lines (1)
Coverage diff@@ Coverage Diff @@
## master #8432 +/-##
==========================================
Coverage 90.17% 90.17% —%
==========================================
Files 201 201 —
Tracked lines 22184 22187 +3
Branches 7772 7774 +2
==========================================
+ Hits 20005 20007 +2
- Misses 2179 2180 +1
- Partials 1282 1283 +1Generated by Coverage Action |
This branch has not been deployed
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.
What
The coding agent hint from #8269 only printed when a DSN was set. It now prints without one too, and starts by saying so:
Every other condition is the same: an agent is running the app, it's not CI, tracing or logs is off, and the file that calls
sentry_sdk.init()was changed by this user in the last hour.Why
Agents rarely have a DSN while they set up Sentry. In 76 real first-setup requests to a coding agent, 4 gave one. The usual request is closer to "add Sentry, I'll put the DSN in production myself". The agent then runs the app and its tests with no DSN, sees no hint, and finishes.
Today the hint only reaches those agents when they make up a local DSN to test with.
How much this helps is not clear yet. In 37 agent sessions on this change, with no DSN in the request, the agent nearly always did make up a local DSN, so the hint printed in its usual form. The new no-DSN form printed in 3 of the 37. That's why this is a draft.
What this doesn't fix
Most new setups guard the call:
if dsn: sentry_sdk.init(...). Without a DSN,init()never runs there, so there's still nothing to print. In an earlier test on a FastAPI app, all three agents wrote that guard, and the hint printed in none of the sessions.The same change is needed on 2.x. That's not in this PR.
Changelog Entry