Skip to content

Trace propagation on by default for Next.js; docs and changelog for commit detection, test environments and queue helpers - #57

Merged
sagnik11 merged 1 commit into
mainfrom
feat/trace-propagation-default-and-docs
Nov 15, 2026
Merged

sagnik11 merged 1 commit into
mainfrom
feat/trace-propagation-default-and-docs

Conversation

@sagnik11

@sagnik11 sagnik11 commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

What users saw

What changes

@autter/runtime-next/client: same-origin trace propagation on by default

  • initAutterBrowser now also turns on @autter/runtime-browser/tracing for same-origin requests. tracePropagation: false turns it off. tracePropagationTargets adds cross-origin APIs you control.
  • A third-party origin never gets traceparent, and neither does the tracker's own endpoint. Outside a browser (server rendering a client component) it does nothing. A second call changes nothing.
  • If the app calls enableTracePropagation(...) or disableTracePropagation() before initAutterBrowser, that call still decides, so existing apps that already opt in keep their targets.
  • Tests, each in its own process with a fake browser: a same-origin request gets the header, a cross-origin one does not (including look-alike hosts), an allow-listed origin does, the tracker endpoint is skipped, opt-out sends none, an earlier enable keeps its targets, an earlier disable keeps it off, and calling it during SSR does nothing. The test that the default is on fails against the old client.ts.
  • Plain @autter/runtime-browser stays opt-in. Its size gate passes (5.21 kB, or 5.82 kB with tracing), and its dist, like runtime-edge's, is byte-identical to v1.19.0. The root's browser and edge builds (runtime-next: browser and edge builds of the root entry #50) do not use the client entry. Export parity and bundle tests pass.

runtime-cli: for browser setups, the "next steps" of autter-runtime sourcemaps setup now include the trace propagation step and the CORS note (Access-Control-Allow-Headers: traceparent). The step is left out when the file that starts the tracker already sets it up. Tested.

runtime-node: deployment.commit is now on the log records' resource, from initAutterServer and initAutterLogging. It is added in the OTLP log sink, not in runtime-core's encoder, because runtime-edge shares that encoder and its published output would change. The golden 1.4.0 log test treats it as additive metadata, like telemetry.distro.*, because CI sets GITHUB_SHA. All 292 runtime-node tests pass locally with GITHUB_SHA set.

Docs and changelog

Not changed: no compat-manifest entry. Older ingesters do not mishandle anything here: an older ingester just does not forward commit, and test is stored as an ordinary environment. No package versions changed.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…ommit detection, test environments and queue helpers

- @autter/runtime-next/client: initAutterBrowser turns on same-origin
  trace propagation by default (tracePropagation: false opts out;
  tracePropagationTargets adds cross-origin APIs). Third-party origins and
  the tracker's own endpoint never get a traceparent. Does nothing outside a
  browser. An enableTracePropagation/disableTracePropagation call made before
  initAutterBrowser keeps its effect. Plain @autter/runtime-browser stays
  opt-in; its dist is unchanged.
- runtime-cli: `sourcemaps setup` prints the trace propagation step (with
  the CORS note) for browser setups.
- runtime-node: log records' resource carries deployment.commit, like the
  trace resource, for initAutterServer and initAutterLogging. Added in the
  OTLP log sink, so runtime-core's encoder (shared with runtime-edge) and
  runtime-edge's dist stay unchanged.
- Docs: Getting started (release/commit defaults, enableTracePropagation,
  test runs), Integrations (FastAPI and Django CORS, Python detection and
  opt-outs), Requests and errors, Architecture (sink `commit`), package
  READMEs. CHANGELOG [Unreleased] for #53-#56 and this change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sagnik11
sagnik11 merged commit 5b4adf5 into main Nov 15, 2026
18 checks passed
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.

1 participant