Repository navigation
Trace propagation on by default for Next.js; docs and changelog for commit detection, test environments and queue helpers - #57
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What users saw
testenvironment under test runners, queue and worker carrier helpers, the ingester forwarding the commit) had no changelog entry and no docs in Getting Started or Integrations.deployment.commit, unlike spans.What changes
@autter/runtime-next/client: same-origin trace propagation on by defaultinitAutterBrowsernow also turns on@autter/runtime-browser/tracingfor same-origin requests.tracePropagation: falseturns it off.tracePropagationTargetsadds cross-origin APIs you control.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.enableTracePropagation(...)ordisableTracePropagation()beforeinitAutterBrowser, that call still decides, so existing apps that already opt in keep their targets.client.ts.@autter/runtime-browserstays opt-in. Its size gate passes (5.21 kB, or 5.82 kB with tracing), and itsdist, likeruntime-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" ofautter-runtime sourcemaps setupnow 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.commitis now on the log records' resource, frominitAutterServerandinitAutterLogging. 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, liketelemetry.distro.*, because CI setsGITHUB_SHA. All 292 runtime-node tests pass locally withGITHUB_SHAset.Docs and changelog
enableTracePropagationcall with a new "Link browser errors to server requests" section, the Next.js default,deployment.commitfor other languages, and a "Test runs" section.captureNetworkFailures: falseturns fetch tracing off.commit), and the runtime-next, runtime-node and runtime-browser READMEs.[Unreleased]covers Carrier helpers: pass operation context into queue jobs, headers and SQS messages #53 to Python adapter: report test runs as environment test, and detect the running commit and release #56 and this PR. It calls out the three behaviour changes and their opt-outs, and lists the packages that change.Not changed: no compat-manifest entry. Older ingesters do not mishandle anything here: an older ingester just does not forward
commit, andtestis stored as an ordinary environment. No package versions changed.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.