pub struct TraceSamplerConfiguration {Show 20 fields
pub probabilistic_sampler_enabled: bool,
pub probabilistic_hash_seed: u32,
pub probabilistic_full_trace_id: bool,
pub sampling_percentage: f64,
pub error_sampling_enabled: bool,
pub error_tracking_standalone: bool,
pub errors_per_second: f64,
pub target_traces_per_second: f64,
pub extra_sample_rate: f64,
pub max_catalog_entries: usize,
pub agent_env: AgentEnv,
pub rare_sampler_enabled: bool,
pub rare_sampler_tps: f64,
pub rare_sampler_cooldown_secs: f64,
pub rare_sampler_cardinality: usize,
pub compute_top_level_by_span_kind: bool,
pub analyzed_spans_by_service: HashMap<String, HashMap<String, f64>>,
pub analyzed_rate_by_service: HashMap<String, f64>,
pub max_events_per_second: f64,
pub remote_sampling: TraceSamplingSubscription,
}Expand description
Configuration for the trace sampler transform.
Fields§
§probabilistic_sampler_enabled: boolWhether the probabilistic sampler decides traces, in place of the priority, error, and rare samplers.
probabilistic_hash_seed: u32Seed mixed into the trace-ID hash before probabilistic sampling.
probabilistic_full_trace_id: boolWhether the probabilistic sampler hashes the full 128-bit trace ID instead of its low 64 bits.
sampling_percentage: f64Percentage of traces the probabilistic sampler keeps.
error_sampling_enabled: boolWhether error traces are sampled independently of the base sampler.
error_tracking_standalone: boolWhether Error Tracking standalone mode is enabled.
errors_per_second: f64Target number of error traces sampled per second.
target_traces_per_second: f64Target number of traces sampled per second.
extra_sample_rate: f64Multiplier applied to every learned keep-rate of the adaptive samplers.
max_catalog_entries: usizeMaximum number of service signatures the priority sampler tracks rates for. If set to 0, the catalog’s
default size applies.
agent_env: AgentEnvEnvironment the priority sampler uses for traces without one, and used to select a remote by_env entry.
rare_sampler_enabled: boolWhether the rare sampler is enabled.
rare_sampler_tps: f64Target number of rare traces sampled per second.
rare_sampler_cooldown_secs: f64Cooldown, in seconds, before a signature may be sampled again by the rare sampler.
rare_sampler_cardinality: usizeMaximum number of distinct signatures the rare sampler tracks.
compute_top_level_by_span_kind: boolWhether spans are marked top-level by their span kind.
analyzed_spans_by_service: HashMap<String, HashMap<String, f64>>Event extraction rates by service and operation name. Takes precedence over analyzed_rate_by_service when
non-empty.
analyzed_rate_by_service: HashMap<String, f64>Event extraction rates by service, for the deprecated analytics configuration.
Rates are ignored when analyzed_spans_by_service is non-empty. Building the sampler logs a deprecation warning
whenever this map is non-empty, even when its rates are ignored.
max_events_per_second: f64Upper bound on the average number of extracted events sampled per second.
remote_sampling: TraceSamplingSubscriptionRemote APM_SAMPLING updates, or an inert subscription when remote sampling is not configured.
Only priority and error sampling targets and rare sampling can change. For each field left unset by the remote configuration, the sampler uses its local setting.
Trait Implementations§
Source§impl Debug for TraceSamplerConfiguration
impl Debug for TraceSamplerConfiguration
Source§impl MemoryBounds for TraceSamplerConfiguration
impl MemoryBounds for TraceSamplerConfiguration
Source§fn specify_bounds(&self, builder: &mut MemoryBoundsBuilder<'_>)
fn specify_bounds(&self, builder: &mut MemoryBoundsBuilder<'_>)
Source§impl TransformBuilder for TraceSamplerConfiguration
impl TransformBuilder for TraceSamplerConfiguration
Source§fn input_event_type(&self) -> EventType
fn input_event_type(&self) -> EventType
Source§fn outputs(&self) -> &[OutputDefinition<EventType>]
fn outputs(&self) -> &[OutputDefinition<EventType>]
Auto Trait Implementations§
impl Freeze for TraceSamplerConfiguration
impl RefUnwindSafe for TraceSamplerConfiguration
impl Send for TraceSamplerConfiguration
impl Sync for TraceSamplerConfiguration
impl Unpin for TraceSamplerConfiguration
impl UnsafeUnpin for TraceSamplerConfiguration
impl UnwindSafe for TraceSamplerConfiguration
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Source§fn compression(self) -> Compression<Self>where
Self: Sized,
fn compression(self) -> Compression<Self>where
Self: Sized,
Source§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
Source§fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
413 Payload Too Large responses. Read moreSource§impl<T> Track for T
impl<T> Track for T
Source§fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
Tracked wrapper. Read moreSource§fn in_current_resource_group(self) -> Tracked<Self>
fn in_current_resource_group(self) -> Tracked<Self>
Tracked wrapper. Read more