Skip to content

Commit 9da528b

Browse files
committed
Remove telemetry reporting calls
1 parent a715928 commit 9da528b

File tree

3 files changed

+4
-27
lines changed

3 files changed

+4
-27
lines changed

package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,6 @@
389389
"type": "object",
390390
"title": "Miscellaneous",
391391
"properties": {
392-
"cortex-debug.enableTelemetry": {
393-
"type": "boolean",
394-
"default": true,
395-
"description": "Enable Telemetry for the Cortex-Debug Extension. Reporting will also respect the global telemetry.enableTelemetry setting."
396-
},
397392
"cortex-debug.dbgServerLogfile": {
398393
"type": [
399394
"string",

src/frontend/extension.ts

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import { LiveWatchTreeProvider, LiveVariableNode } from './views/live-watch';
88
import { RTTCore, SWOCore } from './swo/core';
99
import {
1010
ConfigurationArguments, RTTCommonDecoderOpts, RTTConsoleDecoderOpts,
11-
CortexDebugKeys, ChainedEvents, ADAPTER_DEBUG_MODE, ChainedConfig } from '../common';
11+
CortexDebugKeys, ChainedEvents, ADAPTER_DEBUG_MODE, ChainedConfig
12+
} from '../common';
1213
import { MemoryContentProvider } from './memory_content_provider';
13-
import Reporting from '../reporting';
1414

1515
import { CortexDebugConfigurationProvider } from './configprovider';
1616
import { JLinkSocketRTTSource, SocketRTTSource, SocketSWOSource, PeMicroSocketSource } from './swo/sources/socket';
@@ -55,8 +55,6 @@ export class CortexDebugExtension {
5555
this.startServerConsole(context, config.get(CortexDebugKeys.SERVER_LOG_FILE_NAME, '')); // Make this the first thing we do to be ready for the session
5656
this.memoryProvider = new MemoryContentProvider();
5757

58-
Reporting.activate(context);
59-
6058
this.liveWatchProvider = new LiveWatchTreeProvider(this.context);
6159
this.liveWatchTreeView = vscode.window.createTreeView('cortex-debug.liveWatch', {
6260
treeDataProvider: this.liveWatchProvider
@@ -285,7 +283,6 @@ export class CortexDebugExtension {
285283
address = address.trim();
286284
if (!validateAddress(address)) {
287285
vscode.window.showErrorMessage('Invalid memory address entered');
288-
Reporting.sendEvent('Examine Memory', 'Invalid Address', address);
289286
return;
290287
}
291288

@@ -298,11 +295,9 @@ export class CortexDebugExtension {
298295
length = length.trim();
299296
if (!validateValue(length)) {
300297
vscode.window.showErrorMessage('Invalid length entered');
301-
Reporting.sendEvent('Examine Memory', 'Invalid Length', length);
302298
return;
303299
}
304300

305-
Reporting.sendEvent('Examine Memory', 'Valid', `${address}-${length}`);
306301
const timestamp = new Date().getTime();
307302
const addrEnc = encodeURIComponent(`${address}`);
308303
const uri = vscode.Uri.parse(
@@ -314,10 +309,8 @@ export class CortexDebugExtension {
314309
.then((doc) => {
315310
this.memoryProvider.Register(doc);
316311
vscode.window.showTextDocument(doc, { viewColumn: 2, preview: false });
317-
Reporting.sendEvent('Examine Memory', 'Used');
318312
}, (error) => {
319313
vscode.window.showErrorMessage(`Failed to examine memory: ${error}`);
320-
Reporting.sendEvent('Examine Memory', 'Error', error.toString());
321314
});
322315
},
323316
(error) => {
@@ -408,8 +401,6 @@ export class CortexDebugExtension {
408401
svdfile = this.getSVDFile(args.device);
409402
}
410403

411-
Reporting.beginSession(session.id, args as ConfigurationArguments);
412-
413404
if (newSession.swoSource) {
414405
this.initializeSWO(session, args);
415406
}
@@ -427,8 +418,6 @@ export class CortexDebugExtension {
427418
if (session.type !== 'cortex-debug') { return; }
428419
const mySession = CDebugSession.FindSession(session);
429420
try {
430-
Reporting.endSession(session.id);
431-
432421
this.liveWatchProvider?.debugSessionTerminated(session);
433422
if (mySession?.swo) {
434423
mySession.swo.debugSessionTerminated();
@@ -717,7 +706,6 @@ export class CortexDebugExtension {
717706
}
718707

719708
private receivedEvent(e) {
720-
Reporting.sendEvent(e.body.category, e.body.action, e.body.label, e.body.parameters);
721709
}
722710

723711
private receivedSWOConfigureEvent(e: vscode.DebugSessionCustomEvent) {
@@ -737,20 +725,15 @@ export class CortexDebugExtension {
737725
}, (e) => {
738726
vscode.window.showErrorMessage(`Could not open SWO TCP port ${e.body.port} ${e} after ${src.nTries} tries`);
739727
});
740-
Reporting.sendEvent('SWO', 'Source', 'Socket');
741728
return;
742729
} else if (e.body.type === 'fifo') {
743730
mySession.swoSource = new FifoSWOSource(e.body.path);
744-
Reporting.sendEvent('SWO', 'Source', 'FIFO');
745731
} else if (e.body.type === 'file') {
746732
mySession.swoSource = new FileSWOSource(e.body.path);
747-
Reporting.sendEvent('SWO', 'Source', 'File');
748733
} else if (e.body.type === 'serial') {
749734
mySession.swoSource = new SerialSWOSource(e.body.device, e.body.baudRate);
750-
Reporting.sendEvent('SWO', 'Source', 'Serial');
751735
} else if (e.body.type === 'usb') {
752736
mySession.swoSource = new UsbSWOSource(e.body.device, e.body.port);
753-
Reporting.sendEvent('SWO', 'Source', 'USB');
754737
}
755738

756739
this.initializeSWO(e.session, e.body.args);
@@ -760,10 +743,8 @@ export class CortexDebugExtension {
760743
if (e.body.type === 'socket') {
761744
const decoder: RTTCommonDecoderOpts = e.body.decoder;
762745
if ((decoder.type === 'console') || (decoder.type === 'binary')) {
763-
Reporting.sendEvent('RTT', 'Source', 'Socket: Console');
764746
this.rttCreateTerninal(e, decoder as RTTConsoleDecoderOpts);
765747
} else {
766-
Reporting.sendEvent('RTT', 'Source', `Socket: ${decoder.type}`);
767748
if (!decoder.ports) {
768749
this.createRTTSource(e, decoder.tcpPort, decoder.port);
769750
} else {
@@ -923,4 +904,4 @@ export function activate(context: vscode.ExtensionContext) {
923904
return new CortexDebugExtension(context);
924905
}
925906

926-
export function deactivate() {}
907+
export function deactivate() { }

src/reporting.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ function getUUID(): string {
4848
}
4949

5050
function telemetryEnabled(): boolean {
51+
return false; // Disable telemetry for now, until we have a better understanding of what to send and how to use it.
5152
const telemetry = vscode.workspace.getConfiguration('telemetry');
5253
const cortexDebug = vscode.workspace.getConfiguration('cortex-debug');
5354

0 commit comments

Comments
 (0)