Struct relay_dynamic_config::TagSpec
source · pub struct TagSpec {
pub key: String,
pub field: Option<String>,
pub value: Option<String>,
pub condition: Option<RuleCondition>,
}
Expand description
Configuration for a tag to add to a metric.
Tags values can be static if defined through value
or dynamically queried from the payload if
defined through field
. These two options are mutually exclusive, behavior is undefined if both
are specified.
Fields§
§key: String
The key of the tag to extract.
field: Option<String>
Path to a field containing the tag’s value.
It follows the Getter
syntax to read data from the payload.
Mutually exclusive with value
.
value: Option<String>
Literal value of the tag.
Mutually exclusive with field
.
condition: Option<RuleCondition>
An optional condition to meet before extraction.
See RuleCondition
for all available options to specify and combine conditions. If no
condition is specified, the tag is added unconditionally, provided it is not already there.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for TagSpec
impl<'de> Deserialize<'de> for TagSpec
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
impl StructuralPartialEq for TagSpec
Auto Trait Implementations§
impl Freeze for TagSpec
impl RefUnwindSafe for TagSpec
impl Send for TagSpec
impl Sync for TagSpec
impl Unpin for TagSpec
impl UnwindSafe for TagSpec
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)