Modernize SDK to v1.1.0 (reliability, client API, transport, tooling) - #29
Draft
melekr wants to merge 14 commits into
Draft
Modernize SDK to v1.1.0 (reliability, client API, transport, tooling)#29melekr wants to merge 14 commits into
melekr wants to merge 14 commits into
Conversation
…p, bt-breadcrumbs - A panicking BeforeSend hook now drops the report instead of sending it half scrubbed. The drop is counted in DroppedReports - Attachment 10 MiB cap enforced at read time. - Breadcrumbs also sent as the bt-breadcrumbs-0 attachment the Backtrace UI reads: scrubbing the annotation in BeforeSend suppresses it - Token redacted in 2-segment submit.backtrace.io paths and in transport errors (*url.Error embeds the full URL) - Tests: multipart test server, panic-report queue-full retry, Flush retry after full queue, attachment collision cases
Trailing-slash endpoints no longer produce "//post" : an endpoint carrying a query string together with Token is rejected at NewClient (previously produced a malformed submission URL and silently dropped every report).
wmic is removed from Windows 11 24H2 / Server 2025. Shared reg-output parser for the GUID and CPU probes, with unit tests.
Author
|
- Trace() fails gracefully when a stub tracer (macOS) returns no command instead of crashing the process in the exec goroutine - Env-var redaction broadened (PASS/KEY/DSN/COOKIE/SESSION/SIGNATURE/ BEARER/CONN) plus value shape detection of URL-embedded credentials - Retry-After capped at 5 minutes; token redaction extended to aliased submit-shaped URLs and NewClient error messages - All Client methods are safe no-ops on a nil receiver, as documented
3 tasks
panic containment, bounded lifecycle, privacy budgets
An error-reporting SDK must never become the incident. After this change the SDK cannot crash, hang, or leak from the host application: every path that executes application code is panic-contained (including re-entrant loggers and typed-nil errors), every wait is bounded and cancellable, every payload component has a byte budget, and no credential can reach a log, error string, or report annotation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Modernize backtrace-go (v1.1.0)
This brings the SDK up to a production-ready state. It fixes long-standing reliability bugs, adds the features expected from a modern error-reporting SDK and rebuilds the tooling around it.
Fixes
Contains Improvements/prod hardening #30
Submissions had no HTTP timeout : an unreachable endpoint hung the sender and eventually blocked every
Report()call.There's now a real transport (30s timeout, status/429 handling) behind a bounded queue that drops and counts instead of blocking.
About half of all panic reports were lost to a channel race. Panics are now flushed deterministically before re-panicking, and retry a full queue instead of being dropped.
FinishSendingReportskilled the sender permanently and deadlocked on a second call. Replaced byFlush(timeout)/Close, kept as an alias.Data races on the global
Options/attributes map, report UUIDs, Windows stack paths split at the drive letter, parser panics on unusual frames, and a CI matrix that couldn't build (Go 1.18 vs go.mod 1.22).New
bt.NewClient(Config). The legacy global API still works unchanged, same wire format.BeforeSendhook (fails closed: a panicking hook drops the report rather than sending it half-scrubbed), sampling, error-chain capture, and abthttpmiddleware for net/http panic capture.breadcrumbs-0attachment the Backtrace UI reads.ContextLineCountwas dead code before).ref: BT-7421