Skip to content

Crash reports and source map uploads - #7

Merged
castlemilk merged 4 commits into
mainfrom
crash-reports
Oct 18, 2026
Merged

castlemilk merged 4 commits into
mainfrom
crash-reports

Conversation

@castlemilk

@castlemilk castlemilk commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • internal/crash: opt-in crash reports. When the user turns them on (flaggr crash-reports on, or FLAGGR_CRASH_REPORTS=1), a panic in any command is reported to Flaggr's Issues page through flaggr-go/errorreport (v0.2.0), in Flaggr's own project, via POST /api/ingest/cli-crashes. DO_NOT_TRACK=1 and CI environments always disable them.
  • flaggr sourcemaps upload|list|delete: upload a release's source maps so browser and React Native stacks show original files, lines and functions.
  • Go 1.27; flaggr-go v0.2.0.

Test plan

  • go build ./..., go test ./...

🤖 Generated with Claude Code

castlemilk and others added 4 commits October 17, 2026 19:07
When the user turns them on (flaggr crash-reports on, or
FLAGGR_CRASH_REPORTS=1), a panic is reported to the Flaggr team at
https://flaggr.dev/api/ingest/cli-crashes, then re-panics as before. The
report carries the panic's message and stack, the CLI's version, the
subcommand name (never its arguments or flags) and the OS, architecture
and Go version: never the token, URLs, flag keys or output. The endpoint
takes no credential. DO_NOT_TRACK=1 and CI keep reports off; off by
default, a crash prints how to report it instead. Errors a command returns
are not crashes and are never reported.

Uses the Go SDK's errorreport package (pinned to its branch commit until
flaggr-go tags a release); THIRD_PARTY_NOTICES regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Uploads the .map files under a build directory (gzipped, four at a time)
to PUT /api/projects/{id}/sourcemaps, each filed under its minified file's
path in stack traces (--url-prefix plus its path in the directory, without
.map), for --release. Flaggr's Issues page then shows minified frames as
the original source. list shows releases or a release's files; delete
removes a release's maps or one file's. --dry-run prints the mapping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
flaggr-go's errorreport, which crash reports use, needs Go 1.27, so the
CLI's go line follows; the README's go install note too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@castlemilk
castlemilk merged commit 19a931d into main Oct 18, 2026
3 checks passed
@castlemilk
castlemilk deleted the crash-reports branch October 18, 2026 03:47
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.

1 participant