pub struct NormalizationConfig<'a> {
Show 26 fields pub project_id: Option<u64>, pub client: Option<String>, pub key_id: Option<String>, pub protocol_version: Option<String>, pub grouping_config: Option<Value>, pub client_ip: Option<&'a IpAddr>, pub client_sample_rate: Option<f64>, pub user_agent: RawUserAgentInfo<&'a str>, pub max_name_and_unit_len: Option<usize>, pub measurements: Option<CombinedMeasurementsConfig<'a>>, pub breakdowns_config: Option<&'a BreakdownsConfig>, pub normalize_user_agent: Option<bool>, pub transaction_name_config: TransactionNameConfig<'a>, pub is_renormalize: bool, pub remove_other: bool, pub emit_event_errors: bool, pub device_class_synthesis_config: bool, pub enrich_spans: bool, pub max_tag_value_length: usize, pub span_description_rules: Option<&'a Vec<SpanDescriptionRule>>, pub performance_score: Option<&'a PerformanceScoreConfig>, pub ai_model_costs: Option<&'a ModelCosts>, pub geoip_lookup: Option<&'a GeoIpLookup>, pub enable_trimming: bool, pub normalize_spans: bool, pub replay_id: Option<Uuid>,
}
Expand description

Configuration for normalize_event.

Fields§

§project_id: Option<u64>

The identifier of the target project, which gets added to the payload.

§client: Option<String>

The name and version of the SDK that sent the event.

§key_id: Option<String>

The internal identifier of the DSN, which gets added to the payload.

Note that this is different from the DSN’s public key. The ID is usually numeric.

§protocol_version: Option<String>

The version of the protocol.

This is a deprecated field, as there is no more versioning of Relay event payloads.

§grouping_config: Option<Value>

Configuration for issue grouping.

This configuration is persisted into the event payload to achieve idempotency in the processing pipeline and for reprocessing.

§client_ip: Option<&'a IpAddr>

The IP address of the SDK that sent the event.

When {{auto}} is specified and there is no other IP address in the payload, such as in the request context, this IP address gets added to the user context.

§client_sample_rate: Option<f64>

The SDK’s sample rate as communicated via envelope headers.

It is persisted into the event payload.

§user_agent: RawUserAgentInfo<&'a str>

The user-agent and client hints obtained from the submission request headers.

Client hints are the preferred way to infer device, operating system, and browser information should the event payload contain no such data. If no client hints are present, normalization falls back to the user agent.

§max_name_and_unit_len: Option<usize>

The maximum length for names of custom measurements.

Measurements with longer names are removed from the transaction event and replaced with a metadata entry.

§measurements: Option<CombinedMeasurementsConfig<'a>>

Configuration for measurement normalization in transaction events.

Has an optional crate::MeasurementsConfig from both the project and the global level. If at least one is provided, then normalization will truncate custom measurements and add units of known built-in measurements.

§breakdowns_config: Option<&'a BreakdownsConfig>

Emit breakdowns based on given configuration.

§normalize_user_agent: Option<bool>

When Some(true), context information is extracted from the user agent.

§transaction_name_config: TransactionNameConfig<'a>

Configuration to apply to transaction names, especially around sanitizing.

§is_renormalize: bool

When true, it is assumed that the event has been normalized before.

This disables certain normalizations, especially all that are not idempotent. The renormalize mode is intended for the use in the processing pipeline, so an event modified during ingestion can be validated against the schema and large data can be trimmed. However, advanced normalizations such as inferring contexts or clock drift correction are disabled.

§remove_other: bool

Overrides the default flag for other removal.

§emit_event_errors: bool

When enabled, adds errors in the meta to the event’s errors.

§device_class_synthesis_config: bool

When true, infers the device class from CPU and model.

§enrich_spans: bool

When true, extracts tags from event and spans and materializes them into span.data.

§max_tag_value_length: usize

The maximum allowed size of tag values in bytes. Longer values will be cropped.

§span_description_rules: Option<&'a Vec<SpanDescriptionRule>>

Configuration for replacing identifiers in the span description with placeholders.

This is similar to transaction_name_config, but applies to span descriptions.

§performance_score: Option<&'a PerformanceScoreConfig>

Configuration for generating performance score measurements for web vitals

§ai_model_costs: Option<&'a ModelCosts>

Configuration for calculating the cost of AI model runs

§geoip_lookup: Option<&'a GeoIpLookup>

An initialized GeoIP lookup.

§enable_trimming: bool

When Some(true), individual parts of the event payload is trimmed to a maximum size.

See the event schema for size declarations.

§normalize_spans: bool

Controls whether spans should be normalized (e.g. normalizing the exclusive time).

To normalize spans, is_renormalize must be disabled and normalize_spans enabled.

§replay_id: Option<Uuid>

The identifier of the Replay running while this event was created.

It is persisted into the event payload for correlation.

Trait Implementations§

source§

impl<'a> Clone for NormalizationConfig<'a>

source§

fn clone(&self) -> NormalizationConfig<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for NormalizationConfig<'a>

source§

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

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

impl<'a> Default for NormalizationConfig<'a>

source§

fn default() -> Self

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

Auto Trait Implementations§

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> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

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

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

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.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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

source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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