Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,13 @@ The current version of the snippet is version 8, the version is identified by th
// onInit: null, // Once the application insights instance has loaded and initialized this callback function will be called with 1 argument -- the sdk instance (DO NOT ADD anything to the sdk.queue -- As they won't get called)
// sri: false, // Custom optional value to specify whether fetching the snippet from integrity file and do integrity check
cfg: { // Application Insights Configuration
connectionString: "YOUR_CONNECTION_STRING"
connectionString: "YOUR_CONNECTION_STRING",
extensionConfig: {
ApplicationInsightsAnalytics: {
autoExceptionInstrumented: true // Workaround for older SDK versions to prevent duplicate hooking of window.onerror.
// Fixed in v3.3.5; recommended for versions prior to this.
}
},
}
});
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ export class AnalyticsPlugin extends BaseTelemetryPlugin implements IAppInsights
_self._addHook(onConfigChange(_extConfig, () => {
_disableExceptionTracking = _extConfig.disableExceptionTracking;

if (!_disableExceptionTracking && !_autoExceptionInstrumented && !_extConfig.autoExceptionInstrumented) {
if (!_disableExceptionTracking && !_autoExceptionInstrumented && !_extConfig.autoExceptionInstrumented && !_self.core.config["autoExceptionInstrumented"]) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking, maybe we can add a test to the change?

// We want to enable exception auto collection and it has not been done so yet
_addHook(InstrumentEvent(_window, "onerror", {
ns: _evtNamespace,
Expand Down
Loading