@fixback/sdk-core
v0.14.0
Published
Runtime-agnostic core shared by the Fixback capture SDKs — fingerprinting, scrubbing, backoff, and the shared wire shapes.
Readme
@fixback/sdk-core
The runtime-agnostic core shared by every Fixback SDK — @fixback/sdk,
@fixback/expo, @fixback/node, and the build-time @fixback/cli. It holds the
capture logic none of them should own privately, so every surface computes it the
same way (ADR-0028):
- Fingerprinting — fingerprint v2 (ADR 2026-10-15):
computeFingerprintandfingerprintKeysover the language-neutralfingerprintOf, withkeyFramesOf,isInAppFile,frameKey,normalizeandcompactFrameFilebehind them. An error groups by its type with its causes' types, the app's own top frames by function and file (never a line; an anonymous frame by the named function enclosing it), and its message — every number collapsed — only when those frames cannot name the throw site, hashed to 64 bits.resolveFingerprintandresolveErrorSignatureapply a customfingerprint({{ default }}standing for the computed key) afterbeforeSend, andcomputeFingerprintV1keeps the frozen v1 key every SDK sends beside the v2 one while Issues filed under v1 switch over. The .NET SDK ports the same rules, pinned by parity vectors. - Stack parsing — one frame tokenizer (
parseStackLine) behind the fingerprint, the console call site, andextractStructuredFrames(the frames server-side symbolication consumes). - Scrubbing —
scrubUrl,redactPii, and therunBeforeSendchoke point. - The trace buffer —
createBreadcrumbBuffer's three per-stream rings, the crumb builders (consoleCrumb,networkCrumb,navigationCrumb,errorCrumb, …), the structured console-arg caps,instrumentConsole, andinstrumentXhr— the oneXMLHttpRequestpatch, each SDK passing its own Correlation id rule and opt-ins. - The Correlation id — the W3C
traceparentcarrier (mintTraceparent/parseTraceparent) and the one reading of the capture SDKs'propagateTooption (readPropagateTo,ignoredPropagateToWarning), with each runtime's origin parser injected. - Automatic error capture —
createAutoCapture: the dedup, token-bucket burst limiter, session cap, causal error crumb, and occurrence flush each SDK'sinstallErrorCapturebinds its runtime's error seam to — andautoReportContent, thesource: errorcontent each report ships. - Backoff —
AutoReportBackoff+parseRetryAfter, honouring ingest's429/Retry-Afterbackpressure. - The ingest boot contract —
requestBoot,bootEndpoint/feedbackEndpoint,BootAnswer, andisFixbackApiRequest— and what an answer settles for a Reporter session:reconcileBoot,reporterIdentityOf, and maintenance mode's recheck (createMaintenanceRecheck). - The feedback POST's tail —
backpressureHold,postFeedbackand theSubmitResultit answers, overfetchWithTimeoutandreadJsonBody; the multipart envelope stays each SDK's own. - Report content —
assembleReportContentandcaptureEnvironmentOf, the rules that drop an empty piece rather than send a blank. - The shared init vocabulary —
DEFAULT_API_URL,CommonInitOptions,streamEnabled,normaliseReleaseandreadReleaseOption, the warning prefix every SDK prints (WARN_PREFIX), and the anonymous-id key + generator. - Wire shapes —
ReportContent,CapturedFrame, theAnnotation/Breadcrumbvalue types (andarrowHeadPoints, the arrow geometry the dashboard's composite mirrors), and the provenance vocabulary (FeedbackSource,Platform).
It is deliberately runtime-agnostic: no DOM, no Node built-ins, no rrweb.
Every runtime touchpoint is either injected (a console, a fetch, an XHR
constructor, a storage binding) or probed defensively off globalThis
(performance, TextEncoder, crypto, setTimeout) — see ADR 2026-10-08, which
amends ADR-0028's scope to every capture SDK's runtime-agnostic logic, transports
included. This is an internal implementation package for the Fixback SDK family,
not a public API.
📖 Documentation for the SDKs that build on this core: docs.fixback.dev.
