Skip to content

Commit ed7b14c

Browse files
committed
fix: check in telemetry events test instead
1 parent 9ef51f0 commit ed7b14c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

packages/compass-e2e-tests/tests/logging.test.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ describe('Logging and Telemetry integration', function () {
5959
);
6060
});
6161

62+
it('tracks device_id in telemetry events', function () {
63+
const events = telemetry.events();
64+
const event = events.find((e) => e.properties?.device_id);
65+
66+
expect(event).to.exist;
67+
expect(event.properties.device_id).to.not.equal('unknown');
68+
expect(event.properties.device_id).to.match(/^[a-f0-9]{64}$/);
69+
});
70+
6271
it('tracks an event for identify call', function () {
6372
const identify = telemetry
6473
.events()
@@ -179,7 +188,6 @@ describe('Logging and Telemetry integration', function () {
179188
expect(actual.hasAnalytics).to.equal(true);
180189
expect(actual.currentUserId).to.not.exist;
181190
expect(actual.telemetryAnonymousId).to.be.a('string');
182-
expect(actual.telemetryDeviceId).to.match(/^[a-f0-9]{64}$/);
183191
expect(actual.state).to.equal('enabled');
184192
},
185193
},

packages/compass/src/main/telemetry.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ class CompassTelemetry {
102102
telemetryCapableEnvironment,
103103
hasAnalytics: !!this.analytics,
104104
telemetryAnonymousId: this.telemetryAnonymousId,
105-
telemetryDeviceId: this.telemetryDeviceId,
106105
state: this.state,
107106
queuedEvents: this.queuedEvents.length,
108107
}

0 commit comments

Comments
 (0)