Skip to content

Revert "[lts-active] Keep requests through middleware in a single OpenTelemetry trace" - #100269

Merged
lukesandberg merged 1 commit into
releases/lts/activefrom
revert-100226-backport-100136-to-releases/lts/active
Oct 15, 2026
Merged

lukesandberg merged 1 commit into
releases/lts/activefrom
revert-100226-backport-100136-to-releases/lts/active

Conversation

@lukesandberg

@lukesandberg lukesandberg commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Reverts #100226

This is not obviously the correct behavior and so we want to test on canary more before backporting

@lukesandberg
lukesandberg marked this pull request as ready for review October 15, 2026 19:35
@lukesandberg
lukesandberg requested a review from sokra October 15, 2026 19:35
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: e3cfd5e

@lukesandberg
lukesandberg enabled auto-merge (squash) October 15, 2026 19:36
@lukesandberg
lukesandberg merged commit a42cb59 into releases/lts/active Oct 15, 2026
221 of 223 checks passed
@lukesandberg
lukesandberg deleted the revert-100226-backport-100136-to-releases/lts/active branch October 15, 2026 20:04
mischnic pushed a commit that referenced this pull request Oct 22, 2026
…0294, #100324, #100350, #100552, #100583) (#100542)

Backports the OpenTelemetry request-trace stack to
`releases/lts/active`:

- #100349 Start the request span before route module preparation
- #100294 Keep middleware and render in one OpenTelemetry trace as
siblings (re-lands #100136, whose LTS backport #100226 was reverted in
#100269)
- #100324 docs: note that instrumentation-time spans don't join request
traces
- #100350 Emit instrumentation lifecycle spans in the request that
registered it
- #100552 Preserve deferred middleware instrumentation spans when the
adapter throws
- #100583 test: add non-adapter deploy snapshots to
otel-middleware-trace. Without it, `otel-middleware-trace` fails the
release deploy tests that deploy with `NEXT_ENABLE_ADAPTER=0`, as on
v16.5.0-canary.23.

The six canary merge commits are cherry-picked in order with `-x`, and
all applied cleanly. The patch content is identical to canary's; only
blob IDs and line offsets differ.

## Verification

- `test/e2e/opentelemetry/instrumentation/`: `test-start-turbo` (122
passed) and `test-dev-turbo` (67 passed). The #100552 regression test
fails without its `middleware.ts` change.
- `test/e2e/app-dir/otel-middleware-trace`: `test-start-turbo`,
`test-dev-turbo` and `test-start-webpack` (30 passed each, inline
snapshots unchanged). The #100583 commit leaves the test file
byte-identical to canary's.
- Unit tests for `instrumentation-globals`, `tracer` and
`forward-trace-context` (40 passed), plus `pnpm --filter=next types`
- Built with `CI=true pnpm build-all` against the published `@next/swc`
16.4.2 binary. The backport touches no Rust.
- PR CI deploys only through the adapter, so the non-adapter snapshots
from #100583 are confirmed by the next release deploy run.

<!-- NEXT_JS_LLM -->


<!-- fleet ce0ecb23-b14c-4679-92a9-e676130f618e -->

---------

Co-authored-by: vercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
Co-authored-by: Luke Sandberg <[email protected]>
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants