Skip to main content

Crate datadog_agent_tag_normalization

Crate datadog_agent_tag_normalization 

Source
Expand description

Metric tag key normalization, in the form the Datadog metrics intake stores tags in.

Tags are submitted verbatim and the intake normalizes them on ingest, so a decision that has to agree with what the intake stores, such as matching metric_tag_filterlist keys, must compare normalized keys. The specification is SPEC.md, next to this crate’s Cargo.toml: this crate implements its tag key K(t) (tag_key) and rule key R(k) (rule_key), and the tests check the vectors in testdata/ and the specification’s properties.

tag_key borrows the input for an already-normalized ASCII key, and otherwise writes into a caller-provided TagBuf, which is small enough to live on the stack.

Structs§

TagBuf
Fixed-capacity scratch buffer for a normalized tag key.
TagKey
The key of a tag, as the intake stores it.

Functions§

can_have_value
Returns whether a stored tag with the normalized key key can have a value.
rule_key
Normalizes a configured tag key into the key the intake stores for tags with that key.
tag_key
Returns the key the intake stores for tag.