Skip to content

Commit 61d7520

Browse files
authored
Upgrade extension telemetry package (#5853)
1 parent 3599a00 commit 61d7520

File tree

5 files changed

+85
-335
lines changed

5 files changed

+85
-335
lines changed

extension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,7 @@
16091609
},
16101610
"dependencies": {
16111611
"@hediet/std": "0.6.0",
1612-
"@vscode/extension-telemetry": "0.8.5",
1612+
"@vscode/extension-telemetry": "0.9.8",
16131613
"appdirs": "1.1.0",
16141614
"execa": "5.1.1",
16151615
"fs-extra": "11.2.0",

extension/src/telemetry/constants.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import {
88
SectionCollapsed
99
} from '../plots/webview/contract'
1010

11-
export const APPLICATION_INSIGHTS_KEY = '46e8e554-d50a-471a-a53b-4af2b1cd6594'
11+
export const APPLICATION_INSIGHTS_CONNECTION_STRING =
12+
'InstrumentationKey=46e8e554-d50a-471a-a53b-4af2b1cd6594;IngestionEndpoint=https://westus2-2.in.applicationinsights.azure.com/;LiveEndpoint=https://westus2.livediagnostics.monitor.azure.com/;ApplicationId=f8ed111b-7a8f-4e59-94a5-9979333db978'
1213

1314
const ViewOpenedEvent = {
1415
VIEWS_EXPERIMENTS_FILTER_BY_TREE_OPENED:

extension/src/telemetry/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import TelemetryReporter from '@vscode/extension-telemetry'
22
import { getTelemetryReporter, sendTelemetryEvent } from '.'
33
import {
4-
APPLICATION_INSIGHTS_KEY,
4+
APPLICATION_INSIGHTS_CONNECTION_STRING,
55
IEventNamePropertyMapping
66
} from './constants'
77
import { getUserId } from './uuid'
@@ -40,7 +40,7 @@ describe('getTelemetryReporter', () => {
4040
expect(telemetryReporter).toBeDefined()
4141
expect(mockedTelemetryReporter).toHaveBeenCalledTimes(1)
4242
expect(mockedTelemetryReporter).toHaveBeenCalledWith(
43-
APPLICATION_INSIGHTS_KEY
43+
APPLICATION_INSIGHTS_CONNECTION_STRING
4444
)
4545
})
4646

extension/src/telemetry/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// eslint-disable-next-line import/default
22
import TelemetryReporter from '@vscode/extension-telemetry'
33
import {
4-
APPLICATION_INSIGHTS_KEY,
4+
APPLICATION_INSIGHTS_CONNECTION_STRING,
55
IEventNamePropertyMapping,
66
ViewOpenedEventName
77
} from './constants'
@@ -18,7 +18,9 @@ export const getTelemetryReporter = (): TelemetryReporter => {
1818
return telemetryReporter
1919
}
2020

21-
telemetryReporter = new TelemetryReporter(APPLICATION_INSIGHTS_KEY)
21+
telemetryReporter = new TelemetryReporter(
22+
APPLICATION_INSIGHTS_CONNECTION_STRING
23+
)
2224
return telemetryReporter
2325
}
2426

0 commit comments

Comments
 (0)