Project Configuration

When running Relay in either static or proxy mode, you can configure project settings on the file system. Static project configurations are found under the projects subdirectory of the Relay configuration directory, By default, this is located at .relay/projects.

To configure projects, add files named <PROJECT_ID>.json in that location:

Copied
.relay/
└── projects/
    ├── 17.json
    ├── 21.json
    └── 42.json

Project configurations are an extensible format, primarily consisting of optional fields. The minimal configuration must contain the following fields:

Copied
{
  "slug": "my-project",
  "publicKeys": [
    {
      "publicKey": "<DSN_KEY>",
      "isEnabled": true
    }
  ],
  "config": {
    "allowedDomains": ["*"]
  }
}

slug

The short name of the project, displayed in Sentry. This value is currently required for Relay to accept events.

Copied
{
  "slug": "my-project"
}

disabled

Whether the project is disabled. If set to true, the Relay will drop all events sent to this project.

Copied
{
  "disabled": false
}

publicKeys

A list of known public keys (the public key in a DSN) and whether events using that key should be accepted.

Copied
{
  "publicKeys": [
    {
      "publicKey": "12345abcdb1e4c123490ecec89c1f199",
      "isEnabled": true
    }
  ]
}

You can obtain the key by going into the Sentry > Project Settings > Client Keys (DSN) . The public key can be extracted from the DSN. In this DSN, for example, https://12345abcdb1e4c123490ecec89c1f199@o1.ingest.sentry.io/2244, the key is 12345abcdb1e4c123490ecec89c1f199.

A project may contain multiple public keys, but only messages using enabled project keys will be processed. Likewise, keys can be disabled using the isEnabled flag.

config.allowedDomains

Configure Origin or Referer URLs from which Sentry should accept events. This is corresponds to the Allowed Domains setting in the Sentry UI.

Copied
{
  "config": {
    "allowedDomains": ["mycompany.com"]
  }
}

config.features

Some Sentry product features are disabled by default in Relay, either because they are still experimental or because they are not available on all plans. In static mode, these features have to be enabled manually if needed.

Copied
{
  "config": {
    "features": ["organizations:session-replay"]
  }
}

A full list of features you can enable can be found here.

Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").