Skip to content

Commit 98dc187

Browse files
committed
chore(antithesis): Add provider_kind in sample config
Pyld54 asserts a v3 tagset back-reference resolves to an earlier tagset. Agent emits that back-reference only when a metric carries both a shared prefix tagset and its own tags. Previously we only ever emitted load that carried no shared prefix. This commit adds provider_kind into the sampled datadog.yaml. Agent will attach this as a global tag which acts as a shared prefix. 1/3 of configs will not have provider_kind present.
1 parent 86e0959 commit 98dc187

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

test/antithesis/harness/src/config.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ impl DogStatsdConfig {
117117
/// unset. The current value caps the preallocation at 512 MiB.
118118
const MAX_STRING_INTERNER_ENTRIES: u64 = 1_048_576;
119119

120+
/// Cloud provider kinds sampled into `provider_kind`. The empty string emits no tag.
121+
const PROVIDER_KINDS: &[&str] = &["", "gke-autopilot", "gke-gdc"];
122+
120123
/// Agent-facing config. `hostname`, `api_key`, `dd_url`, and the socket are
121124
/// supplied by the environment; `log_level` and the `DogStatsD` options are
122125
/// sampled per branch. The static flags are appended by [`Self::to_yaml`], not
@@ -132,6 +135,9 @@ pub struct DatadogConfig {
132135
dd_url: String,
133136
/// Agent log verbosity. Pinned to `error` (see [`LogLevel`]).
134137
log_level: LogLevel,
138+
/// Cloud provider kind, sampled per timeline.
139+
#[serde(skip_serializing_if = "String::is_empty")]
140+
provider_kind: String,
135141
/// `DogStatsD` options, flattened to top-level `dogstatsd_*` keys.
136142
#[serde(flatten)]
137143
dogstatsd: DogStatsdConfig,
@@ -150,6 +156,7 @@ impl DatadogConfig {
150156
api_key: api_key.to_owned(),
151157
dd_url: dd_url.to_owned(),
152158
log_level: LogLevel::Error,
159+
provider_kind: PROVIDER_KINDS[rng.random_range(0..PROVIDER_KINDS.len())].to_owned(),
153160
dogstatsd: DogStatsdConfig::sample(rng, dogstatsd_socket),
154161
}
155162
}

0 commit comments

Comments
 (0)