error TS2322: Type 'AngularPlugin' is not assignable to type 'ITelemetryPlugin'.
Types of property 'setNextPlugin' are incompatible.
import { AngularPlugin } from '@microsoft/applicationinsights-angularplugin-js';
const angularPlugin = new AngularPlugin();
this.appInsights = new ApplicationInsights({
config: {
instrumentationKey: 'key',
enableAutoRouteTracking: false, // option to log all route changes
enableCorsCorrelation: true,
extensions: [angularPlugin],
extensionConfig: {
[angularPlugin.identifier]: { router: this.router },
},
},
});
this.appInsights.loadAppInsights();
extensions: [angularPlugin],
~~~~~~~~~~~~~
"@microsoft/applicationinsights-angularplugin-js": "3.0.1",
"@microsoft/applicationinsights-web": "2.8.9",
"@angular/common": "15.1.0",
"typescript": "4.9.4",