Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/shim/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ export enum StatsbeatFeature {
DISTRO = 8,
LIVE_METRICS = 16,
SHIM = 32,
CUSTOMER_STATSBEAT = 64,
CUSTOMER_SDKSTATS = 64,
MULTI_IKEY = 128,
}

Expand Down
6 changes: 3 additions & 3 deletions test/unitTests/shared/util/statsbeatFeaturesManager.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ describe("shared/util/StatsbeatFeaturesManager", () => {
assert.ok((config.feature & StatsbeatFeature.SHIM) !== 0, "SHIM feature should remain enabled");
});

it("should enable CUSTOMER_STATSBEAT feature using bitmap", () => {
it("should enable CUSTOMER_SDKSTATS feature using bitmap", () => {
StatsbeatFeaturesManager.getInstance().initialize();
StatsbeatFeaturesManager.getInstance().enableFeature(StatsbeatFeature.CUSTOMER_STATSBEAT);
StatsbeatFeaturesManager.getInstance().enableFeature(StatsbeatFeature.CUSTOMER_SDKSTATS);

const envValue = process.env["AZURE_MONITOR_STATSBEAT_FEATURES"];
assert.ok(envValue, "environment variable should be set");

const config = JSON.parse(envValue);
assert.ok((config.feature & StatsbeatFeature.CUSTOMER_STATSBEAT) !== 0, "CUSTOMER_STATSBEAT feature should be enabled");
assert.ok((config.feature & StatsbeatFeature.CUSTOMER_SDKSTATS) !== 0, "CUSTOMER_SDKSTATS feature should be enabled");
assert.ok((config.feature & StatsbeatFeature.SHIM) !== 0, "SHIM feature should remain enabled");
});

Expand Down
Loading