Browser errors
Choose your framework’s browser entry point:saveDraft is your application’s operation. Keep its existing error handling after reporting the error.
Server errors
ImportcaptureError from your framework’s server entry point:
Custom spans
Wrap application work to record its duration and outcome. In the Next.js browser SDK, usespan:
withSpan:
Next.js proxy
Wrap your existing proxy handler withwithInterfereProxy. The wrapper reports thrown errors with request context and rethrows them.
proxy.ts
NextResponse.next() with your existing proxy logic.
Next.js server actions
Wrap an action’s work withwithInterfereServerAction to record its name and outcome. Its args option records argument types, not values. Thrown errors reach the onRequestError handler from your server instrumentation.