Skip to content

Commit add9e26

Browse files
remove exp telemetry & stable v2 (#76)
1 parent 4ffb19b commit add9e26

File tree

8 files changed

+19
-37
lines changed

8 files changed

+19
-37
lines changed

sdk/feature-management-applicationinsights-browser/package.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@microsoft/feature-management-applicationinsights-browser",
3-
"version": "2.0.0-preview.3",
3+
"version": "2.0.0",
44
"description": "Feature Management Application Insights Plugin for Browser provides a solution for sending feature flag evaluation events produced by the Feature Management library.",
55
"main": "./dist/umd/index.js",
66
"module": "./dist/esm/index.js",
@@ -24,6 +24,9 @@
2424
"url": "git+https://github.com/microsoft/FeatureManagement-JavaScript.git"
2525
},
2626
"license": "MIT",
27+
"publishConfig": {
28+
"tag": "stable"
29+
},
2730
"bugs": {
2831
"url": "https://github.com/microsoft/FeatureManagement-JavaScript/issues"
2932
},
@@ -42,7 +45,7 @@
4245
},
4346
"dependencies": {
4447
"@microsoft/applicationinsights-web": "^3.3.2",
45-
"@microsoft/feature-management": "2.0.0-preview.3"
48+
"@microsoft/feature-management": "2.0.0"
4649
}
4750
}
4851

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT license.
33

4-
export const VERSION = "2.0.0-preview.3";
4+
export const VERSION = "2.0.0";

sdk/feature-management-applicationinsights-node/package.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@microsoft/feature-management-applicationinsights-node",
3-
"version": "2.0.0-preview.3",
3+
"version": "2.0.0",
44
"description": "Feature Management Application Insights Plugin for Node.js provides a solution for sending feature flag evaluation events produced by the Feature Management library.",
55
"main": "./dist/commonjs/index.js",
66
"module": "./dist/esm/index.js",
@@ -24,6 +24,9 @@
2424
"url": "git+https://github.com/microsoft/FeatureManagement-JavaScript.git"
2525
},
2626
"license": "MIT",
27+
"publishConfig": {
28+
"tag": "stable"
29+
},
2730
"bugs": {
2831
"url": "https://github.com/microsoft/FeatureManagement-JavaScript/issues"
2932
},
@@ -42,7 +45,7 @@
4245
},
4346
"dependencies": {
4447
"applicationinsights": "^2.9.6",
45-
"@microsoft/feature-management": "2.0.0-preview.3"
48+
"@microsoft/feature-management": "2.0.0"
4649
}
4750
}
4851

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT license.
33

4-
export const VERSION = "2.0.0-preview.3";
4+
export const VERSION = "2.0.0";

sdk/feature-management/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/feature-management/package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@microsoft/feature-management",
3-
"version": "2.0.0-preview.3",
3+
"version": "2.0.0",
44
"description": "Feature Management is a library for enabling/disabling features at runtime. Developers can use feature flags in simple use cases like conditional statement to more advanced scenarios like conditionally adding routes.",
55
"main": "./dist/commonjs/index.js",
66
"module": "./dist/esm/index.js",
@@ -26,6 +26,9 @@
2626
"url": "git+https://github.com/microsoft/FeatureManagement-JavaScript.git"
2727
},
2828
"license": "MIT",
29+
"publishConfig": {
30+
"tag": "stable"
31+
},
2932
"bugs": {
3033
"url": "https://github.com/microsoft/FeatureManagement-JavaScript/issues"
3134
},

sdk/feature-management/src/telemetry/featureEvaluationEvent.ts

+1-28
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT license.
33

4-
import { EvaluationResult, VariantAssignmentReason } from "../featureManager";
4+
import { EvaluationResult } from "../featureManager";
55
import { EVALUATION_EVENT_VERSION } from "../version.js";
66

77
const VERSION = "Version";
@@ -10,8 +10,6 @@ const ENABLED = "Enabled";
1010
const TARGETING_ID = "TargetingId";
1111
const VARIANT = "Variant";
1212
const VARIANT_ASSIGNMENT_REASON = "VariantAssignmentReason";
13-
const DEFAULT_WHEN_ENABLED = "DefaultWhenEnabled";
14-
const VARIANT_ASSIGNMENT_PERCENTAGE = "VariantAssignmentPercentage";
1513

1614
export function createFeatureEvaluationEventProperties(result: EvaluationResult): any {
1715
if (result.feature === undefined) {
@@ -28,31 +26,6 @@ export function createFeatureEvaluationEventProperties(result: EvaluationResult)
2826
[VARIANT_ASSIGNMENT_REASON]: result.variantAssignmentReason,
2927
};
3028

31-
if (result.feature.allocation?.default_when_enabled) {
32-
eventProperties[DEFAULT_WHEN_ENABLED] = result.feature.allocation.default_when_enabled;
33-
}
34-
35-
if (result.variantAssignmentReason === VariantAssignmentReason.DefaultWhenEnabled) {
36-
let percentileAllocationPercentage = 0;
37-
if (result.variant !== undefined && result.feature.allocation !== undefined && result.feature.allocation.percentile !== undefined) {
38-
for (const percentile of result.feature.allocation.percentile) {
39-
percentileAllocationPercentage += percentile.to - percentile.from;
40-
}
41-
}
42-
eventProperties[VARIANT_ASSIGNMENT_PERCENTAGE] = (100 - percentileAllocationPercentage).toString();
43-
}
44-
else if (result.variantAssignmentReason === VariantAssignmentReason.Percentile) {
45-
let percentileAllocationPercentage = 0;
46-
if (result.variant !== undefined && result.feature.allocation !== undefined && result.feature.allocation.percentile !== undefined) {
47-
for (const percentile of result.feature.allocation.percentile) {
48-
if (percentile.variant === result.variant.name) {
49-
percentileAllocationPercentage += percentile.to - percentile.from;
50-
}
51-
}
52-
}
53-
eventProperties[VARIANT_ASSIGNMENT_PERCENTAGE] = percentileAllocationPercentage.toString();
54-
}
55-
5629
const metadata = result.feature.telemetry?.metadata;
5730
if (metadata) {
5831
for (const key in metadata) {

sdk/feature-management/src/version.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT license.
33

4-
export const VERSION = "2.0.0-preview.3";
4+
export const VERSION = "2.0.0";
55
export const EVALUATION_EVENT_VERSION = "1.0.0";

0 commit comments

Comments
 (0)