fix(instrumentation): report ISR revalidation errors to onRequestError#91449
Open
swarnava wants to merge 1 commit intovercel:canaryfrom
Open
fix(instrumentation): report ISR revalidation errors to onRequestError#91449swarnava wants to merge 1 commit intovercel:canaryfrom
swarnava wants to merge 1 commit intovercel:canaryfrom
Conversation
Previously, ISR revalidation errors for routes with PPR/cacheComponents enabled were not reported to the onRequestError instrumentation hook or OpenTelemetry error spans. This was because the error reporting condition in prerenderToStream() incorrectly checked `isRoutePPREnabled` instead of `isBuildTimePrerendering`. The fix changes the condition to check `isBuildTimePrerendering`, which correctly distinguishes between: - Build-time prerendering: errors are suppressed (existing behavior) - ISR revalidation at runtime: errors are now reported This enables observability tools like Datadog APM to capture revalidation failures, allowing teams to set up alerts for upstream data-fetching issues. Adds test for ISR error reporting with cacheComponents/PPR enabled.
Collaborator
Tests Passed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, ISR revalidation errors for routes with PPR/cacheComponents enabled were not reported to the onRequestError instrumentation hook or OpenTelemetry error spans. This was because the error reporting condition in prerenderToStream() incorrectly checked
isRoutePPREnabledinstead ofisBuildTimePrerendering.The fix changes the condition to check
isBuildTimePrerendering, which correctly distinguishes between:This enables observability tools like Datadog APM to capture revalidation failures, allowing teams to set up alerts for upstream data-fetching issues.
Adds test for ISR error reporting with cacheComponents/PPR enabled.