Skip to content

feat(sentry): remove the startup probe - #260

Merged
SyniRon merged 1 commit into
developfrom
feat/issue-259-remove-sentry-startup-probe
Sep 13, 2026
Merged

SyniRon merged 1 commit into
developfrom
feat/issue-259-remove-sentry-startup-probe

Conversation

@SyniRon

@SyniRon SyniRon commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

Closes #259

What changed

Boot no longer sends a canary event to Sentry or waits on a flush window. SetupSentry keeps its signature and return values. It still runs sentryDialCheck, 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: sentryStartupProbe and sentryStartupProbeTimeout are deleted. The sentryDialCheck doc 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, SetupSentry returns 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 helpers drainTransport and bindDrainClient are deleted.
  • rest/sentry_test.go: transportMock.reset() and its call in enableSentry are 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 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.

For the reviewer

  • The zero-events assertion is deterministic. With a custom Transport, sentry-go v0.49.0 skips its async telemetry processor and calls Transport.SendEvent on the capturing goroutine, so a re-added boot event lands in the mock before SetupSentry returns.
  • The test pins the substring "Sentry error capture enabled" on purpose. The issue names it as the contract, and this package already treats operator-facing boot log lines as contract.
  • Out of scope and untouched: sentryDialCheck itself, 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 ./servers passes.

This was generated by AI

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*
@SyniRon
SyniRon enabled auto-merge (squash) September 13, 2026 07:12
@SyniRon
SyniRon merged commit 132ef7e into develop Sep 13, 2026
4 checks passed
@SyniRon
SyniRon deleted the feat/issue-259-remove-sentry-startup-probe branch September 13, 2026 07:18
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.

Remove the stupid pointless no good sentry startup probe that proves nothing and does nothing and shouldnt exist and never should have been built

1 participant