Eric Amodio 1 год назад
Родитель
Сommit
c65b6fded3
2 измененных файлов: 22 добавлений и 3 удалений
  1. +18
    -0
      src/constants.ts
  2. +4
    -3
      src/telemetry/telemetry.ts

+ 18
- 0
src/constants.ts Просмотреть файл

@ -470,3 +470,21 @@ export const enum Schemes {
VslsScc = 'vsls-scc',
Virtual = 'vscode-vfs',
}
export type TelemetryEvents =
| 'account/validation/failed'
| 'activate'
| 'command'
| 'command/core'
| 'remoteProviders/connected'
| 'remoteProviders/disconnected'
| 'providers/changed'
| 'providers/context'
| 'providers/registrationComplete'
| 'repositories/changed'
| 'repositories/visibility'
| 'repository/opened'
| 'repository/visibility'
| 'subscription'
| 'subscription/changed'
| 'usage/track';

+ 4
- 3
src/telemetry/telemetry.ts Просмотреть файл

@ -3,6 +3,7 @@ import type { Disposable } from 'vscode';
import { version as codeVersion, env } from 'vscode';
import { getProxyAgent } from '@env/fetch';
import { getPlatform } from '@env/platform';
import type { TelemetryEvents } from '../constants';
import type { Container } from '../container';
import { configuration } from '../system/configuration';
@ -30,7 +31,7 @@ export interface TelemetryProvider extends Disposable {
interface QueuedEvent {
type: 'sendEvent';
name: string;
name: TelemetryEvents;
data?: Record<string, AttributeValue | null | undefined>;
global: Map<string, AttributeValue>;
startTime: TimeInput;
@ -129,7 +130,7 @@ export class TelemetryService implements Disposable {
}
sendEvent(
name: string,
name: TelemetryEvents,
data?: Record<string, AttributeValue | null | undefined>,
startTime?: TimeInput,
endTime?: TimeInput,
@ -152,7 +153,7 @@ export class TelemetryService implements Disposable {
}
startEvent(
name: string,
name: TelemetryEvents,
data?: Record<string, AttributeValue | null | undefined>,
startTime?: TimeInput,
): Disposable | undefined {

Загрузка…
Отмена
Сохранить