Configuration for Relay is recorded either in the file .relay/config.yml, or when noted, can be overridden through an environment variable. To change the config location, pass the --config option to any Relay command:
Controls how Relay obtains the project configuration for events. For detailed explanation of these modes, see Relay Modes. Environment variable: "RELAY_MODE."
default value: https://sentry.io optional: false
Fully qualified URL of the upstream Relay or Sentry instance. Environment variable: "RELAY_UPSTREAM_URL".
Relay doesn't check for cycles. Don't set this option to an endpoint that will cause events to be cycled back here.
default value: 0.0.0.0 in Docker, otherwise 127.0.0.1 optional: false
The host to which Relay should bind (network interface). Environment variable: "RELAY_HOST".
default value: 3000 optional: false
The port to which Relay should bind for the unencrypted Relay HTTP server. Environment variable: "RELAY_PORT".
Overrides project identifiers stated in client DSNs with the identifier used at the Sentry upstream. By default, Relay rejects data on project ID mismatch. Set this setting to true when Relay redirects traffic to a migrated Sentry instance, such as when moving from self-hosted to Sentry SaaS. Validation of project identifiers can be safely omitted in these cases, and you can continue to use the previous DSNs in your services.
These settings control network-related configurations.
Timeout for upstream requests in seconds. This timeout covers the period of time from when a request is sent to when response headers are received. It doesn’t cover the connection process, handshakes, or reading of the response body.
Timeout for establishing connections with the upstream in seconds. Relay reuses connections when the upstream supports connection keep-alive. Connections are retained for a maximum of 75 seconds of activity or 15 seconds of inactivity.
Maximum interval between failed request retries in seconds.
Custom HTTP Host header to be sent to the upstream.
These settings fine tune caching of project states.
default: 300 (5 minutes)
The cache timeout for project configurations in seconds. Irrelevant if you use the "simple proxy mode", where your project config is stored in local files.
default: 0 (seconds)
The number of seconds you can continue using this project configuration after cache expiry while a new state is being fetched. This is added on top of cache.project_expiry and cache.miss_expiry.
default: 3600 (1 hour)
The cache timeout for downstream Relay info (public keys) in seconds. This is only relevant if you plan to connect further Relays to this one.
default: 600 (10 minutes)
The maximum amount of time Relay buffers incoming payloads in its cache in case of network issues or backlogs. This applies to all types of data sent to Relay, including events, attachments, and sessions. See also cache.envelope_buffer_size.
default: 60 (1 minute)
The cache timeout for non-existing entries.
default: 100 (100 milliseconds)
The buffer timeout for batched queries before they are sent upstream in milliseconds.
The maximum number of project configs to be fetched from Sentry at once.
default: 10 (10 seconds)
The interval for watching local cache override files in seconds.
The maximum number of incoming payloads that are buffered if network issues or backlogs happen. This applies to all types of data sent to Relay, including events, attachments, and sessions. See also cache.envelope_expiry.
default: 60 (seconds)
The interval for evicting outdated project configs from memory.
The path to the spool file used to save envelopes to disk. If provided, enables on-disk spooling. Relay will create the directory structure if needed. Note that ~ is interpreted as a literal and not as the home directory.
The maximum in-memory buffer for incoming envelopes. The buffer will be spooled to disk when the configured size is reached.
The maximum on-disk spool size.
The maximum number of connections in the pool to manage on-disk spooling.
The minimum number of connections in the pool to manage on-disk spooling.
These settings control HTTP-related limits. All values are either integers, or are human-readable strings of a number and a human-readable unit, such as:
1kB (1,000 bytes)
1KB or 1KiB (1,024 bytes)
1MB (1,000,000 bytes)
1MiB (1,048,576 bytes)
The maximum number of concurrent connections upstream. If supported by the upstream, Relay supports connection keep-alive.
The maximum number of queries that can be sent concurrently from Relay upstream before Relay starts buffering requests. Queries are all requests made upstream for obtaining information and explicitly exclude event submission. The concurrency of queries is additionally constrained by max_concurrent_requests.
The maximum payload size for events.
The maximum attachment size.
The maximum combined size for all attachments in an envelope or request.
The maximum payload size for an entire envelope. Individual limits still apply.
The maximum number of session items per envelope.
The maximum payload size for general API requests.
The maximum payload size for file uploads and chunks.
The maximum payload size for chunks.
default: number of cpus
The maximum number of threads spawned for each CPU and web worker. The total number of threads spawned will roughly be 2 * limits.max_thread_count + N, where N is a fixed set of management threads.
default: 30 (seconds)
The maximum number of seconds a query can take across retries. Individual requests have lower timeouts.
default: 10 (seconds)
The maximum number of seconds you'd have to wait for pending events after receiving a shutdown signal. Environment variable: "SHUTDOWN_TIMEOUT".
default: info possible values: off, error, warn, info, debug, trace
The log level for the relay.
On debug and trace levels, Relay emits extremely verbose messages which can have severe impact on application performance.
Full event payloads logs of failed events, added to the log stream.
default: auto possible values: auto, pretty, simplified, json
Controls the log format. auto: Auto detect (pretty for TTY, simplified for other) pretty: Human readable format with colors simplified: Simplified human readable log output json: JSON records, suitable for logging software
Writes back traces for all internal errors to the log stream and includes them in Sentry errors.
If set to a host/port string then metrics will be reported to this StatsD instance.
The prefix that should be added to all metrics.
Map of strings to strings
A set of default tags that should be attached to all outgoing StatsD metrics.
If set, adds a tag of the given name and sets it to the hostname of the machine that is running Relay. This configuration is useful to distinguish multiple Relays.
Determines if the emitted metrics will be buffered before sending to StatsD server. This generally improves performance, but comes with a caveat that with low traffic volume, metrics might take a few more seconds to propagate.
Global sample rate for all emitted metrics. Should be between 0.0 and 1.0. If outside that range, the value will be normalized (negative values would become 0.0, positive larger than 1.0 would become 1.0). For instance, the value of 0.3 means that only 30% of the emitted metrics will be sent. Note that the implemented sampling approach isn't aware of metric types. For example, it won't rescale counter values when the sample rate is less than 1.0.
By default, Relay does not include geographical location information in events. Set the MaxMind database file path to add GeoIP info in events.
The path to the MaxMind GeoIP City database file. When set the additional GeoIP information will be added to the events.
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").