diff --git a/src/instrumentation/core/utils/modeUtils.ts b/src/instrumentation/core/utils/modeUtils.ts index c2280e72..4bb467a9 100644 --- a/src/instrumentation/core/utils/modeUtils.ts +++ b/src/instrumentation/core/utils/modeUtils.ts @@ -73,7 +73,9 @@ export function handleReplayMode({ // Background request: App is ready + not within a trace (no parent span) + not a server request if (isAppReady && !currentSpanInfo && !isServerRequest) { - logger.debug(`[ModeUtils] Handling no-op request`); + logger.warn( + `[ModeUtils] Background request detected during replay (no active trace context). This typically means a background job, scheduled task, or middleware (e.g., rate limiters, message consumers) is running outside of a test trace. To avoid errors, disable these services when TUSK_DRIFT_MODE=REPLAY.`, + ); // This is a background request (app is ready and no parent span), call the backgroundRequestHandler return noOpRequestHandler(); }