How to use the vscode-extension-telemetry.default function in vscode-extension-telemetry

To help you get started, we’ve selected a few vscode-extension-telemetry examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DonJayamanne / vscodeJupyter / src / telemetry / main.ts View on Github external
export function sendTelemetryEvent(eventName: string, properties?: {
    [key: string]: string;
}, measures?: {
    [key: string]: number;
}) {
    // Check out later (no idea why default import isn't being picked up)
    try {
        reporter = reporter ? reporter : new TelemetryReporter(extensionId, extensionVersion, aiKey);
    }
    catch (ex) {
        reporter = reporter ? reporter : new TelemetryReporter.default(extensionId, extensionVersion, aiKey);
    }

    try {
        reporter.sendTelemetryEvent.apply(reporter, arguments);
    }
    catch (ex) {

    }
}
github ryu1kn / vscode-text-marker / src / lib / telemetry / vscode-telemetry-reporter.ts View on Github external
        return (id: string, version: string, telemetryKey: string) => new VsTelemetryReporter(id, version, telemetryKey);
    } else {
github konstellation-io / science-toolkit / vscode / extensions / ms-vscode.go-0.13.0 / out / src / telemetry.js View on Github external
function sendTelemetryEvent(eventName, properties, measures) {
    telemtryReporter = telemtryReporter
        ? telemtryReporter
        : new vscode_extension_telemetry_1.default(exports.extensionId, extensionVersion, aiKey);
    telemtryReporter.sendTelemetryEvent(eventName, properties, measures);
}
//# sourceMappingURL=telemetry.js.map
github microsoft / vscode / extensions / markdown-language-features / src / telemetryReporter.ts View on Github external
constructor(
		packageInfo: IPackageInfo
	) {
		this._reporter = new VSCodeTelemetryReporter(packageInfo.name, packageInfo.version, packageInfo.aiKey);
	}
	sendTelemetryEvent(eventName: string, properties?: {
github facebookarchive / atom-ide-ui / modules / atom-ide-debugger-python / VendorLib / vs-py-debugger / out / client / common / telemetry.js View on Github external
function sendTelemetryEvent(eventName, properties, measures) {
    reporter = reporter ? reporter : new vscode_extension_telemetry_1.default(extensionId, extensionVersion, aiKey);
    reporter.sendTelemetryEvent.apply(reporter, arguments);
}
exports.sendTelemetryEvent = sendTelemetryEvent;
github microsoft / vscode-react-native / src / extension / rn-extension.ts View on Github external
export function activate(context: vscode.ExtensionContext): Q.Promise {
    outputChannelLogger.debug("Begin to activate...");
    const appVersion = require(path.resolve(__dirname, "../../package.json")).version;
    outputChannelLogger.debug(`Extension version: ${appVersion}`);
    const ExtensionTelemetryReporter = require("vscode-extension-telemetry").default;
    const reporter = new ExtensionTelemetryReporter(APP_NAME, appVersion, Telemetry.APPINSIGHTS_INSTRUMENTATIONKEY);
    const configProvider = new ReactNativeDebugConfigProvider();
    const workspaceFolders: vscode.WorkspaceFolder[] | undefined = vscode.workspace.workspaceFolders;
    let extProps: ICommandTelemetryProperties = {};
    if (workspaceFolders) {
        extProps = {
            ["workspaceFoldersCount"]: {value: workspaceFolders.length, isPii: false},
        };
    }

    return entryPointHandler.runApp(APP_NAME, appVersion, ErrorHelper.getInternalError(InternalErrorCode.ExtensionActivationFailed), reporter, function activateRunApp() {
        context.subscriptions.push(vscode.workspace.onDidChangeWorkspaceFolders((event) => onChangeWorkspaceFolders(context, event)));
        context.subscriptions.push(vscode.workspace.onDidChangeConfiguration((event) => onChangeConfiguration(context)));

        debugConfigProvider = vscode.debug.registerDebugConfigurationProvider("reactnative", configProvider);
        let activateExtensionEvent = TelemetryHelper.createTelemetryEvent("activate");
        Telemetry.send(activateExtensionEvent);

vscode-extension-telemetry

A module for first party microsoft extensions to report consistent telemetry.

MIT
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis

Popular vscode-extension-telemetry functions

Similar packages