forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Share telemetry from core extension. (#20893)
it turns out the new telemetry API removed a way to set extension id and version when telemetry reporter is created and it implicitly sets from extension reporter is created. the same way how LSP client is working. since we want to keep using the same extension id and etc for our telemetry, we need the reporter created from core ext.
- Loading branch information
1 parent
807b9fe
commit 01e798a
Showing
5 changed files
with
39 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
import { TelemetryEventMeasurements, TelemetryEventProperties } from '@vscode/extension-telemetry'; | ||
import { BaseLanguageClient } from 'vscode-languageclient'; | ||
|
||
export interface TelemetryReporter { | ||
sendTelemetryEvent( | ||
eventName: string, | ||
properties?: TelemetryEventProperties, | ||
measurements?: TelemetryEventMeasurements, | ||
): void; | ||
sendTelemetryErrorEvent( | ||
eventName: string, | ||
properties?: TelemetryEventProperties, | ||
measurements?: TelemetryEventMeasurements, | ||
): void; | ||
} | ||
|
||
export interface ApiForPylance { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
createClient(...args: any[]): BaseLanguageClient; | ||
start(client: BaseLanguageClient): Promise<void>; | ||
stop(client: BaseLanguageClient): Promise<void>; | ||
getTelemetryReporter(): TelemetryReporter; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters