Project Configuration
Configure the project settings when running Relay in static or proxy mode.
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
.
Relay in managed
mode is available only on the Business and Enterprise plans.
To configure projects, add files named <PROJECT_ID>.json
in that location:
.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:
{
"slug": "my-project",
"publicKeys": [
{
"publicKey": "<DSN_KEY>",
"isEnabled": true
}
],
"config": {
"allowedDomains": ["*"]
}
}
Public Key
The public key (<DSN_KEY>
) is the key of the project's DSN and is unrelated to the Relay public key used for Relay registration.
slug
The short name of the project, displayed in Sentry. This value is currently required for Relay to accept events.
{
"slug": "my-project"
}
disabled
Whether the project is disabled. If set to true
, the Relay will drop all events sent to this project.
{
"disabled": false
}
publicKeys
A list of known public keys (the public key in a DSN) and whether events using that key should be accepted.
{
"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.
Warning
An empty list rejects all origins. Use the default ["*"]
to allow all origins.
{
"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.
{
"config": {
"features": ["organizations:session-replay"]
}
}
A full list of features you can enable can be found here.
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").