Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions test/antithesis/harness/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ impl DogStatsdConfig {
/// unset. The current value caps the preallocation at 512 MiB.
const MAX_STRING_INTERNER_ENTRIES: u64 = 1_048_576;

/// Cloud provider kinds sampled into `provider_kind`. The empty string emits no tag.
const PROVIDER_KINDS: &[&str] = &["", "gke-autopilot", "gke-gdc"];

/// Agent-facing config. `hostname`, `api_key`, `dd_url`, and the socket are
/// supplied by the environment; `log_level` and the `DogStatsD` options are
/// sampled per branch. The static flags are appended by [`Self::to_yaml`], not
Expand All @@ -132,6 +135,9 @@ pub struct DatadogConfig {
dd_url: String,
/// Agent log verbosity. Pinned to `error` (see [`LogLevel`]).
log_level: LogLevel,
/// Cloud provider kind, sampled per timeline.
#[serde(skip_serializing_if = "String::is_empty")]
provider_kind: String,
Comment on lines +138 to +140

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Document the provider-kind configuration behavior

Expand this field's Rustdoc beyond “sampled per timeline”: it does not explain that a nonempty value appends provider_kind:<value> to DogStatsD metrics, that empty/absent disables the tag, that the harness samples omission plus two fixed values, or who should change this test input. The repository requires configuration fields to document their behavioral impact, default, boundary behavior, and intended operator.

AGENTS.md reference: AGENTS.md:L149-L154

Useful? React with 👍 / 👎.

/// `DogStatsD` options, flattened to top-level `dogstatsd_*` keys.
#[serde(flatten)]
dogstatsd: DogStatsdConfig,
Expand All @@ -150,6 +156,7 @@ impl DatadogConfig {
api_key: api_key.to_owned(),
dd_url: dd_url.to_owned(),
log_level: LogLevel::Error,
provider_kind: PROVIDER_KINDS[rng.random_range(0..PROVIDER_KINDS.len())].to_owned(),
dogstatsd: DogStatsdConfig::sample(rng, dogstatsd_socket),
}
}
Expand Down
Loading