Based on the official Sentry OpenTelemetry Collector documentation, the following corrections have been made:
Before (Incorrect):
headers:
Authorization: "Bearer sntrys_YOUR_TOKEN"After (Correct):
headers:
x-sentry-auth: "sentry sentry_key=YOUR_PUBLIC_KEY"Key Changes:
- Use
x-sentry-authheader instead ofAuthorization - Format is
sentry sentry_key=KEYnotBearer TOKEN - Use the public key from your DSN, not an auth token
Before (Incorrect):
https://o123456.ingest.sentry.io/api/7891011/envelope/
After (Correct):
https://o123456.ingest.sentry.io/api/7891011/integration/otlp
Key Changes:
- Path ends with
/integration/otlpnot/envelope/ - The collector automatically appends
/v1/logsor/v1/traces - Can also use specific
logs_endpointandtraces_endpointif needed
Added per Sentry's official docs:
compression: gzip
encoding: proto- Go to Sentry Project Settings
- Navigate to Client Keys (DSN)
- Look for "OpenTelemetry (OTLP)" section
- Copy the endpoint and authentication header shown there
Your DSN looks like:
https://PUBLIC_KEY@oORG_ID.ingest.sentry.io/PROJECT_ID
The PUBLIC_KEY is the part before the @ symbol. Use this in your auth header:
sentry sentry_key=PUBLIC_KEY
- ✅
otel-collector/otel-collector-config.yaml- Corrected exporter configuration - ✅
env.example- Updated with correct format and examples - ✅
docker-compose.yml- Fixed environment variable defaults - ✅
SENTRY_SETUP.md- Completely revised with accurate instructions - ✅
README.md- Updated quick start section with correct format
After making these changes:
- Update your
.envfile with the correct format - Restart the services:
docker-compose down && docker-compose up --build - Check collector logs:
docker-compose logs -f otel-collector - You should see successful exports without authentication errors