forked from microsoft/vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextHostTelemetry.ts
More file actions
47 lines (37 loc) · 1.47 KB
/
extHostTelemetry.ts
File metadata and controls
47 lines (37 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { notImplemented } from 'vs/base/common/errors';
import { TPromise } from 'vs/base/common/winjs.base';
import { ITelemetryService, ITelemetryInfo } from 'vs/platform/telemetry/common/telemetry';
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
import { MainContext, MainThreadTelemetryShape } from './extHost.protocol';
export class RemoteTelemetryService implements ITelemetryService {
_serviceBrand: any;
private _name: string;
private _proxy: MainThreadTelemetryShape;
constructor(name: string, threadService: IThreadService) {
this._name = name;
this._proxy = threadService.get(MainContext.MainThreadTelemetry);
}
get isOptedIn(): boolean {
throw notImplemented();
}
getTelemetryInfo(): TPromise<ITelemetryInfo> {
return this._proxy.$getTelemetryInfo();
}
publicLog(eventName: string, data?: any): TPromise<void> {
data = data || Object.create(null);
data[this._name] = true;
this._proxy.$publicLog(eventName, data);
return TPromise.as(null);
}
timedPublicLog(): any {
throw notImplemented();
}
addTelemetryAppender(): any {
throw notImplemented();
}
}