pub struct Relay {
pub mode: RelayMode,
pub instance: RelayInstance,
pub upstream: UpstreamDescriptor,
pub advertised_upstream: Option<UpstreamDescriptor>,
pub host: IpAddr,
pub port: u16,
pub internal_host: Option<IpAddr>,
pub internal_port: Option<u16>,
pub tls_port: Option<u16>,
pub tls_identity_path: Option<PathBuf>,
pub tls_identity_password: Option<String>,
pub override_project_ids: bool,
}Expand description
Relay specific configuration values.
Fields§
§mode: RelayModeThe operation mode of this Relay.
instance: RelayInstanceThe instance type of this Relay.
upstream: UpstreamDescriptorThe upstream Relay or Sentry instance.
advertised_upstream: Option<UpstreamDescriptor>The upstream advertised to downstream Relay instances.
This value will be advertised to downstream Relays as the upstream to use when forwarding data. It can be used for traffic routing and balancing, it must not redirect to a different Sentry instance.
Downstream Relays will treat the advertised upstream as the same logical component as this instance and re-use already established authentication keys.
host: IpAddrThe host the relay should bind to (network interface).
port: u16The port to bind for the unencrypted relay HTTP server.
internal_host: Option<IpAddr>The host the relay should bind to (network interface) for internally exposed APIs, like health checks.
If not configured, internal routes are exposed on the main HTTP server.
Note: configuring the internal http server on an address which overlaps with the main
server (e.g. main on 0.0.0.0:3000 and internal on 127.0.0.1:3000) is a misconfiguration
resulting in approximately half of the requests sent to 127.0.0.1:3000 to fail, as the handling
http server is chosen by the operating system ‘at random’.
As a best practice you should always choose different ports to avoid this issue.
Defaults to Self::host.
internal_port: Option<u16>The port to bind for internally exposed APIs.
Defaults to Self::port.
tls_port: Option<u16>Optional port to bind for the encrypted relay HTTPS server.
tls_identity_path: Option<PathBuf>The path to the identity (DER-encoded PKCS12) to use for TLS.
tls_identity_password: Option<String>Password for the PKCS12 archive.
override_project_ids: boolAlways override project IDs from the URL and DSN with the identifier used at the upstream.
Enable this setting for Relays used to redirect traffic to a migrated Sentry instance. Validation of project identifiers can be safely skipped in these cases.