Skip to main content

saluki_components/config_registry/datadog/
dogstatsd_mapper.rs

1//! Annotations for DogStatsD mapper transform configuration keys.
2use crate::config_registry::{generated::schema, structs, SalukiAnnotation, SchemaEntry, SupportLevel, ValueType};
3
4// ADP-specific keys not present in the vendored Agent schema.
5static DOGSTATSD_MAPPER_STRING_INTERNER_SIZE_SCHEMA: SchemaEntry = SchemaEntry {
6    yaml_path: "dogstatsd_mapper_string_interner_size",
7    env_vars: &[],
8    value_type: ValueType::Integer,
9    default: None,
10};
11
12crate::declare_annotations! {
13    /// `dogstatsd_mapper_profiles` — JSON-encoded list of DogStatsD metric mapping profiles.
14    /// Uses a custom test value since the generic String test value is not valid mapper JSON.
15    DOGSTATSD_MAPPER_PROFILES = SalukiAnnotation {
16        schema: &schema::DOGSTATSD_MAPPER_PROFILES,
17        support_level: SupportLevel::Full,
18        additional_yaml_paths: &[],
19        env_var_override: None,
20        used_by: &[structs::DOGSTATSD_MAPPER_CONFIGURATION],
21        value_type_override: None,
22        test_json: Some(r#"[{"name":"test","prefix":"test.","mappings":[]}]"#),
23    };
24
25    /// `dogstatsd_mapper_string_interner_size` — interner byte budget for the mapper transform.
26    /// ADP-specific key, not in the Agent schema.
27    DOGSTATSD_MAPPER_STRING_INTERNER_SIZE = SalukiAnnotation {
28        schema: &DOGSTATSD_MAPPER_STRING_INTERNER_SIZE_SCHEMA,
29        support_level: SupportLevel::Full,
30        additional_yaml_paths: &[],
31        env_var_override: None,
32        used_by: &[structs::DOGSTATSD_MAPPER_CONFIGURATION],
33        value_type_override: None,
34        test_json: None,
35    };
36}