Skip to main content

normalize_client_sample_rate

Function normalize_client_sample_rate 

Source
pub fn normalize_client_sample_rate(
    attributes: &mut Annotated<Attributes>,
    dsc_sample_rate: Option<f64>,
)
Expand description

Normalizes the client sample rate attribute to be in the range (0, 1].

If the attribute is missing, it is created from the DSC sample rate, falling back to 1.0. The resulting value is validated the same way as a client supplied one.

This is only relevant for spans as other eap types re not sampled.