Skip to main content
Applies to:
  • Plan -
  • Deployment -

Summary

Issue: Opening a large trace in the UI returns a Failed 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 to null.

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 see Origin: null (not Origin: https://www.braintrust.dev), the cross-origin redirect is causing the CORS block.

Step 2: Verify the bucket’s CORS configuration

If 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

Change s3_additional_allowed_origins to allow all origins:

Step 2: Apply the change

This updates the CORS policy on the bt-production-lambda-responses bucket to allow browser fetches from redirected presigned URLs.
If you added the wildcard only for this temporary workaround, remove it after upgrading to data plane v2.7.0 or later and confirming the trace download works without it. CORS does not make the bucket public or bypass S3 authorization, but a wildcard allows browser code from any origin to read a response when the request has a valid presigned URL.

Additional context

  • The bt-production-lambda-responses bucket 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.