Next.js: Middleware Tracing Gets Fixed for Good

Two connected fixes from mischnic close out lingering gaps in how Next.js instruments and traces middleware, while smaller fixes address action handling and test stability. Together they point to a cleanup pass on observability and edge cases that surface only in production or deployment contexts.

Duration: PT2M21S

Episode overview

This episode is a short developer briefing from Next.js.

It explains recent repository work in plain language.

  • Show: Next.js
  • Published: 2026-07-06T13:07:42Z
  • Audio duration: PT2M21S

Transcript excerpt

This excerpt keeps the crawler page concise. Listen to the episode or use the RSS feed for the full update.

It's July 6th, and here's what moved in the Next.js codebase today.

The headline is observability for middleware. Two related pull requests from mischnic close out a chain of bugs around instrumentation and tracing. PR 95357 fixes the instrumentation hook so it properly awaits when middleware runs behind adapters — a gap left over after an earlier fix only covered pages. That work…

Second theme: cleanup on edge-case correctness. PR 95513 fixes a case where malformed multipart server action submissions were returning a 500 error in production instead of the expected 404 — small, but it matters for anyone debugging unexpected server errors from bad form submissions. And PR 95446 fixes a…

On the maintenance side, PR 95466 rewrites a flaky test in the cache components streaming suite, replacing an overly aggressive ten-millisecond selector timeout with Playwright's default five-second wait — a fix grounded in real flakiness data, not guesswork. And PR 95507 upgrades Sharp to version…

What to remember: if you're deploying middleware through adapters or relying on OpenTelemetry traces, this closes real inconsistencies — but expect slower deployment-mode test runs. That's the briefing for…

Nearby episodes from Next.js

  1. Weekly Recap - Navigation Reliability & Cache Components Polish
  2. Turbopack Glob Fixes and Dev Server Cancellation Ships
  3. Cache Components, Dev Reliability, and a Documentation Cleanup Sweep
  4. Router Reliability Gets a Deep Cleanup
  5. Root Params and Performance Infrastructure
  6. Weekly Recap - API Stabilization & Dev Experience
  7. Memory Optimization and Streaming Fixes
  8. Router Instrumentation and Performance Optimizations