Skip to content

feat(node): distributed tracing spans - #4579

Open
turnipdabeets wants to merge 36 commits into
mainfrom
feat/traces-node-mvp
Open

feat(node): distributed tracing spans#4579
turnipdabeets wants to merge 36 commits into
mainfrom
feat/traces-node-mvp

Conversation

@turnipdabeets

@turnipdabeets turnipdabeets commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Problem

Developers instrumenting a Node service with PostHog have no way to record spans. They can send events, logs and metrics, but nothing that shows where time went in a request or how work fans out across services. Pointing an OpenTelemetry SDK at PostHog works, but it means adding an OTel dependency and wiring the join to PostHog identity by hand — so traces end up disconnected from the person and session they belong to.

Part of a stacked series adding first-class tracing to the JS SDKs (Q3 Goal 4). Scoped to be releasable on its own, one commit, on top of the shared OTLP attribute encoder from #4708 (merged).

Changes

Adds startSpan, withSpan and getActiveSpan to posthog-node, behind a new traces client option. Spans are encoded as OpenTelemetry-shaped OTLP JSON and POSTed to /i/v1/traceswithout an OpenTelemetry dependency.

const posthog = new PostHog('phc_...', { traces: { serviceName: 'checkout-api' } })

await posthog.withSpan('POST /checkout', { parent: req.headers.traceparent }, async (span) => {
    span.setAttribute('plan', user.plan)
    return processOrder()
})
  • Off until configured. No traces option means no spans. Every span API still returns a working (inert) handle, so calling code never branches on whether tracing is on.
  • Identity join. Spans started inside a request context carry posthogDistinctId and sessionId, taken from withContext or the existing Express/NestJS middleware. This is what makes a trace reachable from a person or session.
  • W3C trace context. parent accepts an inbound traceparent string to continue a remote trace; span.traceparent() gives you the header to propagate onward. tracestate is preserved opaquely.
  • Nesting across await on Node, via AsyncLocalStorage injected at the Node entrypoint. Core stays runtime-agnostic (no node:async_hooks), so the edge build and future browser/RN hosts work off the same engine.
  • flush() drains spans, concurrently with the event queue. Serverless handlers call flush(), not shutdown(), so leaving spans on their own timer would silently lose them for the most common posthog-node deployment. A span ending also refreshes the waitUntil cycle, so a handler that only traces still holds its invocation open.
  • Bounded live spans. maxLiveSpans (default 10000) caps how many spans may be open at once and maxSpanAgeMs (default one hour) stops accounting for one that stays open longer, so code that starts spans and never ends them cannot grow the SDK's bookkeeping without limit. At the cap startSpan returns an inert handle; an evicted span is never exported. Both drops go through the existing span-drop warning.
  • Bounded retries. A batch the endpoint keeps refusing is retried with exponential backoff capped at 30s, then dropped after 8 consecutive failures, so a stuck batch cannot pin the queue while fresher spans are refused at the cap.

Reviewer notes

  • Edge runtime — the edge build restores the active span when a callback returns its promise, not when it settles, so spans started after an await there begin a new trace. Pass parent explicitly to nest them. This is the documented browser limitation too.
  • IPostHog gains three required members (startSpan, withSpan, getActiveSpan). Consumers using it as a type annotation are unaffected; anyone implementing it (hand-written test doubles, DI wrappers) will get a compile error. Same shape as metrics in feat(metrics): wire posthog.metrics into posthog-node #4117, which shipped under a minor bump.
  • JSON, not protobuf — and this is conformant, not a divergence. The spec makes protobuf canonical only "where the encoder adds no meaningful dependency or binary-size cost". A protobuf encoder is a real dependency for a zero-dependency package, so the condition does not fire and the SHOULD-send-JSON branch applies. It also matches what the shipped logs and metrics pipelines already send.
  • A 200 is not proof of correct configuration — the ingestion endpoint accepts a well-formed but unknown project key with a 200 and drops the spans.
  • The shared OTLP attribute encoder moved to refactor(core): share one OTLP attribute encoder across logs, metrics and traces #4708, which has merged. Spans reuse it rather than adding a third copy. Span batches likewise go through _sendOtlpBatch (from fix(core): send logs and metrics through one OTLP batch sender #4623) rather than a third copy of the retry policy — the bearer-auth branch is reintroduced there for traces.
  • Docs — the Node library page section is drafted in PostHog/posthog.com#19837, held as a draft until this PR merges and ships. It documents both flush() and shutdown() as span drains.
  • Live spans are bounded without retaining spans. The obvious way to implement the spec's Live span bounds requirement is a registry of live span objects, which would keep every leaked handle alive for the length of the age bound. Instead the engine keeps a Map of span id to monotonic start — ids and numbers, never the span — so a handle the caller drops is still collected like any other object, and the count bound can be generous because a slot costs tens of bytes rather than a whole span. packages/core/src/traces/live-spans.spec.ts keeps its WeakRef probe, now as the guard that stops a later change from turning this into a registry of spans. Eviction is lazy at startSpan, and sweeps before reading the bound, so a process that has leaked its way to the cap recovers on the first call after the leaks age out rather than losing tracing for the rest of its life.
  • Retry-After is not honoured — the backoff is purely exponential, capped at 30s. This is a shared gap with the logs and metrics senders rather than something this PR introduces, and the service does not emit 429 yet. Tracked separately.
  • beforeSpanSend and the per-span caps ship here. They were written as feat(node): beforeSpanSend hook and per-span limits #4584 and have since been folded into this branch, so this PR's public traces surface is serviceName, serviceVersion, environment, resourceAttributes, flushIntervalMs, maxExportBatchSize, maxQueueSize, beforeSpanSend, maxAttributesPerSpan, maxEventsPerSpan, maxAttributeValueLength, maxLiveSpans and maxSpanAgeMs. The per-event attribute cap stays internal.
  • Deliberately deferred to later PRs in this stack: OpenTelemetry soft-detect, browser host, and log/exception correlation.

Verification

End-to-end against a real project (381971), twice: first a scripted run, then a real Express app using setupExpressRequestContext with two routes, a genuine HTTP hop between them, and an error path. Spans read back out of the product assembled correctly — POST /checkout root with db.query and http.post payments beneath it, GET /payments/charge continued across the hop via traceparent, and a separate trace for the thrown route carrying status_code: 2. posthogDistinctId / sessionId came from the X-POSTHOG-* request headers on every in-context span, with no manual plumbing.

Also exercised against production ingestion: an oversized batch really does 413 (11.5 MB → 413, halved to 5.75 MB → 200 twice, all spans queryable afterwards), and 50k spans push through at ~310k/sec with 204 KB average batches — the first real evidence that the 512-span default sits under the body cap. With the endpoint down, 200k spans cost exactly one send per flush pass rather than one per span — the transport still retries within a send, so a pass can make several HTTP attempts.

packages/core 1305 pass (62 suites), packages/node 1000 pass (35 suites) — identical under the edge runtime environment — lint clean, public API references regenerated.

Release info Sub-libraries affected

Libraries affected

  • All of them
  • posthog-js (web)
  • posthog-js-lite (web lite)
  • posthog-node
  • posthog-react-native
  • @posthog/react-native-plugin
  • @posthog/react
  • @posthog/ai
  • @posthog/convex
  • @posthog/next
  • @posthog/nextjs-config
  • @posthog/nuxt
  • @posthog/openfeature-node-provider
  • @posthog/openfeature-web-provider
  • @posthog/rollup-plugin
  • @posthog/webpack-plugin
  • @posthog/types
  • @posthog/browser-common

@posthog/core is also bumped (minor); it has no checkbox above.

Checklist

  • Tests for new code
  • Accounted for the impact of any changes across different platforms
  • Accounted for backwards compatibility of any changes (no breaking changes!)
  • Took care not to unnecessarily increase the bundle size

Backwards compatibility caveat: all runtime surface is additive, but IPostHog gains three required members — a compile-time break for implementors only, matching the metrics precedent. Bundle: the traces module is core-resident and the browser is not wired up in this PR.

If releasing new changes

  • Ran pnpm changeset to generate a changeset file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Built with Claude Code, directed by @turnipdabeets, from the merged traces capability spec in sdk-specs.

Decisions worth flagging for review:

  • Top-level methods over a posthog.traces.* namespace — matches how the OTel API reads and keeps the common call short.
  • Vertical slice over a horizontal one. An earlier plan split encoding, transport and API into separate PRs; that was rejected because each merged PR is releasable, and a released half-feature isn't useful to anyone. Each PR in this stack is a feature a developer could adopt.
  • OtlpSpanKeyValue is an alias of the logs/metrics OtlpKeyValue rather than a separate declaration — one encoder produces all three payloads. The span-flavoured name stays so the span types read as span types.
  • Wire types live in @posthog/types only, matching how the logs and metrics wire types are already organised.

Put through five rounds of independent fresh-context review, each reviewer required to demonstrate a finding by running it rather than by reading. Bugs they caught, all fixed here and each now pinned by a test that fails when the fix is reverted:

  • a background flush trigger per span end, stacking an unbounded number of concurrent drain loops on a busy service (measured: 193 outstanding, 14× CPU degradation, linear heap growth)
  • the depth-based flush cancelling its own retry backoff, so an outage cost ~1,500 requests instead of one
  • span names, event names, status.message and traceState skipping the sanitiser attributes go through, so one lone surrogate would 400 an entire 512-span batch
  • the retry budget charging fresh spans to a batch's already-spent budget
  • a throwing accessor in resourceAttributes rethrowing on every flush, exporting nothing, forever
  • the waitUntil serverless path having no traces coverage at all, and a span-only handler never registering with it

Several of those were introduced by earlier rounds' own fixes, which is why the loop ran as long as it did.

@turnipdabeets turnipdabeets self-assigned this Aug 20, 2026
@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

posthog-node Compliance Report

Date: 2026-09-08 17:41:28 UTC
Duration: 198253ms

✅ All Tests Passed!

111/111 tests passed


Capture_V1 Tests

94/94 tests passed

