Skip to content

[BUG] Typing issue with @microsoft/applicationinsights-web v2.7.0 #12

Description

Description/Screenshot

It seems that after the release of the @microsoft/applicationinsights-web v2.7.1 - apps with version v2.7.0 and TypeScript not working correctly anymore.

TS2322: Type 'ReactPlugin' is not assignable to type 'ITelemetryPlugin'.

Steps to Reproduce

Simple library with following deps:

"dependencies": {
    "@microsoft/applicationinsights-react-js": "3.0.5",
    "@microsoft/applicationinsights-web": "2.7.0",
    "axios": "0.21.1",
    "qs": "6.9.1",
    "reflect-metadata": "0.1.13"
  },

Initialize app:

this.pluginInstance = new ReactPlugin();
this.insightsInstance = new ApplicationInsights({
      config: {
        instrumentationKey,
        disableFetchTracking: false,
        enableRequestHeaderTracking: true,
        enableResponseHeaderTracking: true,
        extensions: [this.pluginInstance],
      },
    });

this.insightsInstance.loadAppInsights();
  • OS/Browser: Windows
  • SDK Version [e.g. 22]:
  • How you initialized the SDK: NPM

Expected behavior

No breaking changes in typing between patches of the library.

Additional context
Add any other context about the problem here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions