Skip to main content

Module tag

Module tag 

Source
Expand description

Datadog tag construction and validation.

§Validation policy

The Datadog documentation defines more tag rules than this module enforces: https://docs.datadoghq.com/getting_started/tagging/#define-tags. Enforcing rules that tracing and profiling do not apply consistently would produce a worse user experience, so runtime validation currently rejects only empty tags and likely colon-related mistakes. Compile-time validation by the [tag!] macro is intentionally stricter.

Macros§

const_assert
Asserts that constant expressions evaluate to true.
const_assert_ne
Asserts that constants are not equal in value.

Structs§

InvalidTag
A tag rejected while validating a tag.
Tag
TagParser
An allocation-free iterator over validated tags in a comma- or space-separated string.

Enums§

TagValidationError
Describes some reasons why a tag is invalid.

Functions§

parse_tags
Parse a string of tags typically provided by environment variables The tags are expected to be either space or comma separated: “key1:value1,key2:value2” “key1:value1 key2:value2” Tag names and values are required and may not be empty.