Operations 4 min read

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.

Hacker Afternoon Tea
Hacker Afternoon Tea
Hacker Afternoon Tea
How to Configure Sentry Relay Project Settings for Enterprise Data Security

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.json

Project 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 ( &lt;DSN_KEY&gt; ) is the project's DSN key and is unrelated to the Relay public key used for Relay registration.

Basic Options

slug
The project’s short name displayed in Sentry. Relay requires this value to accept events. <code>{ "slug": "my-project" } </code>
disabled
Whether the project is disabled. If set to true , Relay will discard all events sent to this project. <code>{ "disabled": false } </code>
publicKeys
List 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.allowedDomains
Configures 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>
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

JSONSentryproject configurationRelayallowedDomainsproxy modestatic mode
Hacker Afternoon Tea
Written by

Hacker Afternoon Tea

You might find something interesting here ^_^

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.