-
Notifications
You must be signed in to change notification settings - Fork 127
Merges variants and isenabled paths. Adds variant reason field. #290
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
Changes from 9 commits
87b34df
e3b2392
6a24277
602f32f
8e6c14d
c1094df
391fef0
263e284
6ff2a4d
ff0b240
6660d09
cd1dc64
b26628a
4a3f7cf
3007179
3649fd0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT license. | ||
| // | ||
| namespace Microsoft.FeatureManagement.Telemetry | ||
| { | ||
| /// <summary> | ||
| /// The reason the variant was assigned during the evaluation of a feature. | ||
| /// </summary> | ||
| public enum AssignmentReason | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if it's just me feeling this confusing. No where in this enum the variant is mentioned. For example,
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can change the enum name to AssignmentReason.None is the default value of the enum. When there is no variant assigned, the reason will be
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| { | ||
| /// <summary> | ||
| /// No variant is assigned. | ||
| /// </summary> | ||
| None, | ||
|
|
||
| /// <summary> | ||
| /// Variant is assigned by default when the feature flag is disabled. | ||
| /// </summary> | ||
| DisabledDefault, | ||
|
|
||
| /// <summary> | ||
| /// Variant is assigned by default after processing the user/group/percentile allocation, when the feature flag is enabled. | ||
| /// </summary> | ||
| EnabledDefault, | ||
|
|
||
| /// <summary> | ||
| /// Variant is assigned because of the user allocation. | ||
| /// </summary> | ||
| User, | ||
|
|
||
| /// <summary> | ||
| /// Variant is assigned because of the group allocation. | ||
| /// </summary> | ||
| Group, | ||
|
|
||
| /// <summary> | ||
| /// Variant is assigned because of the percentile allocation. | ||
| /// </summary> | ||
| Percentile | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to call out that the ApplicationInsightsTelemetryPublisher will not send AssignmentReason telemetry if the AssignmentReason is None (which will only occur when the variant is null).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then it doesn't sound right. We should send the telemetry. This is a case people will want to know that the feature flag is misconfigured.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you intend to be discovered here. What would you expect "AssignmentReason" to be on a basic on/off feature flag? We already don't send variant in this case. I'm not sure what meaning "AssignmentReason" would have if no variant has been assigned.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sync'ed up with Jimmy offline and Jimmy help clarify the scenario. I was confused by the comment for
None: No variant is assigned.Noneactually indicates the variant evaluation never occurs so the assignment is irrelevant. The assignment reason is more like "NA" in this case. We could update the comment to make it clearer.