Applies to:
- Plan -
- Deployment -
Summary
Issue: Opening a large trace in the UI returns aFailed to fetch error and the full raw trace does not load.
Cause: When a BTQL query result exceeds ~4MB, the API stores the result temporarily in the bt-production-lambda-responses S3 bucket. Before data plane v2.7.0, the API redirected the browser to a presigned URL. This cross-origin redirect sets the request origin to null, which the S3 bucket’s CORS policy does not allow.
Resolution: Upgrade the data plane to v2.7.0 or later. If you cannot upgrade immediately, confirm that the failing request has Origin: null, then allow * as an origin as a temporary workaround.
Resolution steps
Upgrade the data plane
Upgrade to data plane v2.7.0 or later by following the routine upgrade guide, then retry the trace download. These versions return the signed overflow URL for the browser to fetch directly instead of using the cross-origin redirect that changes the request origin tonull.
Diagnose older versions
Step 1: Check the network request origin
Open your browser’s Network tab, find the failing S3 GET request, and inspect the request headers. If you seeOrigin: null (not Origin: https://www.braintrust.dev), the cross-origin redirect is causing the CORS block.
Step 2: Verify the bucket’s CORS configuration
https://www.braintrust.dev is listed in AllowedOrigins but null is not, the existing config does not cover the redirect case.
Temporary workaround for older versions
Step 1: Update Terraform
Changes3_additional_allowed_origins to allow all origins:
Step 2: Apply the change
bt-production-lambda-responses bucket to allow browser fetches from redirected presigned URLs.
Additional context
- The
bt-production-lambda-responsesbucket holds ephemeral overflow files only. It stores BTQL query result overflows and SDK log upload overflows, not primary trace data. - Every time a trace is opened in the UI, a fresh BTQL query runs and a new presigned URL is generated if the result exceeds ~4MB. On data plane versions before v2.7.0, the temporary CORS workaround resolves the error for all traces, including previously affected ones.