|
5 | 5 |
|
6 | 6 | import nls = require('vs/nls');
|
7 | 7 | import lifecycle = require('vs/base/common/lifecycle');
|
| 8 | +import Objects = require('vs/base/common/objects'); |
8 | 9 | import mime = require('vs/base/common/mime');
|
9 | 10 | import ee = require('vs/base/common/eventEmitter');
|
10 | 11 | import uri from 'vs/base/common/uri';
|
@@ -70,6 +71,7 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
|
70 | 71 | private lastTaskEvent: TaskEvent;
|
71 | 72 | private toDispose: lifecycle.IDisposable[];
|
72 | 73 | private inDebugMode: IKeybindingContextKey<boolean>;
|
| 74 | + private telemetryInfo: any; |
73 | 75 |
|
74 | 76 | constructor(
|
75 | 77 | @IStorageService private storageService: IStorageService,
|
@@ -110,6 +112,12 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
|
110 | 112 | this.viewModel = new viewmodel.ViewModel();
|
111 | 113 |
|
112 | 114 | this.registerListeners(eventService, lifecycleService);
|
| 115 | + |
| 116 | + this.telemetryInfo = Object.create(null); |
| 117 | + this.telemetryService.getTelemetryInfo().then(info => { |
| 118 | + this.telemetryInfo['common.vscodemachineid'] = info.machineId; |
| 119 | + this.telemetryInfo['common.vscodesessionid'] = info.sessionId; |
| 120 | + }); |
113 | 121 | }
|
114 | 122 |
|
115 | 123 | private registerListeners(eventService: IEventService, lifecycleService: ILifecycleService): void {
|
@@ -290,8 +298,8 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
|
290 | 298 | if (!this.telemetryAdapter) {
|
291 | 299 | this.telemetryAdapter = new AIAdapter(key, this.session.getType());
|
292 | 300 | }
|
293 |
| - |
294 |
| - this.telemetryAdapter.log(event.body.output, event.body.data); |
| 301 | + let data = Objects.mixin(event.body.data, this.telemetryInfo); |
| 302 | + this.telemetryAdapter.log(event.body.output, data); |
295 | 303 | }
|
296 | 304 | } else if (event.body && typeof event.body.output === 'string' && event.body.output.length > 0) {
|
297 | 305 | this.onOutput(event);
|
|
0 commit comments