Content compiled from official documents

A series of

  • Sentry Enterprise level Data security solution – Relay getting started
  • Sentry Enterprise level data security solution – Relay operation mode
  • Sentry Enterprise level data security solution – Relay configuration option
  • Sentry Enterprise level data security solution – Relay monitoring & Metrics Collection

Project configuration

When you run Relay in static or proxy mode, you can configure project Settings on the file system. The Static project configuration is located in the projects subdirectory of the Relay configuration directory, which is.relay/projects by default.

Hosting (managed)Mode ofRelayApplies only toBusiness and enterprise planning.sentry.io/pricing/

To configure the project, add a file named .json at this location:

The relay / └ ─ ─ the projects / ├ ─ ─ 17. Json ├ ─ ─ 21. Json └ ─ ─ 42. JsonCopy the code

Project configuration is an extensible format consisting mainly of optional fields. The following fields must be included in the minimum configuration:

{
  "slug": "my-project"."publicKeys": [{"publicKey": "<DSN_KEY>"."isEnabled": true}]."config": {
    "allowedDomains": ["*"]}}Copy the code

Public key (<DSN_KEY>) is the projectDSNKey, and used forRelayregisteredRelayThe public key is irrelevant.

The basic options

slug

The abbreviation of the project, shown in Sentry. Relay currently needs this value to accept events.

{
 "slug": "my-project"
}
Copy the code

disabled

Whether the project is disabled. If set to true, Relay discards all events sent to the project.

{
 "disabled": false
}
Copy the code

publicKeys

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

{
 "publicKeys": [{"publicKey": "12345abcdb1e4c123490ecec89c1f199"."isEnabled": true}}]Copy the code

You can enter by enteringSentry > Project Settings > Client Keys (DSN)To get the key. Public keys can be obtained fromDSNTo extract. In thisDSN, such ashttps://[email protected]/2244.key12345abcdb1e4c123490ecec89c1f199.

A project may contain multiple public keys, but only messages that use the enabled project key are processed. Again, it can be usedisEnabled flagdisablekey.

config.allowedDomains

The Sentry configuration should accept the Origin or Referer URL for the event. This corresponds to the Allowed Domains setting in Sentry UI. Empty list rejects all sources. Use the default [“*”] to allow all sources.

{
 "config": {
   "allowedDomains": ["mycompany.com"]}}Copy the code