View Details
Test Status Duration
Endpoint And Method.Targets V1 Endpoint 97ms
Endpoint And Method.Does Not Use Legacy Endpoints 13ms
Required Headers.Has Authorization Bearer Header 11ms
Required Headers.Has Content Type Json 11ms
Required Headers.Has Posthog Sdk Info Format 11ms
Required Headers.Has Posthog Attempt Header 10ms
Required Headers.Has Posthog Request Id 12ms
Required Headers.Has Posthog Request Timestamp 11ms
Required Headers.Has User Agent 10ms
Body Format.Body Has Created At And Batch 9ms
Body Format.No Api Key In Body 7ms
Body Format.No Sent At In Body 8ms
Event Format.Event Has Required Root Fields 7ms
Event Format.Event Uuid Is Valid 7ms
Event Format.Event Timestamp Is Rfc3339 8ms
Event Format.Distinct Id Is String 6ms
Event Format.Distinct Id At Root Not Properties 8ms
Event Format.Custom Properties Preserved 7ms
Event Format.Set Properties Preserved 8ms
Event Format.Set Once Properties Preserved 8ms
Event Format.Groups Properties Preserved 7ms
Event Format.Sdk Generates Uuid If Not Provided 8ms
Event Format.Event Has Required Root Fields Batch 11ms
Event Format.Event Uuid Is Valid Batch 10ms
Event Format.Event Timestamp Is Rfc3339 Batch 11ms
Event Format.Distinct Id Is String Batch 10ms
Event Format.Distinct Id At Root Not Properties Batch 10ms
Event Format.Custom Properties Preserved Batch 11ms
Event Format.Set Properties Preserved Batch 10ms
Event Format.Set Once Properties Preserved Batch 11ms
Event Format.Groups Properties Preserved Batch 11ms
Event Format.Sdk Generates Uuid If Not Provided Batch 10ms
Batch Behavior.Multiple Events In Single Batch 13ms
Batch Behavior.Batch Envelope Smoke 11ms
Batch Behavior.Flush With No Events Sends Nothing 4ms
Batch Behavior.Flush At Triggers Batch 1009ms
Batch Behavior.Created At Reflects Batch Creation Time 10ms
Deduplication.Generates Unique Uuids 18ms
Deduplication.Different Events Same Content Different Uuids 9ms
Deduplication.Preserves Uuid On Retry 6017ms
Deduplication.Preserves Timestamp On Retry 6020ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 6020ms
Deduplication.No Duplicate Events In Batch 17ms
Header Behavior On Retry.Attempt Header Starts At One 8ms
Header Behavior On Retry.Attempt Header Increments On Retry 12028ms
Header Behavior On Retry.Request Id Preserved On Retry 6019ms
Header Behavior On Retry.Different Requests Have Different Request Ids 2018ms
Header Behavior On Retry.Request Timestamp Changes On Retry 6021ms
Response Format Validation.Success Response Has Uuid Keyed Results 9ms
Response Format Validation.Success Response Has Ok For Each Event 10ms
Response Format Validation.Success No Retry After When All Ok 11ms
Response Format Validation.Success Retry After Present When Retry Events 1015ms
Response Format Validation.Success No Retry After When Drop Only 18ms
Response Format Validation.Response Echoes Request Id 8ms
Retry Behavior.Retries On 408 6017ms
Retry Behavior.Retries On 500 6018ms
Retry Behavior.Retries On 503 7023ms
Retry Behavior.Retries On 504 6020ms
Retry Behavior.Retryable Errors Have Retry After 3017ms
Retry Behavior.Respects Retry After On Retryable Error 11023ms
Retry Behavior.Does Not Retry On 400 2012ms
Retry Behavior.Does Not Retry On 401 2012ms
Retry Behavior.Does Not Retry On 402 2013ms
Retry Behavior.Does Not Retry On 413 2012ms
Retry Behavior.Does Not Retry On 415 2013ms
Retry Behavior.Non Retryable Errors Have No Retry After 2010ms
Retry Behavior.Implements Backoff 18039ms
Retry Behavior.Max Retries Respected 18038ms
Partial Batch Handling.Handles 200 Full Success 2013ms
Partial Batch Handling.Handles 200 With All Ok 3015ms
Partial Batch Handling.Does Not Retry Dropped Events 3014ms
Partial Batch Handling.Does Not Retry Limited Events 3015ms
Partial Batch Handling.Prunes Ok Events On Partial Retry 6022ms
Partial Batch Handling.Prunes Dropped Events On Partial Retry 6022ms
Partial Batch Handling.Retries Only Retry Events From Partial 6023ms
Partial Batch Handling.Partial Retry Preserves Uuids 6023ms
Partial Batch Handling.Partial Retry Attempt Header Increments 6022ms
Partial Batch Handling.Partial Retry Request Id Preserved 6021ms
Partial Batch Handling.Respects Retry After On Partial 8024ms
Partial Batch Handling.Unknown Result Treated As Terminal 3014ms
Partial Batch Handling.Mixed Ok Drop Limited No Retry 3018ms
Compression.Sends Gzip Content Encoding 9ms
Compression.No Content Encoding When Disabled 7ms
Compression.Compressed Body Is Decompressible 8ms
Error Handling.Does Not Retry On Unknown 4Xx 2011ms
Event Options.Cookieless Mode Override 10ms
Event Options.Disable Skew Correction Override 7ms
Event Options.Process Person Profile Override 8ms
Event Options.Product Tour Id Override 7ms
Event Options.Unset Options Omitted 7ms
Event Options.Options Override In Batch 10ms
Geoip And Historical Migration.Geoip Disable Injected Into Properties 7ms
Geoip And Historical Migration.Historical Migration Set In Body 7ms
Geoip And Historical Migration.Historical Migration Absent By Default 8ms

Feature_Flags Tests

17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id 11ms
Request Payload.Flags Request Uses V2 Query Param 10ms
Request Payload.Flags Request Hits Flags Path Not Decide 9ms
Request Payload.Flags Request Omits Authorization Header 9ms
Request Payload.Token In Flags Body Matches Init 10ms
Request Payload.Groups Round Trip 8ms
Request Payload.Groups Default To Empty Object 9ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False 10ms
Request Payload.Disable Geoip Omitted Defaults To False 10ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key 9ms
Request Lifecycle.No Flags Request On Init Alone 3ms
Request Lifecycle.No Flags Request On Normal Capture 8ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests 13ms
Request Lifecycle.Mock Response Value Is Returned To Caller 9ms
Retry Behavior.Retries Flags On 502 266ms
Retry Behavior.Retries Flags On 504 264ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event 11ms

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

posthog-js Compliance Report

Date: 2026-09-08 17:38:12 UTC
Duration: 88852ms

✅ All Tests Passed!

26/26 tests passed


Capture Tests

26/26 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields Client 135ms
Format Validation.Event Has Uuid 18ms
Format Validation.Event Has Lib Properties 13ms
Format Validation.Distinct Id Is String Client 14ms
Format Validation.Token Is Present Client 15ms
Format Validation.Custom Properties Preserved 16ms
Format Validation.Event Has Timestamp 13ms
Retry Behavior.Retries On 503 5017ms
Retry Behavior.Does Not Retry On 400 2017ms
Retry Behavior.Does Not Retry On 401 2014ms
Retry Behavior.Respects Retry After Header 5019ms
Retry Behavior.Implements Backoff 15028ms
Retry Behavior.Retries On 500 5013ms
Retry Behavior.Retries On 502 5017ms
Retry Behavior.Retries On 504 5014ms
Retry Behavior.Max Retries Respected 15027ms
Deduplication.Generates Unique Uuids 22ms
Deduplication.Preserves Uuid On Retry 5015ms
Deduplication.Preserves Uuid And Timestamp On Retry 10022ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 5021ms
Deduplication.No Duplicate Events In Batch 21ms
Deduplication.Different Events Have Different Uuids 14ms
Batch Format.Flush With No Events Sends Nothing 5ms
Error Handling.Does Not Retry On 403 2013ms
Error Handling.Does Not Retry On 413 2014ms
Error Handling.Retries On 408 5014ms

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Size Change: +147 kB (+0.71%)

Total Size: 20.8 MB

