Project Configuration
When running Relay in either static
or proxy
mode, you can configure
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
Basic Options
slug
- The short name of the projectRepresents your service in Sentry and allows you to scope events to a distinct application., 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 DSNThe Data Source Name (DSN) key tells the Sentry SDK where to send events, ensuring they go to the right project.) 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"]
}
}
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").