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

🔊 Add feature flags to telemetry events #1625

Merged
merged 8 commits into from
Jul 6, 2022

Conversation

amortemousque
Copy link
Contributor

@amortemousque amortemousque commented Jul 1, 2022

Motivation

Since we use standard feature flags (cf: https://github.com/DataDog/web-ui/pull/60432) we can now sample them.
This PR adds the enabled FF to the telemetry event to be able to filter on them.

Changes

Adds feature flag to telemetry event

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@amortemousque amortemousque requested a review from a team as a code owner July 1, 2022 15:57
@codecov-commenter
Copy link

Codecov Report

Merging #1625 (b39da5e) into main (1e895bc) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1625   +/-   ##
=======================================
  Coverage   90.87%   90.87%           
=======================================
  Files         126      126           
  Lines        4626     4627    +1     
  Branches     1034     1033    -1     
=======================================
+ Hits         4204     4205    +1     
  Misses        422      422           
Impacted Files Coverage Δ
packages/core/src/domain/telemetry/telemetry.ts 95.55% <ø> (ø)
...e/src/domain/configuration/experimentalFeatures.ts 100.00% <100.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@@ -80,6 +80,7 @@ export function startTelemetry(configuration: Configuration): Telemetry {
format_version: 2 as const,
},
telemetry: event as any, // https://github.com/microsoft/TypeScript/issues/48457
experimental_features: getExperimentalFeatures(),
Copy link
Contributor

Choose a reason for hiding this comment

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

💭 thought: ‏should not we put that on the schema?

Comment on lines +219 to +221
if (arrayLike instanceof Set) {
arrayLike.forEach((item) => array.push(item))
} else {
Copy link
Member

Choose a reason for hiding this comment

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

👏 praise: ‏Nice! Things we should do to support IE...

Copy link
Member

Choose a reason for hiding this comment

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

💬 suggestion: ‏Remove the setToArray function from this file and replace usages with arrayFrom

Copy link
Contributor

@liywjl liywjl left a comment

Choose a reason for hiding this comment

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

👏 praise: impressive work!! LGTM

@amortemousque amortemousque merged commit c6abe98 into main Jul 6, 2022
@amortemousque amortemousque deleted the aymeric/add-ff-to-telemetry branch July 6, 2022 13:49
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.

5 participants