📦 View Changed
Filename Size Change
packages/browser/dist/all-external-dependencies.js 366 kB +60 B (+0.02%)
packages/browser/dist/array.full.es5.js 499 kB +294 B (+0.06%)
packages/browser/dist/array.full.js 616 kB +327 B (+0.05%)
packages/browser/dist/array.full.no-********.js 676 kB +327 B (+0.05%)
packages/browser/dist/array.js 288 kB +267 B (+0.09%)
packages/browser/dist/array.no-********.js 329 kB +267 B (+0.08%)
packages/browser/dist/default-extensions.js 286 kB +267 B (+0.09%)
packages/browser/dist/extension-bundles.js 158 kB +266 B (+0.17%)
packages/browser/dist/lazy-********.js 208 kB +60 B (+0.03%)
packages/browser/dist/main.js 293 kB +267 B (+0.09%)
packages/browser/dist/module.full.js 621 kB +327 B (+0.05%)
packages/browser/dist/module.full.no-********.js 680 kB +327 B (+0.05%)
packages/browser/dist/module.js 292 kB +267 B (+0.09%)
packages/browser/dist/module.mjs 292 kB +267 B (+0.09%)
packages/browser/dist/module.no-********.js 333 kB +267 B (+0.08%)
packages/browser/dist/posthog-********.js 208 kB +60 B (+0.03%)
packages/browser/dist/recorder-v2.js 130 kB +60 B (+0.05%)
packages/browser/dist/recorder.js 130 kB +60 B (+0.05%)
packages/browser/dist/rrweb-plugin-console-record.js 7.83 kB +30 B (+0.38%)
packages/browser/dist/rrweb.js 322 kB +90 B (+0.03%)
packages/core/dist/index.js 25 kB +2.37 kB (+10.46%) ⚠️
packages/core/dist/index.mjs 1.93 kB +240 B (+14.18%) ⚠️
packages/core/dist/posthog-core-stateless.js 47.4 kB +411 B (+0.88%)
packages/core/dist/posthog-core-stateless.mjs 44 kB +411 B (+0.94%)
packages/core/dist/traces/config.js 4.62 kB +4.62 kB (new file) 🆕
packages/core/dist/traces/config.mjs 3.27 kB +3.27 kB (new file) 🆕
packages/core/dist/traces/context.js 1.64 kB +1.64 kB (new file) 🆕
packages/core/dist/traces/context.mjs 318 B +318 B (new file) 🆕
packages/core/dist/traces/ids.js 3.2 kB +3.2 kB (new file) 🆕
packages/core/dist/traces/ids.mjs 1.52 kB +1.52 kB (new file) 🆕
packages/core/dist/traces/index.js 24.9 kB +24.9 kB (new file) 🆕
packages/core/dist/traces/index.mjs 22.6 kB +22.6 kB (new file) 🆕
packages/core/dist/traces/otlp.js 6.33 kB +6.33 kB (new file) 🆕
packages/core/dist/traces/otlp.mjs 4.11 kB +4.11 kB (new file) 🆕
packages/core/dist/traces/sanitize.js 3.59 kB +3.59 kB (new file) 🆕
packages/core/dist/traces/sanitize.mjs 1.88 kB +1.88 kB (new file) 🆕
packages/core/dist/traces/span.js 19.6 kB +19.6 kB (new file) 🆕
packages/core/dist/traces/span.mjs 16.4 kB +16.4 kB (new file) 🆕
packages/core/dist/traces/traceparent.js 4.54 kB +4.54 kB (new file) 🆕
packages/core/dist/traces/traceparent.mjs 2.54 kB +2.54 kB (new file) 🆕
packages/core/dist/traces/types.js 585 B +585 B (new file) 🆕
packages/core/dist/traces/types.mjs 12 B +12 B (new file) 🆕
packages/core/dist/utils/json-utils.js 7.44 kB +696 B (+10.32%) ⚠️
packages/core/dist/utils/json-utils.mjs 5.02 kB +565 B (+12.69%) ⚠️
packages/core/dist/utils/otlp-********.js 2.97 kB +210 B (+7.6%) 🔍
packages/core/dist/utils/otlp-********.mjs 1.32 kB +148 B (+12.6%) ⚠️
packages/node/dist/client.js 61.9 kB +2.31 kB (+3.88%)
packages/node/dist/client.mjs 58.4 kB +2.22 kB (+3.95%)
packages/node/dist/entrypoints/index.node.js 6.45 kB +746 B (+13.09%) ⚠️
packages/node/dist/entrypoints/index.node.mjs 1.77 kB +344 B (+24.04%) 🚨
packages/node/dist/extensions/context/span-context.node.js 1.8 kB +1.8 kB (new file) 🆕
packages/node/dist/extensions/context/span-context.node.mjs 355 B +355 B (new file) 🆕
packages/node/dist/host-os.node.js 1.8 kB +1.8 kB (new file) 🆕
packages/node/dist/host-os.node.mjs 349 B +349 B (new file) 🆕
packages/rrweb/all/dist/rrweb-all.cjs 645 kB +304 B (+0.05%)
packages/rrweb/all/dist/rrweb-all.js 644 kB +304 B (+0.05%)
packages/rrweb/all/dist/rrweb-all.umd.cjs 676 kB +304 B (+0.05%)
packages/rrweb/all/dist/rrweb-all.umd.min.cjs 334 kB +138 B (+0.04%)
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.cjs 17.2 kB +96 B (+0.56%)
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.js 17.1 kB +96 B (+0.57%)
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.umd.cjs 16.4 kB +96 B (+0.59%)
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.umd.min.cjs 8.75 kB +42 B (+0.48%)
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.cjs 6.85 kB +96 B (+1.42%)
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.js 6.75 kB +96 B (+1.44%)
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.umd.cjs 7.14 kB +96 B (+1.36%)
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.umd.min.cjs 3.77 kB +42 B (+1.13%)
packages/rrweb/record/dist/rrweb-record.cjs 220 kB +96 B (+0.04%)
packages/rrweb/record/dist/rrweb-record.js 220 kB +96 B (+0.04%)
packages/rrweb/record/dist/rrweb-record.umd.cjs 224 kB +96 B (+0.04%)
packages/rrweb/record/dist/rrweb-record.umd.min.cjs 110 kB +46 B (+0.04%)
packages/rrweb/replay/dist/rrweb-replay.cjs 429 kB +304 B (+0.07%)
packages/rrweb/replay/dist/rrweb-replay.js 429 kB +304 B (+0.07%)
packages/rrweb/replay/dist/rrweb-replay.umd.cjs 453 kB +304 B (+0.07%)
packages/rrweb/replay/dist/rrweb-replay.umd.min.cjs 225 kB +138 B (+0.06%)
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.cjs 142 kB +96 B (+0.07%)
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.js 142 kB +96 B (+0.07%)
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.umd.cjs 155 kB +96 B (+0.06%)
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.umd.min.cjs 76.1 kB +46 B (+0.06%)
packages/rrweb/rrdom/dist/rrdom.cjs 167 kB +96 B (+0.06%)
packages/rrweb/rrdom/dist/rrdom.js 167 kB +96 B (+0.06%)
packages/rrweb/rrdom/dist/rrdom.umd.cjs 179 kB +96 B (+0.05%)
packages/rrweb/rrdom/dist/rrdom.umd.min.cjs 86.9 kB +46 B (+0.05%)
packages/rrweb/rrweb-snapshot/dist/rebuild-********.cjs 0 B -133 kB (removed) 🏆
packages/rrweb/rrweb-snapshot/dist/rebuild-B8YF-X1O.cjs 133 kB +133 kB (new file) 🆕
packages/rrweb/rrweb-snapshot/dist/record.umd.cjs 93.7 kB +112 B (+0.12%)
packages/rrweb/rrweb-snapshot/dist/record.umd.min.cjs 44 kB +46 B (+0.1%)
packages/rrweb/rrweb-snapshot/dist/replay.umd.cjs 206 kB +112 B (+0.05%)
packages/rrweb/rrweb-snapshot/dist/replay.umd.min.cjs 90.7 kB +46 B (+0.05%)
packages/rrweb/rrweb-snapshot/dist/rrweb-********.umd.cjs 248 kB +112 B (+0.05%)
packages/rrweb/rrweb-snapshot/dist/rrweb-********.umd.min.cjs 111 kB +46 B (+0.04%)
packages/rrweb/rrweb-snapshot/dist/types-********.cjs 49.5 kB +96 B (+0.19%)
packages/rrweb/rrweb-snapshot/dist/types-********.js 44.2 kB +96 B (+0.22%)
packages/rrweb/rrweb/dist/rrweb.cjs 630 kB +304 B (+0.05%)
packages/rrweb/rrweb/dist/rrweb.js 629 kB +304 B (+0.05%)
packages/rrweb/rrweb/dist/rrweb.umd.cjs 658 kB +304 B (+0.05%)
packages/rrweb/rrweb/dist/rrweb.umd.min.cjs 324 kB +138 B (+0.04%)
packages/rrweb/utils/dist/rrweb-utils.cjs 9.81 kB +150 B (+1.55%)
packages/rrweb/utils/dist/rrweb-utils.js 9.3 kB +150 B (+1.64%)
packages/rrweb/utils/dist/rrweb-utils.umd.cjs 10.3 kB +96 B (+0.94%)
packages/rrweb/utils/dist/rrweb-utils.umd.min.cjs 4.97 kB +42 B (+0.85%)
packages/types/dist/traces.js 585 B +585 B (new file) 🆕
packages/types/dist/traces.mjs 12 B +12 B (new file) 🆕
ℹ️ View Unchanged
Filename Size
packages/ai/dist/adk/index.cjs 35.6 kB
packages/ai/dist/adk/index.mjs 35.4 kB
packages/ai/dist/anthropic/index.cjs 35.9 kB
packages/ai/dist/anthropic/index.mjs 34.5 kB
packages/ai/dist/gemini/index.cjs 33.5 kB
packages/ai/dist/gemini/index.mjs 33.3 kB
packages/ai/dist/index.cjs 50.2 kB
packages/ai/dist/index.mjs 50 kB
packages/ai/dist/langchain/index.cjs 36.7 kB
packages/ai/dist/langchain/index.mjs 36.6 kB
packages/ai/dist/langchain/middleware/index.cjs 42.8 kB
packages/ai/dist/langchain/middleware/index.mjs 42.5 kB
packages/ai/dist/openai-agents/index.cjs 29.5 kB
packages/ai/dist/openai-agents/index.mjs 29.4 kB
packages/ai/dist/openai/index.cjs 78.8 kB
packages/ai/dist/openai/index.mjs 78.2 kB
packages/ai/dist/otel/index.cjs 15.4 kB
packages/ai/dist/otel/index.mjs 15.2 kB
packages/ai/dist/vercel/index.cjs 40.9 kB
packages/ai/dist/vercel/index.mjs 40.8 kB
packages/browser-common/dist/client.js 585 B
packages/browser-common/dist/client.mjs 12 B
packages/browser-common/dist/config.js 1.52 kB
packages/browser-common/dist/config.mjs 216 B
packages/browser-common/dist/constants.js 1.75 kB
packages/browser-common/dist/constants.mjs 219 B
packages/browser-common/dist/disposable.js 1.72 kB
packages/browser-common/dist/disposable.mjs 386 B
packages/browser-common/dist/extension-runtime.js 3.17 kB
packages/browser-common/dist/extension-runtime.mjs 1.83 kB
packages/browser-common/dist/extension.js 585 B
packages/browser-common/dist/extension.mjs 12 B
packages/browser-common/dist/index.js 2.98 kB
packages/browser-common/dist/index.mjs 130 B
packages/browser-common/dist/persistence.js 585 B
packages/browser-common/dist/persistence.mjs 12 B
packages/browser-common/dist/pubsub.js 2.63 kB
packages/browser-common/dist/pubsub.mjs 1.35 kB
packages/browser-common/dist/token.js 585 B
packages/browser-common/dist/token.mjs 12 B
packages/browser-common/dist/types/compression.js 1.37 kB
packages/browser-common/dist/types/compression.mjs 93 B
packages/browser-common/dist/types/index.js 3.68 kB
packages/browser-common/dist/types/index.mjs 144 B
packages/browser-common/dist/types/network-recording.js 585 B
packages/browser-common/dist/types/network-recording.mjs 12 B
packages/browser-common/dist/types/remote-config.js 585 B
packages/browser-common/dist/types/remote-config.mjs 12 B
packages/browser-common/dist/types/surveys.js 4.61 kB
packages/browser-common/dist/types/surveys.mjs 2.17 kB
packages/browser-common/dist/utils/array-at-********.js 619 B
packages/browser-common/dist/utils/array-at-********.mjs 437 B
packages/browser-common/dist/utils/array-find-last-********.js 604 B
packages/browser-common/dist/utils/array-find-last-********.mjs 422 B
packages/browser-common/dist/utils/autocapture-utils.js 24.6 kB
packages/browser-common/dist/utils/autocapture-utils.mjs 18.6 kB
packages/browser-common/dist/utils/blocked-uas.js 2.2 kB
packages/browser-common/dist/utils/blocked-uas.mjs 598 B
packages/browser-common/dist/utils/cookie-utils.js 1.99 kB
packages/browser-common/dist/utils/cookie-utils.mjs 673 B
packages/browser-common/dist/utils/device-model-utils.js 2.08 kB
packages/browser-common/dist/utils/device-model-utils.mjs 678 B
packages/browser-common/dist/utils/element-utils.js 2.56 kB
packages/browser-common/dist/utils/element-utils.mjs 804 B
packages/browser-common/dist/utils/elements-chain-utils.js 2.86 kB
packages/browser-common/dist/utils/elements-chain-utils.mjs 1.23 kB
packages/browser-common/dist/utils/encode-utils.js 1.49 kB
packages/browser-common/dist/utils/encode-utils.mjs 205 B
packages/browser-common/dist/utils/event-utils.js 16 kB
packages/browser-common/dist/utils/event-utils.mjs 10.2 kB
packages/browser-common/dist/utils/general-utils.js 7.91 kB
packages/browser-common/dist/utils/general-utils.mjs 4.86 kB
packages/browser-common/dist/utils/globals.js 2.83 kB
packages/browser-common/dist/utils/globals.mjs 842 B
packages/browser-common/dist/utils/logger.js 3.5 kB
packages/browser-common/dist/utils/logger.mjs 1.61 kB
packages/browser-common/dist/utils/matcher-utils.js 2.94 kB
packages/browser-common/dist/utils/matcher-utils.mjs 1.33 kB
packages/browser-common/dist/utils/promise-utils.js 1.45 kB
packages/browser-common/dist/utils/promise-utils.mjs 169 B
packages/browser-common/dist/utils/property-utils.js 3.63 kB
packages/browser-common/dist/utils/property-utils.mjs 1.6 kB
packages/browser-common/dist/utils/prototype-utils.js 3.61 kB
packages/browser-common/dist/utils/prototype-utils.mjs 1.86 kB
packages/browser-common/dist/utils/regex-utils.js 1.55 kB
packages/browser-common/dist/utils/regex-utils.mjs 71 B
packages/browser-common/dist/utils/request-utils.js 7.17 kB
packages/browser-common/dist/utils/request-utils.mjs 4.49 kB
packages/browser-common/dist/utils/simple-event-emitter.js 1.86 kB
packages/browser-common/dist/utils/simple-event-emitter.mjs 553 B
packages/browser-common/dist/utils/stylesheet-loader.js 2.23 kB
packages/browser-common/dist/utils/stylesheet-loader.mjs 823 B
packages/browser-common/dist/utils/type-utils.js 1.68 kB
packages/browser-common/dist/utils/type-utils.mjs 258 B
packages/browser-common/dist/utils/url-targeting-utils.js 2.45 kB
packages/browser-common/dist/utils/url-targeting-utils.mjs 863 B
packages/browser-common/dist/utils/uuidv7.js 6.98 kB
packages/browser-common/dist/utils/uuidv7.mjs 5.37 kB
packages/browser-next/dist/analytics-********.js 1.68 kB
packages/browser-next/dist/analytics-********.mjs 219 B
packages/browser-next/dist/analytics-options.js 585 B
packages/browser-next/dist/analytics-options.mjs 12 B
packages/browser-next/dist/analytics.js 6.62 kB
packages/browser-next/dist/analytics.mjs 5.15 kB
packages/browser-next/dist/bot-filter.js 2.38 kB
packages/browser-next/dist/bot-filter.mjs 1.09 kB
packages/browser-next/dist/capture-v1.js 27.8 kB
packages/browser-next/dist/capture-v1.mjs 25.3 kB
packages/browser-next/dist/core.js 1.69 kB
packages/browser-next/dist/core.mjs 185 B
packages/browser-next/dist/extensions/registry.js 3.41 kB
packages/browser-next/dist/extensions/registry.mjs 2.11 kB
packages/browser-next/dist/id.js 2.25 kB
packages/browser-next/dist/id.mjs 983 B
packages/browser-next/dist/index.js 2.68 kB
packages/browser-next/dist/index.mjs 1.18 kB
packages/browser-next/dist/lane.js 18.1 kB
packages/browser-next/dist/lane.mjs 16.9 kB
packages/browser-next/dist/logger.js 1.87 kB
packages/browser-next/dist/logger.mjs 581 B
packages/browser-next/dist/posthog.js 33.2 kB
packages/browser-next/dist/posthog.mjs 30.9 kB
packages/browser-next/dist/rate-limiter.js 2.89 kB
packages/browser-next/dist/rate-limiter.mjs 1.58 kB
packages/browser-next/dist/request.js 4.61 kB
packages/browser-next/dist/request.mjs 3.21 kB
packages/browser-next/dist/state.js 24.9 kB
packages/browser-next/dist/state.mjs 23.2 kB
packages/browser-next/dist/types.js 585 B
packages/browser-next/dist/types.mjs 12 B
packages/browser-next/dist/version.js 1.31 kB
packages/browser-next/dist/version.mjs 45 B
packages/browser/dist/conversations.js 69 kB
packages/browser/dist/crisp-chat-integration.js 2 kB
packages/browser/dist/customizations.full.js 18.1 kB
packages/browser/dist/customizations.js 17.7 kB
packages/browser/dist/dead-clicks-autocapture.js 18.4 kB
packages/browser/dist/element-inference.js 5.62 kB
packages/browser/dist/exception-autocapture.js 13.7 kB
packages/browser/dist/external-scripts-loader.js 3.55 kB
packages/browser/dist/intercom-integration.js 2.05 kB
packages/browser/dist/logs.js 5.83 kB
packages/browser/dist/module.slim.js 146 kB
packages/browser/dist/module.slim.no-********.js 161 kB
packages/browser/dist/product-tours-preview.js 80.8 kB
packages/browser/dist/product-tours.js 122 kB
packages/browser/dist/rrweb-types.js 2.41 kB
packages/browser/dist/surveys-preview.js 79.5 kB
packages/browser/dist/surveys.js 100 kB
packages/browser/dist/tracing-headers.js 3.74 kB
packages/browser/dist/web-vitals-soft-navs.js 9.87 kB
packages/browser/dist/web-vitals-with-attribution-soft-navs.js 25.4 kB
packages/browser/dist/web-vitals-with-attribution.js 25.3 kB
packages/browser/dist/web-vitals.js 9.85 kB
packages/browser/react/dist/esm/index.js 22.1 kB
packages/browser/react/dist/esm/slim/index.js 18.5 kB
packages/browser/react/dist/esm/surveys/index.js 3.61 kB
packages/browser/react/dist/umd/index.js 26.4 kB
packages/browser/react/dist/umd/slim/index.js 22.3 kB
packages/browser/react/dist/umd/surveys/index.js 5.63 kB
packages/convex/dist/client/feature-flags/crypto.js 76 B
packages/convex/dist/client/feature-flags/evaluator.js 14.9 kB
packages/convex/dist/client/feature-flags/index.js 196 B
packages/convex/dist/client/feature-flags/match-********.js 5.08 kB
packages/convex/dist/client/feature-flags/types.js 44 B
packages/convex/dist/client/index.js 14.8 kB
packages/convex/dist/component/_generated/api.js 712 B
packages/convex/dist/component/_generated/component.js 212 B
packages/convex/dist/component/_generated/dataModel.js 230 B
packages/convex/dist/component/_generated/server.js 3.74 kB
packages/convex/dist/component/convex.config.js 1.66 kB
packages/convex/dist/component/crons.js 969 B
packages/convex/dist/component/lib.js 24.8 kB
packages/convex/dist/component/schema.js 1.17 kB
packages/convex/dist/component/version.js 67 B
packages/core/dist/cookie.js 5.44 kB
packages/core/dist/cookie.mjs 3.12 kB
packages/core/dist/error-tracking/chunk-ids.js 2.64 kB
packages/core/dist/error-tracking/chunk-ids.mjs 1.31 kB
packages/core/dist/error-tracking/coercers/dom-exception-coercer.js 2.4 kB
packages/core/dist/error-tracking/coercers/dom-exception-coercer.mjs 993 B
packages/core/dist/error-tracking/coercers/error-coercer.js 2.23 kB
packages/core/dist/error-tracking/coercers/error-coercer.mjs 888 B
packages/core/dist/error-tracking/coercers/error-event-coercer.js 2.45 kB
packages/core/dist/error-tracking/coercers/error-event-coercer.mjs 1.05 kB
packages/core/dist/error-tracking/coercers/event-coercer.js 1.92 kB
packages/core/dist/error-tracking/coercers/event-coercer.mjs 548 B
packages/core/dist/error-tracking/coercers/index.js 5.82 kB
packages/core/dist/error-tracking/coercers/index.mjs 326 B
packages/core/dist/error-tracking/coercers/object-coercer.js 4.13 kB
packages/core/dist/error-tracking/coercers/object-coercer.mjs 2.53 kB
packages/core/dist/error-tracking/coercers/primitive-coercer.js 1.76 kB
packages/core/dist/error-tracking/coercers/primitive-coercer.mjs 419 B
packages/core/dist/error-tracking/coercers/promise-rejection-event.js 2.69 kB
packages/core/dist/error-tracking/coercers/promise-rejection-event.mjs 1.25 kB
packages/core/dist/error-tracking/coercers/string-coercer.js 2.11 kB
packages/core/dist/error-tracking/coercers/string-coercer.mjs 820 B
packages/core/dist/error-tracking/coercers/utils.js 2.16 kB
packages/core/dist/error-tracking/coercers/utils.mjs 716 B
packages/core/dist/error-tracking/error-properties-builder.js 5.66 kB
packages/core/dist/error-tracking/error-properties-builder.mjs 4.23 kB
packages/core/dist/error-tracking/exception-steps.js 6.1 kB
packages/core/dist/error-tracking/exception-steps.mjs 3.83 kB
packages/core/dist/error-tracking/index.js 4.62 kB
packages/core/dist/error-tracking/index.mjs 222 B
packages/core/dist/error-tracking/parsers/base.js 2.11 kB
packages/core/dist/error-tracking/parsers/base.mjs 640 B
packages/core/dist/error-tracking/parsers/chrome.js 2.83 kB
packages/core/dist/error-tracking/parsers/chrome.mjs 1.32 kB
packages/core/dist/error-tracking/parsers/gecko.js 2.57 kB
packages/core/dist/error-tracking/parsers/gecko.mjs 1.13 kB
packages/core/dist/error-tracking/parsers/index.js 4.85 kB
packages/core/dist/error-tracking/parsers/index.mjs 2.01 kB
packages/core/dist/error-tracking/parsers/node.js 4.31 kB
packages/core/dist/error-tracking/parsers/node.mjs 2.95 kB
packages/core/dist/error-tracking/parsers/opera.js 2.35 kB
packages/core/dist/error-tracking/parsers/opera.mjs 746 B
packages/core/dist/error-tracking/parsers/safari.js 1.98 kB
packages/core/dist/error-tracking/parsers/safari.mjs 574 B
packages/core/dist/error-tracking/parsers/winjs.js 1.82 kB
packages/core/dist/error-tracking/parsers/winjs.mjs 426 B
packages/core/dist/error-tracking/release.js 1.52 kB
packages/core/dist/error-tracking/release.mjs 203 B
packages/core/dist/error-tracking/types.js 1.42 kB
packages/core/dist/error-tracking/types.mjs 131 B
packages/core/dist/error-tracking/utils.js 1.9 kB
packages/core/dist/error-tracking/utils.mjs 604 B
packages/core/dist/eventemitter.js 1.88 kB
packages/core/dist/eventemitter.mjs 571 B
packages/core/dist/featureFlagLocalEvaluation.js 22.2 kB
packages/core/dist/featureFlagLocalEvaluation.mjs 19.6 kB
packages/core/dist/featureFlagUtils.js 8.59 kB
packages/core/dist/featureFlagUtils.mjs 5.49 kB
packages/core/dist/gzip.js 5.88 kB
packages/core/dist/gzip.mjs 3.87 kB
packages/core/dist/logs/index.js 10.9 kB
packages/core/dist/logs/index.mjs 9.16 kB
packages/core/dist/logs/logs-utils.js 6.69 kB
packages/core/dist/logs/logs-utils.mjs 4.51 kB
packages/core/dist/logs/types.js 585 B
packages/core/dist/logs/types.mjs 12 B
packages/core/dist/metrics/config.js 2.05 kB
packages/core/dist/metrics/config.mjs 735 B
packages/core/dist/metrics/index.js 14.5 kB
packages/core/dist/metrics/index.mjs 12 kB
packages/core/dist/metrics/metrics-utils.js 3.75 kB
packages/core/dist/metrics/metrics-utils.mjs 1.71 kB
packages/core/dist/metrics/types.js 585 B
packages/core/dist/metrics/types.mjs 12 B
packages/core/dist/posthog-core.js 49.6 kB
packages/core/dist/posthog-core.mjs 43.9 kB
packages/core/dist/surveys/activation.js 2.29 kB
packages/core/dist/surveys/activation.mjs 572 B
packages/core/dist/surveys/events.js 4.36 kB
packages/core/dist/surveys/events.mjs 2.05 kB
packages/core/dist/surveys/index.js 6.64 kB
packages/core/dist/surveys/index.mjs 798 B
packages/core/dist/surveys/keys.js 1.8 kB
packages/core/dist/surveys/keys.mjs 350 B
packages/core/dist/surveys/property-********.js 3.78 kB
packages/core/dist/surveys/property-********.mjs 2.14 kB
packages/core/dist/surveys/translations.js 9.18 kB
packages/core/dist/surveys/translations.mjs 6.83 kB
packages/core/dist/surveys/validation.js 3.15 kB
packages/core/dist/surveys/validation.mjs 1.51 kB
packages/core/dist/testing/index.js 2.76 kB
packages/core/dist/testing/index.mjs 79 B
packages/core/dist/testing/PostHogCoreTestClient.js 3.33 kB
packages/core/dist/testing/PostHogCoreTestClient.mjs 1.82 kB
packages/core/dist/testing/test-utils.js 2.9 kB
packages/core/dist/testing/test-utils.mjs 1.11 kB
packages/core/dist/tracing-headers.js 3.48 kB
packages/core/dist/tracing-headers.mjs 2.08 kB
packages/core/dist/types.js 8.39 kB
packages/core/dist/types.mjs 5.23 kB
packages/core/dist/utils/bot-detection.js 3.38 kB
packages/core/dist/utils/bot-detection.mjs 1.96 kB
packages/core/dist/utils/browser-utils.js 1.57 kB
packages/core/dist/utils/browser-utils.mjs 182 B
packages/core/dist/utils/bucketed-rate-limiter.js 4.32 kB
packages/core/dist/utils/bucketed-rate-limiter.mjs 2.22 kB
packages/core/dist/utils/index.js 16.4 kB
packages/core/dist/utils/index.mjs 3.38 kB
packages/core/dist/utils/logger.js 2.68 kB
packages/core/dist/utils/logger.mjs 1.29 kB
packages/core/dist/utils/number-utils.js 3.42 kB
packages/core/dist/utils/number-utils.mjs 1.68 kB
packages/core/dist/utils/otlp-any-value.js 7.96 kB
packages/core/dist/utils/otlp-any-value.mjs 5.77 kB
packages/core/dist/utils/promise-queue.js 2.58 kB
packages/core/dist/utils/promise-queue.mjs 1.25 kB
packages/core/dist/utils/string-utils.js 3.83 kB
packages/core/dist/utils/string-utils.mjs 1.97 kB
packages/core/dist/utils/type-utils.js 7.52 kB
packages/core/dist/utils/type-utils.mjs 3.27 kB
packages/core/dist/utils/user-agent-utils.js 18.5 kB
packages/core/dist/utils/user-agent-utils.mjs 14.7 kB
packages/core/dist/utils/webview-app-utils.js 3.54 kB
packages/core/dist/utils/webview-app-utils.mjs 2.23 kB
packages/core/dist/vendor/uuidv7.js 8.36 kB
packages/core/dist/vendor/uuidv7.mjs 6.7 kB
packages/mcp/dist/extensions/analytics-parameters.js 6.63 kB
packages/mcp/dist/extensions/analytics-parameters.mjs 4.27 kB
packages/mcp/dist/extensions/capture.js 4.04 kB
packages/mcp/dist/extensions/capture.mjs 2.58 kB
packages/mcp/dist/extensions/client-********.js 6.33 kB
packages/mcp/dist/extensions/client-********.mjs 3.71 kB
packages/mcp/dist/extensions/compatibility.js 5.45 kB
packages/mcp/dist/extensions/compatibility.mjs 3.4 kB
packages/mcp/dist/extensions/constants.js 5.53 kB
packages/mcp/dist/extensions/constants.mjs 3.03 kB
packages/mcp/dist/extensions/context-parameters.js 2.85 kB
packages/mcp/dist/extensions/context-parameters.mjs 893 B
packages/mcp/dist/extensions/conversation-id.js 6.41 kB
packages/mcp/dist/extensions/conversation-id.mjs 3.58 kB
packages/mcp/dist/extensions/detect.js 3.87 kB
packages/mcp/dist/extensions/detect.mjs 1.49 kB
packages/mcp/dist/extensions/event-types.js 1.78 kB
packages/mcp/dist/extensions/event-types.mjs 459 B
packages/mcp/dist/extensions/exceptions.js 2.67 kB
packages/mcp/dist/extensions/exceptions.mjs 1.19 kB
packages/mcp/dist/extensions/headers.js 2.08 kB
packages/mcp/dist/extensions/headers.mjs 643 B
packages/mcp/dist/extensions/ids.js 2.11 kB
packages/mcp/dist/extensions/ids.mjs 637 B
packages/mcp/dist/extensions/instrument-********.js 5.02 kB
packages/mcp/dist/extensions/instrument-********.mjs 3.18 kB
packages/mcp/dist/extensions/instrument-highlevel.js 12.8 kB
packages/mcp/dist/extensions/instrument-highlevel.mjs 10.2 kB
packages/mcp/dist/extensions/instrumentation.js 27.9 kB
packages/mcp/dist/extensions/instrumentation.mjs 21.9 kB
packages/mcp/dist/extensions/intent.js 3.3 kB
packages/mcp/dist/extensions/intent.mjs 1.64 kB
packages/mcp/dist/extensions/internal.js 7.63 kB
packages/mcp/dist/extensions/internal.mjs 5.23 kB
packages/mcp/dist/extensions/lib-********.js 1.7 kB
packages/mcp/dist/extensions/lib-********.mjs 267 B
packages/mcp/dist/extensions/logger.js 1.81 kB
packages/mcp/dist/extensions/logger.mjs 380 B
packages/mcp/dist/extensions/mcp-********.js 7.66 kB
packages/mcp/dist/extensions/mcp-********.mjs 6.09 kB
packages/mcp/dist/extensions/mcp-sdk-compat.js 5.13 kB
packages/mcp/dist/extensions/mcp-sdk-compat.mjs 2.9 kB
packages/mcp/dist/extensions/model-parameters.js 3.7 kB
packages/mcp/dist/extensions/model-parameters.mjs 1.53 kB
packages/mcp/dist/extensions/output-instructions.js 6.21 kB
packages/mcp/dist/extensions/output-instructions.mjs 3.91 kB
packages/mcp/dist/extensions/posthog-events.js 11.8 kB
packages/mcp/dist/extensions/posthog-events.mjs 7.98 kB
packages/mcp/dist/extensions/posthog-mcp.js 9.69 kB
packages/mcp/dist/extensions/posthog-mcp.mjs 7.12 kB
packages/mcp/dist/extensions/request-headers.js 2.27 kB
packages/mcp/dist/extensions/request-headers.mjs 963 B
packages/mcp/dist/extensions/sanitization.js 4.78 kB
packages/mcp/dist/extensions/sanitization.mjs 2.98 kB
packages/mcp/dist/extensions/session-token.js 5.47 kB
packages/mcp/dist/extensions/session-token.mjs 3.6 kB
packages/mcp/dist/extensions/session.js 6.74 kB
packages/mcp/dist/extensions/session.mjs 4.12 kB
packages/mcp/dist/extensions/sink.js 4.47 kB
packages/mcp/dist/extensions/sink.mjs 2.67 kB
packages/mcp/dist/extensions/tools.js 3.61 kB
packages/mcp/dist/extensions/tools.mjs 1.63 kB
packages/mcp/dist/extensions/tracing-helpers.js 2.51 kB
packages/mcp/dist/extensions/tracing-helpers.mjs 772 B
packages/mcp/dist/extensions/transport-********.js 3 kB
packages/mcp/dist/extensions/transport-********.mjs 1.09 kB
packages/mcp/dist/extensions/truncation.js 11.6 kB
packages/mcp/dist/extensions/truncation.mjs 9.79 kB
packages/mcp/dist/index.js 8.88 kB
packages/mcp/dist/index.mjs 4.76 kB
packages/mcp/dist/types.js 585 B
packages/mcp/dist/types.mjs 12 B
packages/mcp/dist/version.js 1.31 kB
packages/mcp/dist/version.mjs 46 B
packages/next/dist/app/PostHogProvider.js 5.37 kB
packages/next/dist/client/ClientPostHogProvider.js 2.28 kB
packages/next/dist/client/hooks.js 172 B
packages/next/dist/client/PostHogPageView.js 4.23 kB
packages/next/dist/index.client.js 401 B
packages/next/dist/index.edge.js 570 B
packages/next/dist/index.js 554 B
packages/next/dist/index.react-server.js 420 B
packages/next/dist/middleware/postHogMiddleware.js 4.08 kB
packages/next/dist/pages.client.js 225 B
packages/next/dist/pages.edge.js 294 B
packages/next/dist/pages.js 347 B
packages/next/dist/pages/createPostHog.js 1.48 kB
packages/next/dist/pages/getServerSidePostHog.js 1.48 kB
packages/next/dist/pages/PostHogPageView.js 1.77 kB
packages/next/dist/pages/PostHogProvider.js 1.58 kB
packages/next/dist/server.edge.js 795 B
packages/next/dist/server/captureRequestError.js 5.26 kB
packages/next/dist/server/clientCache.edge.js 305 B
packages/next/dist/server/clientCache.js 1.53 kB
packages/next/dist/server/clientCache.node.js 305 B
packages/next/dist/server/createPostHog.js 1.44 kB
packages/next/dist/server/getPostHog.js 3.45 kB
packages/next/dist/server/onRequestError.js 1.39 kB
packages/next/dist/server/onRequestError.types.js 59 B
packages/next/dist/shared/browser.js 195 B
packages/next/dist/shared/config.js 2.23 kB
packages/next/dist/shared/constants.js 201 B
packages/next/dist/shared/cookie.js 540 B
packages/next/dist/shared/identity.js 2.56 kB
packages/next/dist/shared/tracing-headers.js 2.18 kB
packages/nextjs-config/dist/config.js 10.6 kB
packages/nextjs-config/dist/config.mjs 8.96 kB
packages/nextjs-config/dist/index.js 2.21 kB
packages/nextjs-config/dist/index.mjs 30 B
packages/nextjs-config/dist/strip-sourcemap-********.js 4.91 kB
packages/nextjs-config/dist/strip-sourcemap-********.mjs 2.96 kB
packages/nextjs-config/dist/utils.js 3.93 kB
packages/nextjs-config/dist/utils.mjs 1.72 kB
packages/node/dist/ai-capture/batching.js 2.71 kB
packages/node/dist/ai-capture/batching.mjs 1.21 kB
packages/node/dist/ai-capture/routing.js 1.96 kB
packages/node/dist/ai-capture/routing.mjs 264 B
packages/node/dist/capture-v1/config.js 1.59 kB
packages/node/dist/capture-v1/config.mjs 283 B
packages/node/dist/capture-v1/errors.js 1.99 kB
packages/node/dist/capture-v1/errors.mjs 694 B
packages/node/dist/capture-v1/routing.js 1.77 kB
packages/node/dist/capture-v1/routing.mjs 279 B
packages/node/dist/capture-v1/sender.js 11.5 kB
packages/node/dist/capture-v1/sender.mjs 9.94 kB
packages/node/dist/capture-v1/transform.js 5.22 kB
packages/node/dist/capture-v1/transform.mjs 3.65 kB
packages/node/dist/capture-v1/types.js 585 B
packages/node/dist/capture-v1/types.mjs 12 B
packages/node/dist/entrypoints/index.edge.js 3.66 kB
packages/node/dist/entrypoints/index.edge.mjs 720 B
packages/node/dist/entrypoints/nestjs.js 2.27 kB
packages/node/dist/entrypoints/nestjs.mjs 42 B
packages/node/dist/experimental.js 852 B
packages/node/dist/experimental.mjs 279 B
packages/node/dist/exports.js 6.3 kB
packages/node/dist/exports.mjs 388 B
packages/node/dist/extensions/context/context.js 2.22 kB
packages/node/dist/extensions/context/context.mjs 863 B
packages/node/dist/extensions/context/types.js 585 B
packages/node/dist/extensions/context/types.mjs 12 B
packages/node/dist/extensions/error-tracking/autocapture.js 5.29 kB
packages/node/dist/extensions/error-tracking/autocapture.mjs 3.62 kB
packages/node/dist/extensions/error-tracking/index.js 4.48 kB
packages/node/dist/extensions/error-tracking/index.mjs 3.17 kB
packages/node/dist/extensions/error-tracking/modifiers/context-lines.node.js 11.7 kB
packages/node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs 9.64 kB
packages/node/dist/extensions/error-tracking/modifiers/module.node.js 2.87 kB
packages/node/dist/extensions/error-tracking/modifiers/module.node.mjs 1.45 kB
packages/node/dist/extensions/error-tracking/modifiers/relative-path.node.js 2.07 kB
packages/node/dist/extensions/error-tracking/modifiers/relative-path.node.mjs 624 B
packages/node/dist/extensions/express.js 5.07 kB
packages/node/dist/extensions/express.mjs 2.78 kB
packages/node/dist/extensions/feature-flags/cache.js 585 B
packages/node/dist/extensions/feature-flags/cache.mjs 12 B
packages/node/dist/extensions/feature-flags/crypto.js 1.37 kB
packages/node/dist/extensions/feature-flags/crypto.mjs 42 B
packages/node/dist/extensions/feature-flags/feature-flags.js 32.3 kB
packages/node/dist/extensions/feature-flags/feature-flags.mjs 29.8 kB
packages/node/dist/extensions/nestjs.js 5.71 kB
packages/node/dist/extensions/nestjs.mjs 3.42 kB
packages/node/dist/extensions/sentry-integration.js 4.99 kB
packages/node/dist/extensions/sentry-integration.mjs 3.37 kB
packages/node/dist/extensions/tracing-headers.js 3.41 kB
packages/node/dist/extensions/tracing-headers.mjs 1.53 kB
packages/node/dist/extensions/url-utils.js 2.32 kB
packages/node/dist/extensions/url-utils.mjs 785 B
packages/node/dist/feature-flag-evaluations.js 6.22 kB
packages/node/dist/feature-flag-evaluations.mjs 4.77 kB
packages/node/dist/gzip.node.js 1.83 kB
packages/node/dist/gzip.node.mjs 416 B
packages/node/dist/storage-memory.js 1.61 kB
packages/node/dist/storage-memory.mjs 297 B
packages/node/dist/types.js 1.52 kB
packages/node/dist/types.mjs 224 B
packages/node/dist/version.js 1.31 kB
packages/node/dist/version.mjs 46 B
packages/nuxt/dist/module.mjs 6.13 kB
packages/nuxt/dist/runtime/composables/useFeatureFlagEnabled.js 566 B
packages/nuxt/dist/runtime/composables/useFeatureFlagPayload.js 698 B
packages/nuxt/dist/runtime/composables/useFeatureFlagVariantKey.js 591 B
packages/nuxt/dist/runtime/composables/usePostHog.js 128 B
packages/nuxt/dist/runtime/nitro-plugin-v2.js 480 B
packages/nuxt/dist/runtime/nitro-plugin-v3.js 574 B
packages/nuxt/dist/runtime/nitro-plugin.js 1.03 kB
packages/nuxt/dist/runtime/vue-plugin.js 1.13 kB
packages/openfeature-node-provider/dist/index.js 1.86 kB
packages/openfeature-node-provider/dist/index.mjs 122 B
packages/openfeature-node-provider/dist/mapping.js 5.42 kB
packages/openfeature-node-provider/dist/mapping.mjs 3.21 kB
packages/openfeature-node-provider/dist/provider.js 4.09 kB
packages/openfeature-node-provider/dist/provider.mjs 2.6 kB
packages/openfeature-web-provider/dist/index.js 1.84 kB
packages/openfeature-web-provider/dist/index.mjs 119 B
packages/openfeature-web-provider/dist/mapping.js 5.38 kB
packages/openfeature-web-provider/dist/mapping.mjs 3.18 kB
packages/openfeature-web-provider/dist/provider.js 4.51 kB
packages/openfeature-web-provider/dist/provider.mjs 3.06 kB
packages/plugin-utils/dist/chunk-ids.js 3.96 kB
packages/plugin-utils/dist/chunk-ids.mjs 2.11 kB
packages/plugin-utils/dist/cli.js 4.47 kB
packages/plugin-utils/dist/cli.mjs 2.72 kB
packages/plugin-utils/dist/config.js 3.6 kB
packages/plugin-utils/dist/config.mjs 2.25 kB
packages/plugin-utils/dist/index.js 4.5 kB
packages/plugin-utils/dist/index.mjs 197 B
packages/plugin-utils/dist/spawn-local.js 3.17 kB
packages/plugin-utils/dist/spawn-local.mjs 1.66 kB
packages/plugin-utils/dist/utils.js 3.36 kB
packages/plugin-utils/dist/utils.mjs 1.3 kB
packages/react-native/dist/autocapture.js 8.31 kB
packages/react-native/dist/error-tracking/index.js 9.97 kB
packages/react-native/dist/error-tracking/utils.js 2.58 kB
packages/react-native/dist/frameworks/wix-navigation.js 1.3 kB
packages/react-native/dist/hooks/useFeatureFlag.js 1.86 kB
packages/react-native/dist/hooks/useFeatureFlagResult.js 983 B
packages/react-native/dist/hooks/useFeatureFlags.js 941 B
packages/react-native/dist/hooks/useNavigationTracker.js 2.45 kB
packages/react-native/dist/hooks/usePostHog.js 544 B
packages/react-native/dist/hooks/utils.js 988 B
packages/react-native/dist/index.js 4.33 kB
packages/react-native/dist/logs-********.js 3.66 kB
packages/react-native/dist/native-deps.js 8.73 kB
packages/react-native/dist/optional/OptionalAsyncStorage.js 299 B
packages/react-native/dist/optional/OptionalExpoApplication.js 377 B
packages/react-native/dist/optional/OptionalExpoDevice.js 347 B
packages/react-native/dist/optional/OptionalExpoFileSystem.js 386 B
packages/react-native/dist/optional/OptionalExpoFileSystemLegacy.js 423 B
packages/react-native/dist/optional/OptionalExpoLocalization.js 383 B
packages/react-native/dist/optional/OptionalPlugin.js 1.06 kB
packages/react-native/dist/optional/OptionalReactNativeDeviceInfo.js 415 B
packages/react-native/dist/optional/OptionalReactNativeLocalize.js 303 B
packages/react-native/dist/optional/OptionalReactNativeNavigation.js 415 B
packages/react-native/dist/optional/OptionalReactNativeNavigationWix.js 443 B
packages/react-native/dist/optional/OptionalReactNativeSafeArea.js 644 B
packages/react-native/dist/optional/OptionalReactNativeSvg.js 872 B
packages/react-native/dist/posthog-rn.js 67.5 kB
packages/react-native/dist/PostHogContext.js 329 B
packages/react-native/dist/PostHogErrorBoundary.js 3.19 kB
packages/react-native/dist/PostHogMaskView.js 1.68 kB
packages/react-native/dist/PostHogProvider.js 6 kB
packages/react-native/dist/storage.js 5.76 kB
packages/react-native/dist/surveys/components/BottomSection.js 1.51 kB
packages/react-native/dist/surveys/components/Cancel.js 1.1 kB
packages/react-native/dist/surveys/components/ConfirmationMessage.js 1.76 kB
packages/react-native/dist/surveys/components/IntroMessage.js 1.65 kB
packages/react-native/dist/surveys/components/QuestionHeader.js 1.47 kB
packages/react-native/dist/surveys/components/QuestionTypes.js 14.2 kB
packages/react-native/dist/surveys/components/SurveyModal.js 7.24 kB
packages/react-native/dist/surveys/components/Surveys.js 7.27 kB
packages/react-native/dist/surveys/getActiveMatchingSurveys.js 2.69 kB
packages/react-native/dist/surveys/icons.js 10 kB
packages/react-native/dist/surveys/index.js 600 B
packages/react-native/dist/surveys/PostHogSurveyProvider.js 7.37 kB
packages/react-native/dist/surveys/safeStyleSheet.js 448 B
packages/react-native/dist/surveys/survey-shuffling.js 2.95 kB
packages/react-native/dist/surveys/survey-translations.js 1.17 kB
packages/react-native/dist/surveys/surveys-utils.js 11.5 kB
packages/react-native/dist/surveys/useActivatedSurveys.js 3.68 kB
packages/react-native/dist/surveys/useSurveyStorage.js 2.48 kB
packages/react-native/dist/tooling/expoconfig.js 23.8 kB
packages/react-native/dist/tooling/metroconfig.js 2.32 kB
packages/react-native/dist/tooling/posthogMetroSerializer.js 7.45 kB
packages/react-native/dist/tooling/utils.js 4.46 kB
packages/react-native/dist/tooling/vendor/expo/expoconfig.js 70 B
packages/react-native/dist/tooling/vendor/metro/countLines.js 237 B
packages/react-native/dist/tooling/vendor/metro/utils.js 3.57 kB
packages/react-native/dist/types.js 70 B
packages/react-native/dist/utils.js 1.3 kB
packages/react-native/dist/version.js 130 B
packages/react/dist/esm/index.js 22.1 kB
packages/react/dist/esm/slim/index.js 18.5 kB
packages/react/dist/esm/surveys/index.js 3.61 kB
packages/react/dist/umd/index.js 26.4 kB
packages/react/dist/umd/slim/index.js 22.3 kB
packages/react/dist/umd/surveys/index.js 5.63 kB
packages/rollup-plugin/dist/index.js 10.2 kB
packages/rrweb/packer/dist/browser-********.cjs 17.9 kB
packages/rrweb/packer/dist/browser-********.js 17.5 kB
packages/rrweb/packer/dist/pack.cjs 401 B
packages/rrweb/packer/dist/pack.js 301 B
packages/rrweb/packer/dist/pack.umd.cjs 1.67 kB
packages/rrweb/packer/dist/pack.umd.min.cjs 1.11 kB
packages/rrweb/packer/dist/packer.cjs 276 B
packages/rrweb/packer/dist/packer.js 133 B
packages/rrweb/packer/dist/packer.umd.cjs 694 B
packages/rrweb/packer/dist/packer.umd.min.cjs 626 B
packages/rrweb/packer/dist/unpack.cjs 737 B
packages/rrweb/packer/dist/unpack.js 637 B
packages/rrweb/packer/dist/unpack.umd.cjs 1.14 kB
packages/rrweb/packer/dist/unpack.umd.min.cjs 953 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.cjs 34.9 kB
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.js 34.8 kB
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.umd.cjs 37 kB
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.umd.min.cjs 22.9 kB
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.cjs 31.8 kB
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.js 31.7 kB
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.umd.cjs 33.7 kB
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.umd.min.cjs 21.1 kB
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.cjs 663 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.js 540 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.umd.cjs 1.1 kB
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.umd.min.cjs 827 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.cjs 816 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.js 715 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.umd.cjs 1.25 kB
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.umd.min.cjs 966 B
packages/rrweb/rrweb-snapshot/dist/rebuild-********.js 132 kB
packages/rrweb/rrweb-snapshot/dist/record.cjs 4.33 kB
packages/rrweb/rrweb-snapshot/dist/record.js 3.04 kB
packages/rrweb/rrweb-snapshot/dist/replay.cjs 1.96 kB
packages/rrweb/rrweb-snapshot/dist/replay.js 1.31 kB
packages/rrweb/rrweb-snapshot/dist/rrweb-********.cjs 4.62 kB
packages/rrweb/rrweb-snapshot/dist/rrweb-********.js 3.22 kB
packages/rrweb/rrweb-snapshot/dist/snapshot-********.cjs 34.1 kB
packages/rrweb/rrweb-snapshot/dist/snapshot-********.js 32.2 kB
packages/rrweb/types/dist/rrweb-types.cjs 5.8 kB
packages/rrweb/types/dist/rrweb-types.js 5.5 kB
packages/rrweb/types/dist/rrweb-types.umd.cjs 6.06 kB
packages/rrweb/types/dist/rrweb-types.umd.min.cjs 2.95 kB
packages/types/dist/capture-log.js 585 B
packages/types/dist/capture-log.mjs 12 B
packages/types/dist/capture-metric.js 1.47 kB
packages/types/dist/capture-metric.mjs 93 B
packages/types/dist/capture.js 585 B
packages/types/dist/capture.mjs 12 B
packages/types/dist/common.js 585 B
packages/types/dist/common.mjs 12 B
packages/types/dist/feature-flags.js 585 B
packages/types/dist/feature-flags.mjs 12 B
packages/types/dist/index.js 1.55 kB
packages/types/dist/index.mjs 75 B
packages/types/dist/posthog-config.js 585 B
packages/types/dist/posthog-config.mjs 12 B
packages/types/dist/posthog.js 585 B
packages/types/dist/posthog.mjs 12 B
packages/types/dist/request.js 585 B
packages/types/dist/request.mjs 12 B
packages/types/dist/segment.js 585 B
packages/types/dist/segment.mjs 12 B
packages/types/dist/session-recording.js 585 B
packages/types/dist/session-recording.mjs 12 B
packages/types/dist/survey.js 585 B
packages/types/dist/survey.mjs 12 B
packages/types/dist/toolbar.js 585 B
packages/types/dist/toolbar.mjs 12 B
packages/types/dist/tree-shakeable.js 585 B
packages/types/dist/tree-shakeable.mjs 12 B
packages/web/dist/index.cjs 9.09 kB
packages/web/dist/index.mjs 8.93 kB
packages/webpack-plugin/dist/config.js 2.38 kB
packages/webpack-plugin/dist/config.mjs 1.31 kB
packages/webpack-plugin/dist/index.js 9.29 kB
packages/webpack-plugin/dist/index.mjs 5.51 kB
tooling/changelog/dist/index.js 3.31 kB
tooling/rollup-utils/dist/index.js 1.17 kB

