This PR sets up E2E tests for Next.js 16 running on Cloudflare Workers using OpenNext.
Some tests yield different transaction names and span attributes, I will review each of the skipped tests and review the differences and if we should either consolidate the edge runtime behavior with the node runtime behavior.
Known Limitations
Those are the test failures that required skipping.
- Middleware
proxy filename not being picked up by opennext, yet middleware works on Next 16 😕
- HTTP request headers not extracted as span attributes
- Metrics not emitting on Cloudflare Workers
- Middleware
transaction_info.source is 'url' instead of 'route'
- Server component spans have different names (e.g.,
'resolve segment modules' instead of specific component names)
- Missing
http.response.status_code / http.status_code attributes
I plan to follow up with another PR to address these, but the higher priority is making sure the SDK doesn't crash and works to some degree on CF worker apps.
Note
The pull request "test: Added nextjs CF workers test app" was created by @logaretm but did not reference an issue. Therefore this issue was created for better visibility in external tools like Linear.
This PR sets up E2E tests for Next.js 16 running on Cloudflare Workers using OpenNext.
Some tests yield different transaction names and span attributes, I will review each of the skipped tests and review the differences and if we should either consolidate the edge runtime behavior with the node runtime behavior.
Known Limitations
Those are the test failures that required skipping.
proxyfilename not being picked up by opennext, yetmiddlewareworks on Next 16 😕transaction_info.sourceis'url'instead of'route''resolve segment modules'instead of specific component names)http.response.status_code/http.status_codeattributesI plan to follow up with another PR to address these, but the higher priority is making sure the SDK doesn't crash and works to some degree on CF worker apps.