feat(sentry): remove the startup probe - #260
Merged
Merged
Conversation
Boot no longer sends a canary event or waits on a flush window. The probe's flush proved queue drain, not delivery: a refused ingest host drained in milliseconds and reported success while sentryDialCheck already named the host as unreachable. Every container start also cost Sentry one event, and the probe's stall test was the flake in #179. SetupSentry keeps its signature and return semantics. It still runs sentryDialCheck and now prints the enabled line whenever init succeeded. The probe-only test helpers and the reset() call that hid the boot canary from other tests go with it. The dial-check doc comment stands alone, and the boot-delay comments drop from ~8s to 3s. Closes #259 *This was generated by AI*
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.
Closes #259
What changed
Boot no longer sends a canary event to Sentry or waits on a flush window.
SetupSentrykeeps its signature and return values. It still runssentryDialCheck, and it now prints the "Sentry error capture enabled" line whenever init succeeded.rest/sentry.go: the probe call and its gate on the enabled line are gone. The file header now describes the two boot pieces that remain (dial check, shutdown flush).rest/sentry_boot.go:sentryStartupProbeandsentryStartupProbeTimeoutare deleted. ThesentryDialCheckdoc comment no longer justifies itself by what the probe could not see.rest/sentry_boot_test.go: one new test pins the boot contract. With a DSN whose host refuses connections and the transport seam swapped for a capture mock,SetupSentryreturns true, the mock holds zero events, the Info log has the enabled line, and the Warn log names the host. The four probe tests and the probe-only helpersdrainTransportandbindDrainClientare deleted.rest/sentry_test.go:transportMock.reset()and its call inenableSentryare deleted. Every existing test that counts events now also asserts, by construction, that boot sent nothing.servers/server.go: the boot-delay comment drops from about 8s to 3s.Why
The probe's flush proved queue drain, not delivery. With a refused ingest host it reported success in milliseconds while
sentryDialCheckalready named the host as unreachable. Every container start also cost Sentry one event, and the probe's stall test was the flake in #179.For the reviewer
Transport, sentry-go v0.49.0 skips its async telemetry processor and callsTransport.SendEventon the capturing goroutine, so a re-added boot event lands in the mock beforeSetupSentryreturns.sentryDialCheckitself,FlushSentryOnShutdown,watchShutdown, the middleware,SENTRY_DEBUG, goldens and the spec.Verification
grep -ri "startup probe\|startup-probe\|StartupProbe" --include='*.go' .returns nothing.go build ./...,go vet ./...,go test ./...pass.go test -race ./rest ./serverspasses.This was generated by AI