compressed-size-action

@turnipdabeets
turnipdabeets changed the base branch from main to posthog-watcher/issue-4570 August 24, 2026 11:27
Base automatically changed from posthog-watcher/issue-4570 to main August 24, 2026 17:19
@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor
⚠️ `posthog-react-native` is modified but not declared in any changeset

This is informational — the PR is not blocked. Click the triangle above to collapse, or push a fix and this comment will auto-delete.

Modified in this PR but not in any changeset:

  • posthog-react-native

If this package should ship the change, add it to the changeset frontmatter:

---
"posthog-react-native": patch
---

Changesets in this PR:

  • @posthog/core — minor
  • @posthog/types — minor
  • posthog-node — minor

@turnipdabeets
turnipdabeets force-pushed the feat/traces-node-mvp branch 4 times, most recently from bfb08e8 to cc7b6d8 Compare August 28, 2026 20:49
@turnipdabeets
turnipdabeets force-pushed the feat/traces-node-mvp branch 5 times, most recently from b946de6 to ab4048c Compare August 31, 2026 18:23
@turnipdabeets
turnipdabeets changed the base branch from main to refactor/shared-otlp-attribute-encoder August 31, 2026 18:45
turnipdabeets and others added 5 commits September 4, 2026 16:49
…races-event-attribute-cap

