Loading
proxy: Stop depending on the Sentry SDK
Summary
The exported proxy package imported the internal sentryhandler package only to call MarkToSkip. That pulled github.com/getsentry/sentry-go, and much more, into the module graph of every consumer of proxy. Consumers had to list those modules as // indirect in their own go.mod.
The skip marker now lives in a small sentryskip package with no third-party dependencies. sentryhandler reads it from there and proxy marks errors through it.
Impact: the dependency closure of proxy drops from 250 to 130 non-std packages. sentry-go, badger, logrus, prometheus and others are gone. In a scratch consumer module, go.mod shrinks from 41 to 13 lines and go.sum from 265 to 92. A test now fails if sentry-go comes back into the closure.
Relates to !9243 (merged)
Agent context
- New
internal/grpc/middleware/sentryskipwithWithMarker,MarkToSkip,ShouldSkip. sentryhandler.MarkToSkipand its context key were removed; the tests usesentryskipinstead.proxy/dependencies_test.gorunsgo list -depsonproxyand asserts nosentry-gopackage appears.golang.org/x/toolsisn't ingo.mod, so it shells out.golangci-lint(repo config, withgitaly-linters) reports 0 issues onproxy/...andinternal/grpc/middleware/....go testpasses forproxy/...,sentryhandlerandsentryskip.- CI is intentionally skipped via the title while in draft.
Edited by Dmitry Gruzd