Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/ads-extension-telemetry

Package Overview
Dependencies
Maintainers
5
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/ads-extension-telemetry - npm Package Compare versions

Comparing version 1.3.3 to 1.3.4

5

lib/telemetryReporter.d.ts

@@ -138,3 +138,6 @@ import { TimedAction } from './timedAction';

sendTelemetryEvent(eventName: string, properties?: TelemetryEventProperties, measurements?: TelemetryEventMeasures): void;
dispose(): Promise<any>;
/**
* Disposes of the telemetry reporter. This flushes the remaining events and disposes of the telemetry client.
*/
dispose(): Promise<void>;
}

30

lib/telemetryReporter.js

@@ -5,2 +5,11 @@ "use strict";

*--------------------------------------------------------*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -67,4 +76,5 @@ const extension_telemetry_1 = require("@vscode/extension-telemetry");

send() {
var _a;
try {
this.reporter.sendTelemetryEvent(this.eventName, this.properties, this.measurements);
(_a = this.reporter) === null || _a === void 0 ? void 0 : _a.sendTelemetryEvent(this.eventName, this.properties, this.measurements);
}

@@ -103,3 +113,11 @@ catch (e) {

constructor(extensionId, extensionVersion, key) {
this._telemetryReporter = new extension_telemetry_1.default(extensionId, extensionVersion, key);
var _a, _b;
this._telemetryReporter = undefined;
// Try to initialize the reporter, but don't throw if it fails so we don't break the extension
try {
this._telemetryReporter = new extension_telemetry_1.default(extensionId, extensionVersion, key);
}
catch (e) {
console.error(`Error initializing TelemetryReporter for '${extensionId}'. ${(_b = (_a = e) === null || _a === void 0 ? void 0 : _a.message) !== null && _b !== void 0 ? _b : e}`);
}
}

@@ -223,4 +241,10 @@ /**

}
/**
* Disposes of the telemetry reporter. This flushes the remaining events and disposes of the telemetry client.
*/
dispose() {
return this._telemetryReporter.dispose();
var _a;
return __awaiter(this, void 0, void 0, function* () {
yield ((_a = this._telemetryReporter) === null || _a === void 0 ? void 0 : _a.dispose());
});
}

@@ -227,0 +251,0 @@ }

{
"name": "@microsoft/ads-extension-telemetry",
"description": "A module for first party Microsoft extensions to report consistent telemetry.",
"version": "1.3.3",
"version": "1.3.4",
"author": {

@@ -6,0 +6,0 @@ "name": "Microsoft Corporation"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc