@@ -10,6 +10,7 @@ import { AppType } from 'src/modules/server/models/server';
10
10
import { SettingsService } from 'src/modules/settings/settings.service' ;
11
11
import {
12
12
AnalyticsService ,
13
+ Telemetry ,
13
14
NON_TRACKING_ANONYMOUS_ID ,
14
15
} from './analytics.service' ;
15
16
@@ -95,6 +96,11 @@ describe('AnalyticsService', () => {
95
96
anonymousId : mockAnonymousId ,
96
97
integrations : { Amplitude : { session_id : sessionId } } ,
97
98
event : TelemetryEvents . ApplicationStarted ,
99
+ context : {
100
+ traits : {
101
+ telemetry : Telemetry . Enabled ,
102
+ } ,
103
+ } ,
98
104
properties : {
99
105
anonymousId : mockAnonymousId ,
100
106
buildType : AppType . Electron ,
@@ -128,6 +134,11 @@ describe('AnalyticsService', () => {
128
134
anonymousId : NON_TRACKING_ANONYMOUS_ID ,
129
135
integrations : { Amplitude : { session_id : sessionId } } ,
130
136
event : TelemetryEvents . ApplicationStarted ,
137
+ context : {
138
+ traits : {
139
+ telemetry : Telemetry . Disabled ,
140
+ } ,
141
+ } ,
131
142
properties : {
132
143
anonymousId : mockAnonymousId ,
133
144
buildType : AppType . Electron ,
@@ -150,6 +161,11 @@ describe('AnalyticsService', () => {
150
161
anonymousId : mockAnonymousId ,
151
162
integrations : { Amplitude : { session_id : sessionId } } ,
152
163
event : TelemetryEvents . ApplicationStarted ,
164
+ context : {
165
+ traits : {
166
+ telemetry : Telemetry . Disabled ,
167
+ } ,
168
+ } ,
153
169
properties : {
154
170
anonymousId : mockAnonymousId ,
155
171
buildType : AppType . Electron ,
@@ -186,6 +202,11 @@ describe('AnalyticsService', () => {
186
202
anonymousId : mockAnonymousId ,
187
203
integrations : { Amplitude : { session_id : sessionId } } ,
188
204
name : TelemetryEvents . ApplicationStarted ,
205
+ context : {
206
+ traits : {
207
+ telemetry : Telemetry . Enabled ,
208
+ } ,
209
+ } ,
189
210
properties : {
190
211
anonymousId : mockAnonymousId ,
191
212
buildType : AppType . Electron ,
@@ -219,6 +240,11 @@ describe('AnalyticsService', () => {
219
240
anonymousId : NON_TRACKING_ANONYMOUS_ID ,
220
241
integrations : { Amplitude : { session_id : sessionId } } ,
221
242
name : TelemetryEvents . ApplicationStarted ,
243
+ context : {
244
+ traits : {
245
+ telemetry : Telemetry . Disabled ,
246
+ } ,
247
+ } ,
222
248
properties : {
223
249
anonymousId : mockAnonymousId ,
224
250
buildType : AppType . Electron ,
@@ -241,6 +267,11 @@ describe('AnalyticsService', () => {
241
267
anonymousId : mockAnonymousId ,
242
268
integrations : { Amplitude : { session_id : sessionId } } ,
243
269
name : TelemetryEvents . ApplicationStarted ,
270
+ context : {
271
+ traits : {
272
+ telemetry : Telemetry . Enabled ,
273
+ } ,
274
+ } ,
244
275
properties : {
245
276
anonymousId : mockAnonymousId ,
246
277
buildType : AppType . Electron ,
0 commit comments