pub struct GlobalConfig {
pub measurements: Option<MeasurementsConfig>,
pub quotas: Vec<Quota>,
pub filters: ErrorBoundary<GenericFiltersConfig>,
pub options: Options,
pub metric_extraction: ErrorBoundary<MetricExtractionGroups>,
pub ai_model_costs: ErrorBoundary<ModelCosts>,
pub ai_model_metadata: ErrorBoundary<ModelMetadata>,
pub span_op_defaults: SpanOpDefaults,
}Expand description
A dynamic configuration for all Relays passed down from Sentry.
Values shared across all projects may also be included here, to keep
ProjectConfigs small.
Fields§
§measurements: Option<MeasurementsConfig>Configuration for measurements normalization.
quotas: Vec<Quota>Quotas that apply to all projects.
filters: ErrorBoundary<GenericFiltersConfig>Configuration for global inbound filters.
These filters are merged with generic filters in project configs before applying.
options: OptionsSentry options passed down to Relay.
metric_extraction: ErrorBoundary<MetricExtractionGroups>Configuration for global metrics extraction rules.
These are merged with rules in project configs before applying.
ai_model_costs: ErrorBoundary<ModelCosts>Configuration for AI span measurements.
ai_model_metadata: ErrorBoundary<ModelMetadata>Metadata for AI models including costs and context size.
span_op_defaults: SpanOpDefaultsConfiguration to derive the span.op from other span fields.
Implementations§
Source§impl GlobalConfig
impl GlobalConfig
Sourcepub fn load(folder_path: &Path) -> Result<Option<Self>>
pub fn load(folder_path: &Path) -> Result<Option<Self>>
Loads the GlobalConfig from a file if it’s provided.
The folder_path argument should be the path to the folder where the Relay config and credentials are stored.
Sourcepub fn model_metadata(&self) -> Option<ModelMetadata>
pub fn model_metadata(&self) -> Option<ModelMetadata>
Returns [ModelMetadata], preferring ai_model_metadata if present and falling
back to ai_model_costs (adapted to the new format) otherwise.
Trait Implementations§
Source§impl Clone for GlobalConfig
impl Clone for GlobalConfig
Source§fn clone(&self) -> GlobalConfig
fn clone(&self) -> GlobalConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GlobalConfig
impl Debug for GlobalConfig
Source§impl Default for GlobalConfig
impl Default for GlobalConfig
Source§fn default() -> GlobalConfig
fn default() -> GlobalConfig
Source§impl<'de> Deserialize<'de> for GlobalConfigwhere
GlobalConfig: Default,
impl<'de> Deserialize<'de> for GlobalConfigwhere
GlobalConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for GlobalConfig
impl !RefUnwindSafe for GlobalConfig
impl Send for GlobalConfig
impl Sync for GlobalConfig
impl Unpin for GlobalConfig
impl UnsafeUnpin for GlobalConfig
impl !UnwindSafe for GlobalConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].