Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/instrumentation/core/utils/modeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ export function handleReplayMode<T>({

// 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();
}
Expand Down
Loading