Skip to content

Commit

Permalink
add "known_tests" telemetry tag for settings response metric
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Jan 30, 2025
1 parent 72d0f32 commit 50ba155
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/datadog/ci/ext/telemetry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ module Telemetry
TAG_REQUIRE_GIT = "require_git"
TAG_EARLY_FLAKE_DETECTION_ENABLED = "early_flake_detection_enabled"
TAG_FLAKY_TEST_RETRIES_ENABLED = "flaky_test_retries_enabled"
TAG_KNOWN_TESTS_ENABLED = "known_tests_enabled"
# tags for test_session metric
TAG_PROVIDER = "provider"
TAG_AUTO_INJECTED = "auto_injected"
Expand Down
3 changes: 2 additions & 1 deletion lib/datadog/ci/remote/library_settings_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def fetch(test_session)
Ext::Telemetry::TAG_EARLY_FLAKE_DETECTION_ENABLED => library_settings.early_flake_detection_enabled?.to_s,
Ext::Telemetry::TAG_FLAKY_TEST_RETRIES_ENABLED => library_settings.flaky_test_retries_enabled?.to_s,
Ext::Telemetry::TAG_ITR_ENABLED => library_settings.itr_enabled?.to_s,
Ext::Telemetry::TAG_REQUIRE_GIT => library_settings.require_git?.to_s
Ext::Telemetry::TAG_REQUIRE_GIT => library_settings.require_git?.to_s,
Ext::Telemetry::TAG_KNOWN_TESTS_ENABLED => library_settings.known_tests_enabled?.to_s
}
)

Expand Down
2 changes: 2 additions & 0 deletions sig/datadog/ci/ext/telemetry.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ module Datadog

TAG_FLAKY_TEST_RETRIES_ENABLED: "flaky_test_retries_enabled"

TAG_KNOWN_TESTS_ENABLED: "known_tests_enabled"

TAG_EARLY_FLAKE_DETECTION_ABORT_REASON: "early_flake_detection_abort_reason"

TAG_PROVIDER: "provider"
Expand Down
3 changes: 3 additions & 0 deletions spec/datadog/ci/remote/library_settings_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"itr_enabled" => "True",
"require_git" => require_git,
"flaky_test_retries_enabled" => "true",
"known_tests_enabled" => "true",
"early_flake_detection" => {
"enabled" => "true",
"slow_test_retries" => {
Expand Down Expand Up @@ -115,6 +116,7 @@
expect(response.tests_skipping_enabled?).to be false
expect(response.flaky_test_retries_enabled?).to be true
expect(response.early_flake_detection_enabled?).to be true
expect(response.known_tests_enabled?).to be true
expect(response.slow_test_retries.entries).to eq(
[
Datadog::CI::Remote::SlowTestRetries::Entry.new(5.0, 10),
Expand All @@ -132,6 +134,7 @@
"itrskip_enabled" => "false",
"early_flake_detection_enabled" => "true",
"flaky_test_retries_enabled" => "true",
"known_tests_enabled" => "true",
"require_git" => "false"
)
end
Expand Down

0 comments on commit 50ba155

Please sign in to comment.