Skip to main content

Relay

Struct Relay 

Source
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: RelayMode

The operation mode of this Relay.

§instance: RelayInstance

The instance type of this Relay.

§upstream: UpstreamDescriptor

The 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: IpAddr

The host the relay should bind to (network interface).

§port: u16

The 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: bool

Always 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.

Trait Implementations§

Source§

impl Debug for Relay

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Relay

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Relay
where Relay: Default,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Relay

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Relay

§

impl RefUnwindSafe for Relay

§

impl Send for Relay

§

impl Sync for Relay

§

impl Unpin for Relay

§

impl UnsafeUnpin for Relay

§

impl UnwindSafe for Relay

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T