pub struct DynamicLabelConfig {
pub key: String,
pub strategy: DynamicLabelStrategy,
}Expand description
Configuration for a dynamic label — an always-on rotating label value attached to every emitted event.
Unlike CardinalitySpikeConfig, dynamic labels are not time-windowed:
they appear in every event for the lifetime of the scenario. This enables
simulating a stable fleet of N distinct sources (e.g., 10 hostnames, 5 pod
names) without a spike/window concept.
§Example YAML (counter strategy)
dynamic_labels:
- key: hostname
prefix: "host-"
cardinality: 10§Example YAML (values list strategy)
dynamic_labels:
- key: region
values: [us-east-1, us-west-2, eu-west-1]Fields§
§key: StringThe label key to attach to every event.
Must be a valid Prometheus label key: [a-zA-Z_][a-zA-Z0-9_]*.
strategy: DynamicLabelStrategyThe strategy for generating per-tick label values.
Deserialized via untagged enum: provide either values: [...] or
prefix: / cardinality: fields directly alongside key:.
Trait Implementations§
Source§impl Clone for DynamicLabelConfig
impl Clone for DynamicLabelConfig
Source§fn clone(&self) -> DynamicLabelConfig
fn clone(&self) -> DynamicLabelConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DynamicLabelConfig
impl Debug for DynamicLabelConfig
Source§impl<'de> Deserialize<'de> for DynamicLabelConfig
impl<'de> Deserialize<'de> for DynamicLabelConfig
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
Auto Trait Implementations§
impl Freeze for DynamicLabelConfig
impl RefUnwindSafe for DynamicLabelConfig
impl Send for DynamicLabelConfig
impl Sync for DynamicLabelConfig
impl Unpin for DynamicLabelConfig
impl UnsafeUnpin for DynamicLabelConfig
impl UnwindSafe for DynamicLabelConfig
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