Open
Description
openedon Dec 12, 2022
A type error similar to issue microsoft/ApplicationInsights-JS#1324 has appeared in the latest versions:
Type 'ReactPlugin' is not assignable to type 'ITelemetryPlugin'.
Versions:
- @microsoft/applicationinsights-react-js v3.4.0
- @microsoft/applicationinsights-web v2.8.9
Here's the simplified example from my next.js app:
import { ReactPlugin } from '@microsoft/applicationinsights-react-js';
import {
ApplicationInsights,
ITelemetryPlugin,
} from '@microsoft/applicationinsights-web';
const appInsights = new ApplicationInsights({
config: {
connectionString: `InstrumentationKey=${process.env.AZURE_INSTURMENTATION_KEY};IngestionEndpoint=https://switzerlandnorth-0.in.applicationinsights.azure.com/;LiveEndpoint=https://switzerlandnorth.livediagnostics.monitor.azure.com/`,
enableAutoRouteTracking: true,
extensions: [new ReactPlugin()], // <- error happens here
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment