How to Configure Sentry Relay Project Settings for Enterprise Data Security
When running Sentry Relay in static or proxy mode, you configure project settings on the filesystem under the .relay/projects directory, defining required fields such as slug, publicKeys, and allowedDomains, with JSON examples and detailed explanations of each option.
Project Configuration
When running Relay in static or proxy mode, you can configure project settings on the file system. Static project configuration resides in the projects sub‑directory of the Relay configuration directory, defaulting to .relay/projects.
managed mode of Relay is only available for commercial and enterprise plans. https://sentry.io/pricing/
To add a project, place a file named <PROJECT_ID>.json in that location:
.relay/
└── projects/
├── 17.json
├── 21.json
└── 42.jsonProject configuration is an extensible format composed of optional fields. The minimal required configuration must include the following fields:
{
"slug": "my-project",
"publicKeys": [
{
"publicKey": "<DSN_KEY>",
"isEnabled": true
}
],
"config": {
"allowedDomains": ["*"]
}
}The public key ( <DSN_KEY> ) is the project's DSN key and is unrelated to the Relay public key used for Relay registration.
Basic Options
slugThe project’s short name displayed in Sentry. Relay requires this value to accept events. <code>{ "slug": "my-project" } </code>
disabledWhether the project is disabled. If set to true , Relay will discard all events sent to this project. <code>{ "disabled": false } </code>
publicKeysList of known public keys (the DSN public keys) and whether events using each key should be accepted. <code>{ "publicKeys": [ { "publicKey": "12345abcdb1e4c123490ecec89c1f199", "isEnabled": true } ] } </code> You can obtain the key from Sentry > Project Settings > Client Keys (DSN) . The key is extracted from the DSN, e.g., https://[email protected]/2244 . A project may have multiple public keys, but only messages signed with enabled keys are processed. The isEnabled flag can disable a specific key.
config.allowedDomainsConfigures which Origin or Referer URLs Sentry should accept events from. This corresponds to the “Allowed Domains” setting in the Sentry UI. An empty list rejects all sources; the default ["*"] allows any source. <code>{ "config": { "allowedDomains": ["mycompany.com"] } } </code>
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
