|
| 1 | +# Configuration Options |
| 2 | + |
| 3 | +The base configuration for Relay lives in the file `.semaphore/config.yml`. All keys are `snake_case`. |
| 4 | + |
| 5 | +## Relay |
| 6 | + |
| 7 | +General relay settings. |
| 8 | + |
| 9 | +`relay.mode` |
| 10 | + |
| 11 | +: *string, default: `managed`* |
| 12 | + |
| 13 | + Controls the basic communication and configuration mode for this relay. |
| 14 | + Allowed values are: |
| 15 | + |
| 16 | + - `managed` *(default)*: Project configurations are managed by Sentry, unless |
| 17 | + they are statically overridden via the file system. This requires |
| 18 | + credentials to be set up and white listed in Sentry. |
| 19 | + - `static`: Projects must be statically configured on the file system. If |
| 20 | + configured, PII stripping is also performed on those events. Events for |
| 21 | + unknown projects are automatically rejected. |
| 22 | + - `proxy`: Relay acts as a proxy for all requests and events. It will not load |
| 23 | + project configurations from the upstream or perform PII stripping. All |
| 24 | + events are accepted unless overridden on the file system. |
| 25 | + |
| 26 | + For more information on providing or overriding project configurations on the |
| 27 | + file system, please refer to [Project Configuration](project-config.md) and |
| 28 | + [PII Configuration](pii-config/index.md). |
| 29 | + |
| 30 | +`relay.upstream` |
| 31 | + |
| 32 | +: *string, default: `https://ingest.sentry.io`* |
| 33 | + |
| 34 | + The upstream relay or sentry instance. |
| 35 | + |
| 36 | + **Important**: Relay does not check for cycles. Ensure this option is not set |
| 37 | + to an endpoint that will cause events to be cycled back here. |
| 38 | + |
| 39 | +`relay.host` |
| 40 | + |
| 41 | +: *string, default: `127.0.0.1`* |
| 42 | + |
| 43 | + The host the relay should bind to (network interface). Example: `0.0.0.0` |
| 44 | + |
| 45 | +`relay.port` |
| 46 | + |
| 47 | +: *integer, default: `3000`* |
| 48 | + |
| 49 | + The port to bind for the unencrypted relay HTTP server. Example: `3000` |
| 50 | + |
| 51 | +`relay.tls_port` |
| 52 | + |
| 53 | +: *integer, optional* |
| 54 | + |
| 55 | + Optional port to bind for the encrypted relay HTTPS server. Example: `3001` |
| 56 | + |
| 57 | + This is in addition to the `port` option: If you set up a HTTPS server at |
| 58 | + `tls_port`, the HTTP server at `port` still exists. |
| 59 | + |
| 60 | +`relay.tls_identity_path` |
| 61 | + |
| 62 | +: *string, optional* |
| 63 | + |
| 64 | + The filesystem path to the identity (DER-encoded PKCS12) to use for the HTTPS |
| 65 | + server. Example: `relay_dev.pfx` |
| 66 | + |
| 67 | +`relay.tls_identity_password` |
| 68 | + |
| 69 | +: *string, optional* |
| 70 | + |
| 71 | + Password for the PKCS12 archive in `tls_identity_path`. |
| 72 | + |
| 73 | +## HTTP |
| 74 | + |
| 75 | +Set various network-related settings. |
| 76 | + |
| 77 | +`http.timeout` |
| 78 | + |
| 79 | +: *integer, default: `5`* |
| 80 | + |
| 81 | + Timeout for upstream requests in seconds. |
| 82 | + |
| 83 | +`http.max_retry_interval` |
| 84 | + |
| 85 | +: *integer, default: `60`* |
| 86 | + |
| 87 | + Maximum interval between failed request retries in seconds. |
| 88 | + |
| 89 | +## Caching |
| 90 | + |
| 91 | +Fine-tune caching of project state. |
| 92 | + |
| 93 | +`cache.project_expiry` |
| 94 | + |
| 95 | +: *integer, default: `300` (5 minutes)* |
| 96 | + |
| 97 | + The cache timeout for project configurations in seconds. Irrelevant if you |
| 98 | + use the "simple proxy mode", where your project config is stored in a local |
| 99 | + file. |
| 100 | + |
| 101 | +`cache.relay_expiry` |
| 102 | + |
| 103 | +: *integer, default: `3600` (1 hour)* |
| 104 | + |
| 105 | + The cache timeout for downstream relay info (public keys) in seconds. |
| 106 | + |
| 107 | +`cache.event_expiry` |
| 108 | + |
| 109 | +: *integer, default: `600` (10 minutes)* |
| 110 | + |
| 111 | + The cache timeout for events (store) before dropping them. |
| 112 | + |
| 113 | +`cache.miss_expiry` |
| 114 | + |
| 115 | +: *integer, default: `60` (1 minute)* |
| 116 | + |
| 117 | + The cache timeout for non-existing entries. |
| 118 | + |
| 119 | +`cache.batch_interval` |
| 120 | + |
| 121 | +: *integer, default: `100` (100 milliseconds)* |
| 122 | + |
| 123 | + The buffer timeout for batched queries before sending them upstream **in |
| 124 | + milliseconds**. |
| 125 | + |
| 126 | +`cache.file_interval` |
| 127 | + |
| 128 | +: *integer, default: `10` (10 seconds)* |
| 129 | + |
| 130 | + Interval for watching local cache override files in seconds. |
| 131 | + |
| 132 | +`cache.event_buffer_size` |
| 133 | + |
| 134 | +: *integer, default: `1000`* |
| 135 | + |
| 136 | + The maximum number of events that are buffered in case of network issues or |
| 137 | + high rates of incoming events. |
| 138 | + |
| 139 | +## Size Limits |
| 140 | + |
| 141 | +Controls various HTTP-related limits. All values are human-readable strings of a number and a human-readable unit, such as: |
| 142 | + |
| 143 | +- `1KiB` |
| 144 | +- `1MB` |
| 145 | +- `1MiB` |
| 146 | +- `1MiB` |
| 147 | +- `1025B` |
| 148 | + |
| 149 | +`limits.max_concurrent_requests` |
| 150 | + |
| 151 | +: *integer, default: `100`* |
| 152 | + |
| 153 | + The maximum number of concurrent connections to the upstream. |
| 154 | + |
| 155 | +`limits.max_event_payload_size` |
| 156 | + |
| 157 | +: *string, default: `256KB`* |
| 158 | + |
| 159 | + The maximum payload size for events. |
| 160 | + |
| 161 | +`limits.max_api_payload_size` |
| 162 | + |
| 163 | +: *string, default: `20MB`* |
| 164 | + |
| 165 | + The maximum payload size for general API requests. |
| 166 | + |
| 167 | +`limits.max_api_file_upload_size` |
| 168 | + |
| 169 | +: *string, default: `40MB`* |
| 170 | + |
| 171 | + The maximum payload size for file uploads and chunks. |
| 172 | + |
| 173 | +`limits.max_api_chunk_upload_size` |
| 174 | + |
| 175 | +: *string, default: `100MB`* |
| 176 | + |
| 177 | + The maximum payload size for chunks |
| 178 | + |
| 179 | +## Logging |
| 180 | + |
| 181 | +`logging.level` |
| 182 | + |
| 183 | +: *string, default: `info`* |
| 184 | + |
| 185 | + The log level for the relay. One of: |
| 186 | + |
| 187 | + - `off` |
| 188 | + - `error` |
| 189 | + - `warn` |
| 190 | + - `info` |
| 191 | + - `debug` |
| 192 | + - `trace` |
| 193 | + |
| 194 | +`logging.log_failed_payloads` |
| 195 | + |
| 196 | +: *boolean, default: `false`* |
| 197 | + |
| 198 | + If set to true this emits log messages for failed event payloads. |
| 199 | + |
| 200 | +`logging.format` |
| 201 | + |
| 202 | +: *string, default: `auto`* |
| 203 | + |
| 204 | + Controls the log format. One of: |
| 205 | + |
| 206 | + - `auto`: Auto detect (pretty for tty, simplified for other) |
| 207 | + - `pretty`: With colors |
| 208 | + - `simplified`: Simplified log output |
| 209 | + - `json`: Dump out JSON lines |
| 210 | + |
| 211 | +`logging.enable_backtraces` |
| 212 | + |
| 213 | +: *boolean, default: `true`* |
| 214 | + |
| 215 | + When set to true, backtraces are forced on. |
| 216 | + |
| 217 | +## Statsd Metrics |
| 218 | + |
| 219 | +`metrics.statsd` |
| 220 | + |
| 221 | +: *string, optional* |
| 222 | + |
| 223 | + If set to a host/port string then metrics will be reported to this statsd |
| 224 | + instance. |
| 225 | + |
| 226 | +`metrics.prefix` |
| 227 | + |
| 228 | +: *string, default: `sentry.relay`* |
| 229 | + |
| 230 | + The prefix that should be added to all metrics. |
| 231 | + |
| 232 | +## Internal Error Reporting |
| 233 | + |
| 234 | +Configures error reporting for errors happening within Sentry. Disabled by |
| 235 | +default. |
| 236 | + |
| 237 | +`sentry.enabled` |
| 238 | + |
| 239 | +: *boolean, default: `false`* |
| 240 | + |
| 241 | + Whether to report internal errors to a separate DSN. `false` means no internal |
| 242 | + errors are sent (just logged). |
| 243 | + |
| 244 | +`sentry.dsn` |
| 245 | + |
| 246 | +: *string, optional* |
| 247 | + |
| 248 | + DSN to report internal relay failures to. |
| 249 | + |
| 250 | + It is not a good idea to set this to a value that will make the relay send |
| 251 | + errors to itself. Ideally this should just send errors to Sentry directly, not |
| 252 | + another relay. |
0 commit comments