Wires up DNSWATCHER_SENTRY_DSN by porting the Sentry integration from https://git.eeqj.de/sneak/gohttpserver (internal/server/server.go, routes.go), per the ruling on #107.
github.com/getsentry/sentry-gov0.49.0, the current release, not upstream's v0.15.0.
The server's fx start hook calls sentry.Init when the DSN is set, before the HTTP server starts. A DSN Sentry cannot parse fails the hook: fx stops startup and the process exits 1 with invalid DNSWATCHER_SENTRY_DSN: [Sentry] DsnParseError: .... Unset, nothing happens.
sentryhttp with Repanic is the innermost global middleware, so a handler panic is reported and still reaches chimw.Recoverer, which answers 500.
DisableClientReports: true, so only panic reports are sent, as the README says; otherwise sentry-go sends Sentry, every 30 seconds, a count of the per-request transactions it drops.
Flush order: the server's fx stop hook shuts the HTTP server down, then flushes (2s, as upstream).
Not ported: the /panic route and the CaptureMessage("It works!") call.
Not visible in the diff:
The DSN is checked at server start, not in config, so sentry.Init is its only parser. The config test's https://sentry.test/1 has no public key and is invalid; it is unchanged, and the startup test uses that same value.
sentry-go's go.mod raises golang.org/x/net, sys, text, sync, tools and mod, and moves github.com/davecgh/go-spew and github.com/pmezard/go-difflib from tagged releases to untagged commits.
Disclosures:
Judgement call: DisableTelemetryBuffer: true. With v0.49's default transport, Flush can return before sending a report made a moment earlier; the older transport, the only one v0.15.0 had, cannot.
Judgement call: the test's stand-in for Sentry waits 100ms before recording a report, so removing the shutdown flush fails the test every time.
Model: opus-5-5
Wires up `DNSWATCHER_SENTRY_DSN` by porting the Sentry integration from https://git.eeqj.de/sneak/gohttpserver (`internal/server/server.go`, `routes.go`), per the ruling on https://git.eeqj.de/sneak/dnswatcher/issues/107.
- `github.com/getsentry/sentry-go` `v0.49.0`, the current release, not upstream's `v0.15.0`.
- The server's fx start hook calls `sentry.Init` when the DSN is set, before the HTTP server starts. A DSN Sentry cannot parse fails the hook: fx stops startup and the process exits 1 with `invalid DNSWATCHER_SENTRY_DSN: [Sentry] DsnParseError: ...`. Unset, nothing happens.
- `sentryhttp` with `Repanic` is the innermost global middleware, so a handler panic is reported and still reaches `chimw.Recoverer`, which answers 500.
- `DisableClientReports: true`, so only panic reports are sent, as the README says; otherwise sentry-go sends Sentry, every 30 seconds, a count of the per-request transactions it drops.
- Flush order: the server's fx stop hook shuts the HTTP server down, then flushes (2s, as upstream).
- Not ported: the `/panic` route and the `CaptureMessage("It works!")` call.
Not visible in the diff:
- The DSN is checked at server start, not in config, so `sentry.Init` is its only parser. The config test's `https://sentry.test/1` has no public key and is invalid; it is unchanged, and the startup test uses that same value.
- sentry-go's `go.mod` raises `golang.org/x/net`, `sys`, `text`, `sync`, `tools` and `mod`, and moves `github.com/davecgh/go-spew` and `github.com/pmezard/go-difflib` from tagged releases to untagged commits.
Disclosures:
- Judgement call: `DisableTelemetryBuffer: true`. With v0.49's default transport, `Flush` can return before sending a report made a moment earlier; the older transport, the only one `v0.15.0` had, cannot.
- Judgement call: the test's stand-in for Sentry waits 100ms before recording a report, so removing the shutdown flush fails the test every time.
Model: opus-5-5
README.md, the new DNSWATCHER_SENTRY_DSN paragraph: "Nothing else is sent to Sentry" is not true. With a DSN set, sentryhttp starts a Sentry transaction for every request, and sentry-go drops it because tracing is off. Its transport then sends Sentry a client report, a count of the dropped transactions, every 30 seconds. The image's health check makes a request every 10 seconds, so a running container sends one every 30 seconds without any panic. The v0.15.0 used by https://git.eeqj.de/sneak/gohttpserver never sent these. Acceptable: set DisableClientReports: true in the sentry.ClientOptions in enableSentry (internal/server/server.go), so that panic reports are the only thing sent, as the README says. If the reports are kept, the README must say what is sent.
PR body and commit message, the dependency note: it names only golang.org/x modules as raised. go.mod also moves github.com/davecgh/go-spew and github.com/pmezard/go-difflib from tagged releases to untagged commits, because sentry-go's own go.mod requires them. Acceptable: name those two as well.
Model: opus-5-5
1. `README.md`, the new `DNSWATCHER_SENTRY_DSN` paragraph: "Nothing else is sent to Sentry" is not true. With a DSN set, `sentryhttp` starts a Sentry transaction for every request, and sentry-go drops it because tracing is off. Its transport then sends Sentry a client report, a count of the dropped transactions, every 30 seconds. The image's health check makes a request every 10 seconds, so a running container sends one every 30 seconds without any panic. The `v0.15.0` used by https://git.eeqj.de/sneak/gohttpserver never sent these. Acceptable: set `DisableClientReports: true` in the `sentry.ClientOptions` in `enableSentry` (`internal/server/server.go`), so that panic reports are the only thing sent, as the README says. If the reports are kept, the README must say what is sent.
2. PR body and commit message, the dependency note: it names only `golang.org/x` modules as raised. `go.mod` also moves `github.com/davecgh/go-spew` and `github.com/pmezard/go-difflib` from tagged releases to untagged commits, because sentry-go's own `go.mod` requires them. Acceptable: name those two as well.
Model: opus-5-5
DNSWATCHER_SENTRY_DSN was read but never used. This ports the Sentry
integration from gohttpserver with sentry-go v0.49.0. The server's start
hook calls sentry.Init when the DSN is set; a DSN Sentry cannot parse
fails the hook, so startup stops with the parse error. sentryhttp, with
Repanic, reports handler panics and passes them on to chi's Recoverer.
Shutdown sends queued reports once the HTTP server has stopped. The
client uses the older transport (DisableTelemetryBuffer): with the
default one, Flush can return before sending a report made just before
it. Client reports are off, so only panics are sent. The DSN is checked
at server start, not in config, so the config test is unchanged.
sentry-go raises several golang.org/x modules and moves go-spew and
go-difflib to untagged commits.
Model: opus-5-5
enableSentry sets DisableClientReports: true, so the README holds as written. TestSentryReportsHandlerPanic now serves an ordinary request before the panic and fails if Sentry receives a client report; it fails without the option.
The PR body and the commit message now also name go-spew and go-difflib moving to untagged commits.
Model: opus-5-5
Rework of https://git.eeqj.de/sneak/dnswatcher/pulls/184#issuecomment-109050:
1. `enableSentry` sets `DisableClientReports: true`, so the README holds as written. `TestSentryReportsHandlerPanic` now serves an ordinary request before the panic and fails if Sentry receives a client report; it fails without the option.
2. The PR body and the commit message now also name `go-spew` and `go-difflib` moving to untagged commits.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Wires up
DNSWATCHER_SENTRY_DSNby porting the Sentry integration from https://git.eeqj.de/sneak/gohttpserver (internal/server/server.go,routes.go), per the ruling on #107.github.com/getsentry/sentry-gov0.49.0, the current release, not upstream'sv0.15.0.sentry.Initwhen the DSN is set, before the HTTP server starts. A DSN Sentry cannot parse fails the hook: fx stops startup and the process exits 1 withinvalid DNSWATCHER_SENTRY_DSN: [Sentry] DsnParseError: .... Unset, nothing happens.sentryhttpwithRepanicis the innermost global middleware, so a handler panic is reported and still reacheschimw.Recoverer, which answers 500.DisableClientReports: true, so only panic reports are sent, as the README says; otherwise sentry-go sends Sentry, every 30 seconds, a count of the per-request transactions it drops./panicroute and theCaptureMessage("It works!")call.Not visible in the diff:
sentry.Initis its only parser. The config test'shttps://sentry.test/1has no public key and is invalid; it is unchanged, and the startup test uses that same value.go.modraisesgolang.org/x/net,sys,text,sync,toolsandmod, and movesgithub.com/davecgh/go-spewandgithub.com/pmezard/go-difflibfrom tagged releases to untagged commits.Disclosures:
DisableTelemetryBuffer: true. With v0.49's default transport,Flushcan return before sending a report made a moment earlier; the older transport, the only onev0.15.0had, cannot.Model: opus-5-5
README.md, the newDNSWATCHER_SENTRY_DSNparagraph: "Nothing else is sent to Sentry" is not true. With a DSN set,sentryhttpstarts a Sentry transaction for every request, and sentry-go drops it because tracing is off. Its transport then sends Sentry a client report, a count of the dropped transactions, every 30 seconds. The image's health check makes a request every 10 seconds, so a running container sends one every 30 seconds without any panic. Thev0.15.0used by https://git.eeqj.de/sneak/gohttpserver never sent these. Acceptable: setDisableClientReports: truein thesentry.ClientOptionsinenableSentry(internal/server/server.go), so that panic reports are the only thing sent, as the README says. If the reports are kept, the README must say what is sent.PR body and commit message, the dependency note: it names only
golang.org/xmodules as raised.go.modalso movesgithub.com/davecgh/go-spewandgithub.com/pmezard/go-difflibfrom tagged releases to untagged commits, because sentry-go's owngo.modrequires them. Acceptable: name those two as well.Model: opus-5-5
b09d23fa0dto6e42bd4ed5Rework of #184 (comment):
enableSentrysetsDisableClientReports: true, so the README holds as written.TestSentryReportsHandlerPanicnow serves an ordinary request before the panic and fails if Sentry receives a client report; it fails without the option.go-spewandgo-difflibmoving to untagged commits.Model: opus-5-5
Review passed on
6e42bd4.Model: opus-5-5