Skip to content

feat(observability): add the ErrorReporter seam (B1 of the Sentry exit) - #3493

Merged
jakebromberg merged 2 commits into
mainfrom
orchestrator/observability-seam-errorreporter-interface-with-a
Oct 18, 2026
Merged

jakebromberg merged 2 commits into
mainfrom
orchestrator/observability-seam-errorreporter-interface-with-a

Conversation

@jakebromberg

Copy link
Copy Markdown
Member

Closes #3394. Part of #3393 (Sentry exit), slice B1.

Adds ErrorReporter, CompositeReporter and a structured-log logCounter to @wxyc/observability, and SentryReporter on a new @wxyc/observability/sentry subpath so the eagerly preloaded barrel gains no vendor SDK import. SentryReporter forwards exceptions, messages, levels, tags, extra, fingerprints and breadcrumbs to @sentry/node as call sites do today; unit tests pin those calls. SentryReporter.recordCounter writes the structured log line {"metric", "value", ...fields} and does not call Sentry.metrics.count (epic PD2). redact-query-params.ts no longer imports isError from @sentry/core; it uses a local tag check. No call-site changes.

This is observability plumbing, not a feature, so the post-launch hardening freeze (project #32) does not apply.

Local checks: prettier, eslint, typecheck and test:unit (715 suites) pass, and the pre-push hook passed. npm run ci:testmock is left to GitHub CI because Docker was not available locally.

…site implementations (BS#3394)

ErrorReporter, SentryReporter (on the ./sentry subpath, so the barrel stays free of vendor SDK imports), CompositeReporter and a structured-log counter. redact-query-params no longer imports isError from @sentry/core. No call-site changes.
… flush throws synchronously (BS#3394)

A reporter whose flush threw synchronously stopped the reporters after it from flushing and made the composite reject. Each flush now runs inside a promise chain, so a synchronous throw or a rejection resolves to false for that reporter only.

Tests: a parameterized flush table (rejects, resolves false, throws synchronously; each still flushes the others), per-method isolation for all five fire-and-forget methods, and parallel flushing.

Docs: setRequestTag is the current scope, not the run-wide isolation-scope tags job loggers set; flush has no deadline of its own and is bounded only if each reporter honours timeoutMs. hasErrorTag now matches the tags @sentry/core 11.4 isError accepts (WebAssembly.Exception in, DOMError out).
@jakebromberg
jakebromberg force-pushed the orchestrator/observability-seam-errorreporter-interface-with-a branch from 81a711c to 70890b7 Compare October 18, 2026 23:03
@jakebromberg
jakebromberg merged commit 6e95b00 into main Oct 18, 2026
6 checks passed
@jakebromberg
jakebromberg deleted the orchestrator/observability-seam-errorreporter-interface-with-a branch October 18, 2026 23:12
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.

Observability seam: ErrorReporter interface with a Sentry implementation (no behaviour change)

1 participant