Keys and tokens
A project has two kinds of secret, and both are managed in its Settings: upload tokens and server keys. Creating and revoking them is for admins and owners. The DSN, which isn't secret, is explained on the same page.
Both kinds work the same way:
- You can have several: one for each place that uses it (one per pipeline, one per application or environment). That way, if one leaks, you revoke only that one.
- When you create one you give it a name, Where it's used: "GitHub Actions", "API servers".
- The secret is shown once, when it's created. Copy it before picking Done, I saved it. If you lose it, revoke it and make another.
- The list shows when each one was last used, or Never used.
- Revoke stops it at once.
- Creating and revoking go into the audit log.
Upload tokens
cltu_…. They let your CI upload source maps, so stack traces show the code you wrote. Keep it as COLLECTOR_UPLOAD_TOKEN in your CI's secrets, never in the code you ship: with it anyone can upload maps to your project. The DSN's key doesn't work for uploads.
Server keys
clts_…. They let your servers send their logs: log lines, requests and sign-ins. Give it to your servers as COLLECTOR_SERVER_KEY, next to COLLECTOR_DSN: setting it is what turns logs on in the SDKs, so upgrading a package never starts sending logs on its own. The same key works for OpenTelemetry.
Never put it in a web page: with it anyone could send logs as your application, fake sign-ins or use up the project's budget. Collector refuses a server key sent from a browser.
From the terminal
collector upload-tokens create "GitHub Actions" # prints the secret once
collector upload-tokens list
collector upload-tokens revoke <id>
collector server-keys create "API servers"
collector server-keys list
collector server-keys revoke <id>