diff options
author | Logan Ramos <lramos15@gmail.com> | 2022-11-04 20:47:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-04 20:47:35 +0300 |
commit | eafc1e0fe1a9576b751a4af8f37885b62cd67a7a (patch) | |
tree | b94a537a0f14e34e5514d9e7545b68774c27c81e /extensions | |
parent | 2d8202551e44b54232a6a373b576d4447a2a4d11 (diff) |
Remove overzealous telemetry (#165524)
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/git/src/git.ts | 18 | ||||
-rw-r--r-- | extensions/git/src/main.ts | 2 |
2 files changed, 2 insertions, 18 deletions
diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 7c49b545f8c..368180965ac 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -18,7 +18,6 @@ import { detectEncoding } from './encoding'; import { Ref, RefType, Branch, Remote, ForcePushMode, GitErrorCodes, LogOptions, Change, Status, CommitOptions, BranchQuery } from './api/git'; import * as byline from 'byline'; import { StringDecoder } from 'string_decoder'; -import TelemetryReporter from '@vscode/extension-telemetry'; // https://github.com/microsoft/vscode/issues/65693 const MAX_CLI_LENGTH = 30000; @@ -375,14 +374,11 @@ export class Git { private _onOutput = new EventEmitter(); get onOutput(): EventEmitter { return this._onOutput; } - private readonly telemetryReporter: TelemetryReporter; - - constructor(options: IGitOptions, telemetryReporter: TelemetryReporter) { + constructor(options: IGitOptions) { this.path = options.gitPath; this.version = options.version; this.userAgent = options.userAgent; this.env = options.env || {}; - this.telemetryReporter = telemetryReporter; const onConfigurationChanged = (e?: ConfigurationChangeEvent) => { if (e !== undefined && !e.affectsConfiguration('git.commandsToLog')) { @@ -563,9 +559,7 @@ export class Git { } private async _exec(args: string[], options: SpawnOptions = {}): Promise<IExecutionResult<string>> { - const startSpawn = Date.now(); const child = this.spawn(args, options); - const durSpawn = Date.now() - startSpawn; options.onSpawn?.(child); @@ -592,16 +586,6 @@ export class Git { } } - /* __GDPR__ - "git.execDuration" : { - "owner": "lszomoru", - "comment": "Time it takes to spawn and execute a git command", - "durSpawn": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth","isMeasurement": true, "comment": "Time it took to run spawn git" }, - "durExec": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth","isMeasurement": true, "comment": "Time git took" } - } - */ - this.telemetryReporter.sendTelemetryEvent('git.execDuration', undefined, { durSpawn, durExec }); - let encoding = options.encoding || 'utf8'; encoding = iconv.encodingExists(encoding) ? encoding : 'utf8'; diff --git a/extensions/git/src/main.ts b/extensions/git/src/main.ts index 54faa7aa0f8..d71e30f433a 100644 --- a/extensions/git/src/main.ts +++ b/extensions/git/src/main.ts @@ -85,7 +85,7 @@ async function createModel(context: ExtensionContext, logger: LogOutputChannel, userAgent: `git/${info.version} (${(os as any).version?.() ?? os.type()} ${os.release()}; ${os.platform()} ${os.arch()}) vscode/${vscodeVersion} (${env.appName})`, version: info.version, env: environment, - }, telemetryReporter); + }); const model = new Model(git, askpass, context.globalState, logger, telemetryReporter); disposables.push(model); |