Skip to content

Conversation

@sohankshirsagar
Copy link
Contributor

@sohankshirsagar sohankshirsagar commented Oct 22, 2025

Note

Moves sampling checks to the earliest interception points for HTTP Server.prototype.emit('request') and Next.js handleRequest, removing later redundant checks.

  • Instrumentation
    • HTTP:
      • Add early sampling in Server.prototype.emit('request') to short-circuit unsampled requests in RECORD mode.
      • Remove later sampling check inside _createServerSpan RECORD path.
    • Next.js:
      • Add early sampling at start of BaseServer.prototype.handleRequest to bypass unsampled requests.
      • Remove later sampling check within the RECORD branch of handleRequest.

Written by Cursor Bugbot for commit f5ede6b. This will update automatically on new commits. Configure here.

@sohankshirsagar sohankshirsagar merged commit 2d57bd5 into main Oct 22, 2025
4 checks passed
@sohankshirsagar sohankshirsagar deleted the sohan/perfomance-improvements branch October 22, 2025 07:04
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.

3 participants