pub struct DynamicSamplingContext { /* private fields */ }
Expand description
Sentry supports sampling at the server level through Dynamic Sampling. This feature allows users to specify target sample rates for each project via the frontend instead of requiring an application redeployment. The backend needs additional information from the SDK to support these features, contained in the Dynamic Sampling Context.
Implementations§
Source§impl DynamicSamplingContext
impl DynamicSamplingContext
Sourcepub fn with_trace_id(self, trace_id: TraceId) -> Self
pub fn with_trace_id(self, trace_id: TraceId) -> Self
Sets the trace ID.
Sourcepub fn with_public_key(self, public_key: String) -> Self
pub fn with_public_key(self, public_key: String) -> Self
Sets the DSN public key.
Sourcepub fn with_sample_rate(self, sample_rate: f32) -> Self
pub fn with_sample_rate(self, sample_rate: f32) -> Self
Sets the sample rate.
Sourcepub fn with_sample_rand(self, sample_rand: SampleRand) -> Self
pub fn with_sample_rand(self, sample_rand: SampleRand) -> Self
Sets the sample random value generated by the head of trace SDK.
Sourcepub fn with_sampled(self, sampled: bool) -> Self
pub fn with_sampled(self, sampled: bool) -> Self
Sets the sampled flag.
Sourcepub fn with_release(self, release: String) -> Self
pub fn with_release(self, release: String) -> Self
Sets the release.
Sourcepub fn with_environment(self, environment: String) -> Self
pub fn with_environment(self, environment: String) -> Self
Sets the environment.
Sourcepub fn with_transaction(self, transaction: String) -> Self
pub fn with_transaction(self, transaction: String) -> Self
Sets the transaction.
Sourcepub fn with_org_id(self, org_id: OrganizationId) -> Self
pub fn with_org_id(self, org_id: OrganizationId) -> Self
Sets the organization ID.
Trait Implementations§
Source§impl Clone for DynamicSamplingContext
impl Clone for DynamicSamplingContext
Source§fn clone(&self) -> DynamicSamplingContext
fn clone(&self) -> DynamicSamplingContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DynamicSamplingContext
impl Debug for DynamicSamplingContext
Source§impl Default for DynamicSamplingContext
impl Default for DynamicSamplingContext
Source§fn default() -> DynamicSamplingContext
fn default() -> DynamicSamplingContext
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DynamicSamplingContext
impl<'de> Deserialize<'de> for DynamicSamplingContext
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DynamicSamplingContext
impl PartialEq for DynamicSamplingContext
Source§impl Serialize for DynamicSamplingContext
impl Serialize for DynamicSamplingContext
impl StructuralPartialEq for DynamicSamplingContext
Auto Trait Implementations§
impl Freeze for DynamicSamplingContext
impl RefUnwindSafe for DynamicSamplingContext
impl Send for DynamicSamplingContext
impl Sync for DynamicSamplingContext
impl Unpin for DynamicSamplingContext
impl UnwindSafe for DynamicSamplingContext
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
Mutably borrows from an owned value. Read more