Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDTEST-415] Add test_session metric #207

Merged
merged 3 commits into from
Jul 30, 2024

Conversation

anmarchenko
Copy link
Member

@anmarchenko anmarchenko commented Jul 30, 2024

What does this PR do?
Adds test_session metric with provider tag to track which CI providers are used

How to test the change?
Unit tests

@@ -18,6 +18,23 @@ module Telemetry
Ext::AppTypes::TYPE_TEST_SESSION => Ext::Telemetry::EventType::SESSION
}.freeze

PROVIDER_TAG_TO_TELEMETRY_PROVIDER_TAG = {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is incredibly ugly: for some reason we use different values for some providers when submitting to citestcycle and telemetry. For example Microsoft Azure is "azurepipelines" in citestcylce but "azp" in telemetry

Copy link

@romainkomorndatadog romainkomorndatadog Jul 30, 2024

Choose a reason for hiding this comment

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

Hot take: I think we shouldn't do this and I think we should fix the other tracers to use the same tags for telemetry and citestcycle.

Unless I'm mistaken, the backend doesn't have an enum validating these values, so worst case, we'd have some extra values for some time.

Copy link
Member Author

Choose a reason for hiding this comment

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

I like your proposal, but I also would like to move fast and leave this epic behind. Given that the discussion about naming can go on for months from now, let's merge this one as is and then I'll fix it in one of the subsequent PRs

@anmarchenko anmarchenko marked this pull request as ready for review July 30, 2024 08:55
@anmarchenko anmarchenko requested review from a team as code owners July 30, 2024 08:55
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.85%. Comparing base (fc7425c) to head (052dac8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #207   +/-   ##
=======================================
  Coverage   98.84%   98.85%           
=======================================
  Files         251      251           
  Lines       11526    11576   +50     
  Branches      516      516           
=======================================
+ Hits        11393    11443   +50     
  Misses        133      133           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -18,6 +18,23 @@ module Telemetry
Ext::AppTypes::TYPE_TEST_SESSION => Ext::Telemetry::EventType::SESSION
}.freeze

PROVIDER_TAG_TO_TELEMETRY_PROVIDER_TAG = {
Copy link

@romainkomorndatadog romainkomorndatadog Jul 30, 2024

Choose a reason for hiding this comment

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

Hot take: I think we shouldn't do this and I think we should fix the other tracers to use the same tags for telemetry and citestcycle.

Unless I'm mistaken, the backend doesn't have an enum validating these values, so worst case, we'd have some extra values for some time.

@anmarchenko anmarchenko merged commit 3246975 into main Jul 30, 2024
28 checks passed
@anmarchenko anmarchenko deleted the anmarchenko/telemetry_test_session_metric branch July 30, 2024 09:24
@github-actions github-actions bot added this to the 1.3.0 milestone Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants