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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"type": "prerelease",
"comment": "Fix to retrieve deviceId",
"comment": "rever passing localid to telmetry pipeline",
"packageName": "@react-native-windows/telemetry",
"email": "[email protected]",
"dependentChangeType": "patch"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ test('setup() verify static common property values with async sources', async ()
await TelemetryTest.startTest();

const props: Record<string, () => Promise<string | undefined>> = {
deviceId: basePropUtils.deviceId,
//deviceId: basePropUtils.deviceId,
deviceLocale: basePropUtils.deviceLocale,
};

Expand Down Expand Up @@ -365,11 +365,6 @@ function verifyTestCommandTelemetryProcessor(
// Verify basics
const commonProperties = properties!.common;
expect(commonProperties.commandName).toBe('test-command');
// Verify LocalId
const expectedLocalId = TelemetryTest.getCommonProperty('deviceId');
expect(envelope.ext?.device?.localId).toBeDefined();
expect(envelope.ext?.device?.localId).toBe(expectedLocalId);
expect(commonProperties.device?.localId).toBe(expectedLocalId); // Only if you know it's set in the event, not in static commonProperties

// Verify versions info
const versions = properties!.versions;
Expand Down
6 changes: 2 additions & 4 deletions packages/@react-native-windows/telemetry/src/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export class Telemetry {

/** Sets up any base properties that all telemetry events require. */
private static async setupBaseProperties() {
Telemetry.commonProperties.deviceId = await basePropUtils.deviceId();
// Telemetry.commonProperties.deviceId = await basePropUtils.deviceId();
Telemetry.commonProperties.fullBuildInfo =
await basePropUtils.fullBuildInfo();
Telemetry.commonProperties.deviceArchitecture =
Expand Down Expand Up @@ -369,7 +369,7 @@ export class Telemetry {
// Populate Part A extensions
telemetryItem.ext = {};
telemetryItem.ext.device = {
localId: Telemetry.commonProperties.deviceId,
//id: Telemetry.commonProperties.deviceId,
deviceClass: Telemetry.commonProperties.deviceClass,
};
telemetryItem.ext.os = {
Expand All @@ -385,8 +385,6 @@ export class Telemetry {
numCPUs: Telemetry.commonProperties.numCPUs,
totalMemory: Telemetry.commonProperties.totalMemory,
diskFreeSpace: Telemetry.commonProperties.deviceDiskFreeSpace,
localId: Telemetry.commonProperties.deviceId,
deviceClass: Telemetry.commonProperties.deviceClass,
},
nodePlatform: Telemetry.commonProperties.nodePlatform,
nodeArchitecture: Telemetry.commonProperties.nodeArchitecture,
Expand Down
Loading