# Conflicts:
#	.changeset/node-span-limits.md
Config surface, limits and the IPostHog note are PR-body and docs material,
not release notes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XBUa53f3QqECUyxnkSiWGA
…races-event-attribute-cap

# Conflicts:
#	.changeset/node-distributed-tracing.md
rn-flags-disable-and-update-flags belongs to separate RN work; it was swept
back in by a broad `git add`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XBUa53f3QqECUyxnkSiWGA
turnipdabeets added a commit that referenced this pull request Sep 4, 2026
Traces ships new in the same release through #4579, so naming it here reads
as a fix to behavior that never existed. Also drops the split-and-isolate
claim from the oversized entry: metrics drops the window rather than halving.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XBUa53f3QqECUyxnkSiWGA
The cap is not one of the knobs the traces spec enumerates, so it stays a
fixed 128 instead of a public `maxAttributesPerEvent` option.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HQy8eimnfV3jVQKbzELc65
Comment thread packages/core/src/traces/span.ts Outdated
* The handle to return when a span cannot be recorded: a pass-through when the
* caller supplied a usable `parent` header, the shared no-op otherwise.
*/
export function inertSpan(options?: { parent?: unknown; tracestate?: unknown }): Span {

@jonmcwest jonmcwest Sep 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up: preserve the implicit pass-through parent.

A child without an explicit parent ignores an active PassThroughSpan: tracing off loses the context; tracing on can create an unrelated trace.

OTel's no-op rule requires preserving implicit parent context and recommends reusing an already non-recording parent. Reusing the handle on the tracing-on path is a PostHog fallback choice, not that rule's requirement. Cover both paths, including across await. Non-blocking for the MVP; settle before API stability.

Sources: OTel propagation · implementation.

Agent-assisted review.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 2581b66ef. Both paths: inertSpan takes the active handle as the implicit parent, and _resolveParent adopts an active PassThroughSpan. Across-await is covered by a node test in c8f9a66ea, where AsyncLocalStorage actually applies. Taken your point that the tracing-on half is our fallback choice rather than the OTel rule.

Comment thread packages/core/src/traces/index.ts Outdated
return inertSpan(options)
}

