feat(browser): opt-in HTTP failure errors, CSP and browser reports - #1152
Merged
Makisuo merged 3 commits intoSep 29, 2026
Merged
Maple Review Bot / Maple / review
succeeded
Sep 29, 2026 in 5m 52s
Confidence 4/5 · No issues found
Confidence 4/5 · likely safe to merge
The delta since the last review is one stateful-regex fix with a test that fails without it, plus a type-only option already wired end to end.
quality 100/100 · no findings · tests covered · risk medium · 2/2 new units observable
Reviewed the two files changed since the last pass. matches now clears a stateful g/y regex's lastIndex before test, and ErrorFilterOptions.captureHttpStatus is declared as ReadonlyArray<HttpStatusRange> (type-only import) and already reaches HttpStatusExporter. No defect found in the delta.
matchesresetslastIndexbeforetest, so ag/ypattern cannot skip matchesErrorFilterOptions.captureHttpStatustyped againstHttpStatusRange, re-exported from the package root
What was checked
error-filters.test.ts:83uses/chunk/githree times, so it fails if the reset is removedimport typeaterror-filters.ts:4keeps thehttp-statusimport type-only, no runtime cyclecaptureHttpStatusflows config.ts:242 → tracing.ts:175 intoHttpStatusExporter
Observability coverage: 2 of 2 changes observable
| Change | Kind | Observable | Evidence |
|---|---|---|---|
| HttpStatusExporter HTTP status error policy (error.type/error.message on listed statuses) | in-process span exporter | yes | The exporter decides the span's own status and error attributes, which is the telemetry itself; covered by http-status.test.ts |
| ReportingObserver / securitypolicyviolation listener in deferred/reports.ts | inbound browser event consumer | yes | Emits maple.browser.csp_violation and maple.browser.report OTLP log events via emitLog, matching the SDK's log-event convention (web vitals) |
cad4838 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple to ask about one.
Loading