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.4 to 1.4.0

20

lib/telemetryReporter.d.ts

@@ -112,2 +112,3 @@ import { TimedAction } from './timedAction';

* @param errorType The specific type of error
* @deprecated Use createErrorEvent2
*/

@@ -121,5 +122,24 @@ createErrorEvent(view: V, name: string, errorCode?: string, errorType?: string): TelemetryEvent;

* @param errorType The specific type of error
* @deprecated Use sendErrorEvent2
*/
sendErrorEvent(view: V, name: string, errorCode?: string, errorType?: string): void;
/**
* Creates a new Error event that can be sent later. This is used to log errors that occur.
* @param view The name of the page or item where the error occurred
* @param name The friendly name of the error
* @param error The error. If an Error object the message and stack will be extracted and added to the event, otherwise the message will be set to error.toString()
* @param errorCode The error code returned, default is empty
* @param errorType The specific type of error, default is empty
*/
createErrorEvent2(view: V, name: string, error?: any, errorCode?: string, errorType?: string): TelemetryEvent;
/**
* Sends a Error event. This is used to log errors that occur.
* @param view The name of the page or item where the error occurred
* @param name The friendly name of the error
* @param error The error object. If an Error object the message and stack will be extracted and added to the event, otherwise the message will be set to error.toString()
* @param errorCode The error code returned
* @param errorType The specific type of error
*/
sendErrorEvent2(view: V, name: string, error?: any, errorCode?: string, errorType?: string): void;
/**
* Creates a custom telemetry event with the specified name that can be sent later. Generally the other send functions should be

@@ -126,0 +146,0 @@ * preferred over this - only use this if you absolutely need a custom event that can't be covered by the other methods.

@@ -199,2 +199,3 @@ "use strict";

* @param errorType The specific type of error
* @deprecated Use createErrorEvent2
*/

@@ -215,2 +216,3 @@ createErrorEvent(view, name, errorCode = '', errorType = '') {

* @param errorType The specific type of error
* @deprecated Use sendErrorEvent2
*/

@@ -221,2 +223,38 @@ sendErrorEvent(view, name, errorCode = '', errorType = '') {

/**
* Creates a new Error event that can be sent later. This is used to log errors that occur.
* @param view The name of the page or item where the error occurred
* @param name The friendly name of the error
* @param error The error. If an Error object the message and stack will be extracted and added to the event, otherwise the message will be set to error.toString()
* @param errorCode The error code returned, default is empty
* @param errorType The specific type of error, default is empty
*/
createErrorEvent2(view, name, error = undefined, errorCode = '', errorType = '') {
const props = {
view: view,
name: name,
errorCode: errorCode,
errorType: errorType
};
if (error instanceof Error) {
props.message = error.message;
props.stack = error.stack || '';
}
else {
props.message = error === null || error === void 0 ? void 0 : error.toString();
props.stack = '';
}
return new TelemetryEventImpl(this._telemetryReporter, 'error', props);
}
/**
* Sends a Error event. This is used to log errors that occur.
* @param view The name of the page or item where the error occurred
* @param name The friendly name of the error
* @param error The error object. If an Error object the message and stack will be extracted and added to the event, otherwise the message will be set to error.toString()
* @param errorCode The error code returned
* @param errorType The specific type of error
*/
sendErrorEvent2(view, name, error = undefined, errorCode = '', errorType = '') {
this.createErrorEvent2(view, name, error, errorCode, errorType).send();
}
/**
* Creates a custom telemetry event with the specified name that can be sent later. Generally the other send functions should be

@@ -223,0 +261,0 @@ * preferred over this - only use this if you absolutely need a custom event that can't be covered by the other methods.

2

package.json
{
"name": "@microsoft/ads-extension-telemetry",
"description": "A module for first party Microsoft extensions to report consistent telemetry.",
"version": "1.3.4",
"version": "1.4.0",
"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