const explicitParent = options?.parent

@jonmcwest jonmcwest Sep 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correction: foreign OTel parents are optional interoperability work, not a docs bug.

parent accepts this SDK's Span | string. A foreign handle with traceparent() takes the inert path as documented; an OTel spanContext()-only object is outside that type.

I withdraw the documentation-fix request. OTel's tracing API takes a Context parent, not a raw Span, so accepting foreign span objects directly is a PostHog API choice. No merge action needed here.

Sources: current parent contract · OTel span creation · foreign-handle handling.

Agent-assisted review.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, reverted in c8f9a66ea. I had already rewritten the parent docs against your earlier note; they are back to the original wording. I kept one test pinning what an untyped spanContext()-only object does today, since it is cheap coverage either way.

return this
}

addEvent(name: string, attributes?: SpanAttributes, timestamp?: SpanTimeInput): this {

@jonmcwest jonmcwest Sep 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Covered by the follow-up; no extra change here.

OTel makes the per-event attribute limit optional, with a default of 128 when provided. This is not a missing mandatory limit.

On this branch, the encoder drops excess event attributes without a per-event dropped count. #4792 adds the cap and counter. Keeping this note to connect the concern to that follow-up. Non-blocking.

Sources: OTel span limits · event handling.

Agent-assisted review.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed — landed in #4792 with the cap and the per-event counter.

Metrics,
MetricsConfig,
} from './metrics/types'
export { PostHogTraces } from './traces'

