Skip to content

Conversation

@zhiyuanliang-ms
Copy link
Member

Why this PR?

Allow user to set onFeatureEvaluated callback which be executed whenever a feature flag with telemetry enabled is evaluated.

}

interface FeatureManagerOptions {
export interface FeatureManagerOptions {
Copy link
Member

Choose a reason for hiding this comment

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

what's the purpose of code move? to put exported types together? Is there any change other than that?

Copy link
Member Author

@zhiyuanliang-ms zhiyuanliang-ms Sep 13, 2024

Choose a reason for hiding this comment

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

public stuff should be placed in front of private stuff. I follow this practice in .NET

Is there any change other than that?

No

import * as chai from "chai";
const expect = chai.expect;

import { FeatureManager, ConfigurationObjectFeatureFlagProvider, EvaluationResult, VariantAssignmentReason } from "../";
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you put import statements together at the beginning of the file?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

But I found that the testsuite in JS provider, put all import statements in the beginning. I will make them consistent. But personally, I like the way in this repo.

Recall that we've had this discussion before: #24 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

I prefer the imports together. In the /example code- it might be helpful to keep them apart to clearly show the reader which parts relate to what. But I don't think it's valuable outside of an example

Copy link
Member

@rossgrambo rossgrambo left a comment

Choose a reason for hiding this comment

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

Have you checked parity with dotnet/python? Using the https://github.com/microsoft/FeatureManagement samples

@zhiyuanliang-ms
Copy link
Member Author

@rossgrambo Yan used these feature flags for test which are from the centralized feature flag sample. The targeting hash behavior was guarded by it.

@zhiyuanliang-ms zhiyuanliang-ms merged commit fe42395 into preview Sep 14, 2024
@zhiyuanliang-ms zhiyuanliang-ms deleted the zhiyuanliang/telemetry-support branch September 14, 2024 03:35
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