@vscode/extension-telemetry
Advanced tools
Comparing version 0.7.0-preview to 0.7.1-preview
@@ -12,17 +12,15 @@ /*--------------------------------------------------------- | ||
try { | ||
const web = await import /* webpackMode: "eager" */("@microsoft/applicationinsights-web"); | ||
const web = await import /* webpackMode: "eager" */("@microsoft/applicationinsights-web-basic"); | ||
appInsightsClient = new web.ApplicationInsights({ | ||
config: { | ||
instrumentationKey: key, | ||
disableAjaxTracking: true, | ||
disableExceptionTracking: true, | ||
disableFetchTracking: true, | ||
disableCorrelationHeaders: true, | ||
disableCookiesUsage: true, | ||
autoTrackPageVisitTime: false, | ||
emitLineDelimitedJson: true, | ||
disableInstrumentationKeyValidation: true | ||
}, | ||
instrumentationKey: key, | ||
disableAjaxTracking: true, | ||
disableExceptionTracking: true, | ||
disableFetchTracking: true, | ||
disableCorrelationHeaders: true, | ||
disableCookiesUsage: true, | ||
autoTrackPageVisitTime: false, | ||
emitLineDelimitedJson: false, | ||
disableInstrumentationKeyValidation: true | ||
}); | ||
appInsightsClient.loadAppInsights(); | ||
appInsightsClient.initialize(); | ||
} | ||
@@ -39,14 +37,4 @@ catch (e) { | ||
} | ||
appInsightsClient?.trackEvent({ name: eventName }, properties); | ||
appInsightsClient?.track({ name: eventName, data: properties }); | ||
}, | ||
logException: (exception, data) => { | ||
const properties = { ...data?.properties, ...data?.measurements }; | ||
if (replacementOptions?.length) { | ||
TelemetryUtil.applyReplacements(properties, replacementOptions); | ||
} | ||
appInsightsClient?.trackException({ | ||
exception, | ||
properties | ||
}); | ||
}, | ||
flush: async () => { | ||
@@ -53,0 +41,0 @@ appInsightsClient?.flush(); |
@@ -73,5 +73,2 @@ /*--------------------------------------------------------------------------------------------- | ||
}, | ||
logException: (_exception, _data) => { | ||
throw new Error("1DS SDK does not support logging exceptions, please use logEvent for exception tracking"); | ||
}, | ||
flush: async () => { | ||
@@ -78,0 +75,0 @@ try { |
@@ -43,3 +43,3 @@ /*--------------------------------------------------------- | ||
// Do not change this string as it gets found and replaced upon packaging | ||
"common.telemetryclientversion": "0.7.0-preview" | ||
"common.telemetryclientversion": "0.7.1-preview" | ||
}; | ||
@@ -75,3 +75,3 @@ } | ||
} | ||
this._telemetryClient.logException(exception, data); | ||
// No-op TODO @lramos15 remove once removed from API surface | ||
} | ||
@@ -78,0 +78,0 @@ /** |
@@ -99,5 +99,2 @@ "use strict"; | ||
}, | ||
logException: (_exception, _data) => { | ||
throw new Error("1DS SDK does not support logging exceptions, please use logEvent for exception tracking"); | ||
}, | ||
flush: async () => { | ||
@@ -104,0 +101,0 @@ try { |
@@ -46,3 +46,3 @@ "use strict"; | ||
// Do not change this string as it gets found and replaced upon packaging | ||
"common.telemetryclientversion": "0.7.0-preview" | ||
"common.telemetryclientversion": "0.7.1-preview" | ||
}; | ||
@@ -78,3 +78,3 @@ } | ||
} | ||
this._telemetryClient.logException(exception, data); | ||
// No-op TODO @lramos15 remove once removed from API surface | ||
} | ||
@@ -81,0 +81,0 @@ /** |
@@ -96,14 +96,2 @@ "use strict"; | ||
}, | ||
logException: (exception, data) => { | ||
try { | ||
appInsightsClient?.trackException({ | ||
exception, | ||
properties: data?.properties, | ||
measurements: data?.measurements | ||
}); | ||
} | ||
catch (e) { | ||
throw new Error("Failed to log exception to app insights!\n" + e.message); | ||
} | ||
}, | ||
flush: async () => { | ||
@@ -110,0 +98,0 @@ try { |
{ | ||
"name": "@vscode/extension-telemetry", | ||
"description": "A module for Visual Studio Code extensions to report consistent telemetry.", | ||
"version": "0.7.0-preview", | ||
"version": "0.7.1-preview", | ||
"author": { | ||
@@ -11,2 +11,3 @@ "name": "Microsoft Corporation" | ||
"types": "./dist/telemetryReporter.d.ts", | ||
"sideEffects": false, | ||
"license": "MIT", | ||
@@ -23,6 +24,6 @@ "engines": { | ||
"dependencies": { | ||
"@microsoft/1ds-core-js": "^3.2.7", | ||
"@microsoft/1ds-post-js": "^3.2.7", | ||
"@microsoft/applicationinsights-web": "^2.8.8", | ||
"applicationinsights": "2.3.5" | ||
"@microsoft/1ds-core-js": "^3.2.8", | ||
"@microsoft/1ds-post-js": "^3.2.8", | ||
"@microsoft/applicationinsights-web-basic": "^2.8.9", | ||
"applicationinsights": "2.3.6" | ||
}, | ||
@@ -29,0 +30,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1
149637
1265
+ Added@microsoft/applicationinsights-web-basic@2.8.18(transitive)
+ Addedapplicationinsights@2.3.6(transitive)
- Removed@microsoft/applicationinsights-analytics-js@2.8.18(transitive)
- Removed@microsoft/applicationinsights-dependencies-js@2.8.18(transitive)
- Removed@microsoft/applicationinsights-properties-js@2.8.18(transitive)
- Removed@microsoft/applicationinsights-web@2.8.18(transitive)
- Removedapplicationinsights@2.3.5(transitive)
Updatedapplicationinsights@2.3.6