@jonmcwest jonmcwest Sep 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: mark cross-package plumbing as @internal.

Please tag PostHogTraces, SyncSpanContextManager, inertSpan, runWithActiveSpan, resolveTracesConfig, ResolvedTracesConfig, and TraceSdkContext. They are exported from the published core package but are not intended as stable public API.

Use the existing cross-package JSDoc wording. Leave SpanContextManager public because it appears in the protected initialization hook. Non-blocking.

Sources: core exports · existing internal convention.

Agent-assisted review.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 40278277f. All seven tagged at the declaration rather than the re-export, SpanContextManager left public. pnpm generate-references is unchanged by it.

// Inert like its parent, never an orphan with invented ids — but a
// pass-through parent's inbound context carries to the child rather than
// the trace ending here.
this._logger.debug('Span parent is not a span from this SDK; returning an inert span')

@jonmcwest jonmcwest Sep 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional API convenience: accept a single-element header array.

Node's headersDistinct.traceparent supplies an array, but our public parent type is Span | string. OTel's first-value getter rule concerns carrier extraction; it does not require our parent argument to accept arrays.

Consider unwrapping exactly one element while keeping the multi-element fallback. Also correct the nearby comment: Node's ordinary headers join duplicates into a string. Non-blocking; not an OTel conformance defect.

