feat: add Sentry error reporting
Capture command errors and panics with Sentry SDK. DSN injected at build time via ldflags (dev builds silent, releases report). Opt-out: UNARR_NO_TELEMETRY=1.
This commit is contained in:
parent
6e07e82d51
commit
3d6142a62e
7 changed files with 120 additions and 2 deletions
4
Makefile
4
Makefile
|
|
@ -1,12 +1,14 @@
|
|||
.PHONY: all build test lint coverage clean fmt vet check install-hooks
|
||||
|
||||
BINARY = unarr
|
||||
SENTRY_DSN ?=
|
||||
LDFLAGS = -X github.com/torrentclaw/torrentclaw-cli/internal/sentry.dsn=$(SENTRY_DSN)
|
||||
|
||||
all: fmt vet lint test build
|
||||
|
||||
## Build the binary
|
||||
build:
|
||||
go build -o $(BINARY) ./cmd/unarr/
|
||||
go build -ldflags '$(LDFLAGS)' -o $(BINARY) ./cmd/unarr/
|
||||
|
||||
## Run all tests
|
||||
test:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue