Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Upgrade extension telemetry package #5853

Merged
merged 1 commit into from
Dec 7, 2024
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 extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,7 @@
},
"dependencies": {
"@hediet/std": "0.6.0",
"@vscode/extension-telemetry": "0.8.5",
"@vscode/extension-telemetry": "0.9.8",
"appdirs": "1.1.0",
"execa": "5.1.1",
"fs-extra": "11.2.0",
Expand Down
3 changes: 2 additions & 1 deletion extension/src/telemetry/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import {
SectionCollapsed
} from '../plots/webview/contract'

export const APPLICATION_INSIGHTS_KEY = '46e8e554-d50a-471a-a53b-4af2b1cd6594'
export const APPLICATION_INSIGHTS_CONNECTION_STRING =
'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'

const ViewOpenedEvent = {
VIEWS_EXPERIMENTS_FILTER_BY_TREE_OPENED:
Expand Down
4 changes: 2 additions & 2 deletions extension/src/telemetry/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import TelemetryReporter from '@vscode/extension-telemetry'
import { getTelemetryReporter, sendTelemetryEvent } from '.'
import {
APPLICATION_INSIGHTS_KEY,
APPLICATION_INSIGHTS_CONNECTION_STRING,
IEventNamePropertyMapping
} from './constants'
import { getUserId } from './uuid'
Expand Down Expand Up @@ -40,7 +40,7 @@ describe('getTelemetryReporter', () => {
expect(telemetryReporter).toBeDefined()
expect(mockedTelemetryReporter).toHaveBeenCalledTimes(1)
expect(mockedTelemetryReporter).toHaveBeenCalledWith(
APPLICATION_INSIGHTS_KEY
APPLICATION_INSIGHTS_CONNECTION_STRING
)
})

Expand Down
6 changes: 4 additions & 2 deletions extension/src/telemetry/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// eslint-disable-next-line import/default
import TelemetryReporter from '@vscode/extension-telemetry'
import {
APPLICATION_INSIGHTS_KEY,
APPLICATION_INSIGHTS_CONNECTION_STRING,
IEventNamePropertyMapping,
ViewOpenedEventName
} from './constants'
Expand All @@ -18,7 +18,9 @@ export const getTelemetryReporter = (): TelemetryReporter => {
return telemetryReporter
}

telemetryReporter = new TelemetryReporter(APPLICATION_INSIGHTS_KEY)
telemetryReporter = new TelemetryReporter(
APPLICATION_INSIGHTS_CONNECTION_STRING
)
return telemetryReporter
}

Expand Down
Loading
Loading