Sources: Node header arrays · OTel getter contract.

Agent-assisted review.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 2581b66ef. Exactly one element is unwrapped, longer arrays are still ignored, and the nearby comment about req.headers is corrected.

Comment thread packages/core/src/traces/traceparent.ts Outdated
return undefined
}
const trimmed = value.trim()
if (!trimmed || trimmed.length > TRACESTATE_MAX_LENGTH) {

@jonmcwest jonmcwest Sep 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correction: distinguish tracestate size from validity.

W3C recommends propagating at least 512 characters; that is not a validity ceiling. For an otherwise valid header exceeding our size limit, truncate whole entries, preferably removing entries over 128 characters first, then from the right.

An incoming list with more than 32 members violates the grammar, so my earlier request to salvage that case was too broad. Narrow the test change to valid oversized headers. Non-blocking.

Sources: W3C tracestate limits · current validation · W3C member-count grammar.

Agent-assisted review.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebuilt to your revised version in c8f9a66ea. My first pass had >32 members trimming to 32 — that is back to a rejection, since it is a grammar violation rather than a size problem. A valid over-long header now drops members above 128 characters first, then from the right. Tests narrowed to valid oversized input.

@jonmcwest

jonmcwest commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Follow-up: preserve array positions for null values.

OTel requires preserving null positions in arrays and permits empty-string substitution when the exporter cannot emit null. The current encoder skips null/undefined slots, shifting later elements and misaligning paired arrays.

Given the receiver limitation documented here, emit { stringValue: '' } for those slots and update the paired-array test. This addresses the null-position requirement; it is not a claim about other encoding choices. Non-blocking release follow-up.

Sources: OTel AnyValue · array encoding.

Agent-assisted review.

@jonmcwest

jonmcwest commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Nit: distinguish send calls from HTTP attempts.

The PR body's "exactly 1 request" counts _sendTracesBatch calls. The transport still retries, so one flush pass can make four HTTP attempts with the default retry count. The outage fix remains valid.

Please say "one send per flush pass" instead. Optionally cover the real transport in the outage test; the current mock hides retries. Non-blocking.

Sources: SDK retry defaults · transport retry loop.

Agent-assisted review.

turnipdabeets and others added 5 commits September 8, 2026 09:41
A `beforeSpanSend` hook can write a count past the OTLP field's range onto an
event, which is refused for the whole request rather than the one span.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BjT26chjUzuPSyJZqh4AWQ
…rent contract

A span from another tracer reports through `spanContext()`, so it is ignored
rather than yielding an inert span; a test now pins that.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BjT26chjUzuPSyJZqh4AWQ
turnipdabeets and others added 5 commits September 8, 2026 10:45
An inbound `traceparent` now parents a span that names no parent, on both the
recording and inert paths, so a nested span no longer starts a new trace.
Also accepts a one-element header array and trims an over-long `tracestate`
instead of dropping it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BjT26chjUzuPSyJZqh4AWQ
…uded

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BjT26chjUzuPSyJZqh4AWQ
More than 32 tracestate members is malformed, not oversized, so it is rejected
again; a valid over-long header drops members over 128 characters first, then
from the right. Restores the original `parent` docs, whose fix was withdrawn.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BjT26chjUzuPSyJZqh4AWQ
@turnipdabeets

Copy link
Copy Markdown
Contributor Author

@jonmcwest — on the send-calls vs HTTP-attempts nit: PR body updated. It now says "one send per flush pass" and names the transport retry, so the number is not read as an HTTP count.

@turnipdabeets

Copy link
Copy Markdown
Contributor Author

@jonmcwest — on preserving array positions for null values. Not taken in this release, and the reason is cross-SDK rather than cost.

The receiver limitation you cite is real and I confirmed it: patch_otel_json only rewrites an empty object under a key named value or body, so an empty {} sitting inside arrayValue.values is not rescued and hits opentelemetry-rust#1253. { "stringValue": "" } is the right substitution.

What stopped me is that this is not a posthog-js choice. All three SDKs drop nullish array elements identically today — compactMap in PostHog/Logs/PostHogLogsOTLP.swift, mapNotNull in PostHogLogsOTLP.kt — and the encoder here is shared by traces, logs and metrics, both of which have shipped. Changing one SDK would put the same attribute on the wire in two different shapes depending on which SDK sent it.

The contract is also silent on this, rather than agreeing with either behaviour. Both capabilities say only that "a null or undefined value SHALL cause the entire key to be omitted", which is key-level; neither says anything about elements inside an arrayValue. So writing a spec line now would be inventing the answer rather than recording it.

Suggested order, if you agree: settle it in sdk-specs first, then change js, ios and android together. Happy to open that proposal — I did not want to land a wire-format change across three SDKs on the back of a review comment.

…tracing

#4584 folded into this branch, so `beforeSpanSend` and the caps go out in the
same minor as `startSpan`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RWoFx4BctNmXnpnKS79Qgz
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.

5 participants