Repository navigation
fix(errors): keep location-less Effect span frames out of the fingerprint - #1493
Conversation
…rint A line like ` at http.client POST` names a span, not a location, but it matched FRAME_LINE_PATTERN and entered the hash. Effect 4.0.4 renamed it to `at POST`, which rotated every web and scraper HttpClientError fingerprint. SPAN_NAME_FRAME_PATTERN drops an `at <name>` line with no `(` and no `:<digit>`; Node frames like `at file:///x.js:1:2` still count. The MV SQL renders it from the same constant. FINGERPRINT_VERSION stays 3: only stacks carrying such a line re-key, once. Ships as Tinybird MV change, ClickHouse migration 0040 and local schema v31.
Maple review🟢 Confidence 9/10 · safe to merge Drops location-less Effect span frames (
Before merge
What was checked
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 41 seconds. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Maple review🟢 Confidence 9/10 · safe to merge Adds
Before merge
What was checked
|
Maple review🟢 Confidence 10/10 · safe to merge The delta since the previous review is a test-only refactor:
Before merge
What was checked
|
|
Merged with 1 step from "Before merge" still open. If it is done, tick it on the review comment; if not, now is the time.
|
Problem
Effect renders a span with no captured location as a pseudo-frame like
at http.client POST. That line matchedFRAME_LINE_PATTERNand went into the fingerprint hash. In effect 4.0.4 the span becameat POST, and that rotated every web and scraperHttpClientErrorfingerprint (for example6328720000815039642became10600891543185621435, the sameinfra-presencetransport error). Fingerprint v3 already drops(definition)span frames. It did not drop these.Change
SPAN_NAME_FRAME_PATTERN(^[ \t]*at ([^(:]|:[^0-9])*:?$) drops a line shaped likeat <name>that has no(and no:<digit>. Node frames without parens, likeat file:///x.js:1:2, still count, and so doat fn (<anonymous>)andat Promise.all (index N).error_events_mv/error_events_by_time_mvSQL renders the pattern from the same constant (both views shareerrorEventsSelectSql).requiredForIngest: false, so ingest readiness is unaffected.error_eventsrows exactly.FINGERPRINT_VERSIONstays 3. A bump would archive every issue in every org, and this change re-keys only some stacks.Who re-keys
This is a one-time re-key. It affects only issues whose top frames (3, or 1 for a namespaced type with a message) include a location-less span line. Once re-keyed, those issues stay stable across future span renames. Every other hash stays the same. Rows already stored keep their old hashes until TTL. A re-keyed issue starts a new row and the old one ages out of
triage.Real span-name lines in the last 7 days, internal org:
at maple/at maple {(maple-cli root span),at http.client GET|POST,at GET|POST,at unknown. Schema key paths (at [2]["params"]) also match, butSCHEMA_PATH_LINE_PATTERNalready dropped them.Measurement
bun run errors:replay -- --file <sample>ran on 178 real variants (1.56M events, 2026-10-08 to 10-15, internal org). The sample has everyHttpClientErrorfingerprint plus every fingerprint of each (service, type) that carries a span-name line, with each stack truncated to its first 12 lines:62 issues re-key (230 events): 56 in maple-web
HttpClientError, 4 in scraperHttpClientError, and 1 each in maple-cliLocalStoreDirtyError/LocalStoreSchemaStaleError. maple-cliHttpClientErrorcarriesat http.client GETbut below its top 3 frames, so it does not re-key.The replay parity line reads
NOT in parity(178 production hashes against 123 mirror groups). The cause is the warehouse, not this change. The production hashes in the window are still pre-v3: the alerting Hyperdrive 403 hash11396259497129621009stays constant across the v3 merge (#1466), and a v3 hash includes the version salt, so it should have rotated. That suggests the v3 MV is not live in the managed warehouse yet. Worth checking before this lands on top.Tests
fingerprint.test.ts: an EffectHttpClientErrorstack hashes the same before and after the rename and keeps its real frames. Two paren-less Node frames (at file:///app/a.js:1:2/b.js) stay distinct. SQL parity asserts the new matcher is rendered.error-fingerprint-v3.clickhouse.e2e.test.tsgets seeds for both span spellings and a paren-less location frame. It passes against a real ClickHouse with all migrations applied, so the MV hash equals the TS mirror (25/25).apps/clilocal-store-migrations (41), the error-tick and attribute-fallback ClickHouse e2e tests, andclickhouse:schema:check.Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit