ApplicationInsights-JS icon indicating copy to clipboard operation
ApplicationInsights-JS copied to clipboard

[BUG] Application insight API key is showing deprecated and the support will end in march 2026

Open abdjyg opened this issue 1 year ago • 4 comments

Description/Screenshot Application insight API key is showing deprecated and the support will end in march 2026. As the entra ID authentication is still not enabled for "ApplicationInsights JavaScript web SDK", we still using local authentication to send the telemetry to application insight. We are integrating application insight logs to other data platform using API key now. Since local authentication is enabled for this resource we can't use azure AD authentication to integrate app insight with other data platforms.

Steps to Reproduce

  • OS/Browser:
  • SDK Version [e.g. 22]:
  • How you initialized the SDK:

Expected behavior

Additional context Add any other context about the problem here.

abdjyg avatar Sep 30 '24 09:09 abdjyg

Can you provide the exact message?

I think you are referring to our deprecating message, which we are currently emitting (at a very low rate) as a warning IF you are only initializing the SDK using your instrumentationKey, this is the support that is being deprecated in March 2026. To resolve / fix this issue, please initialize the SDK using your connectionString (which includes your instrementationKey, along with other relevant connection details).

So instrumentationKey: "<Your Instrumentation / API Key" should just become connectionString: "<Your connection string>"

This will be the supported method from March 2026 onwards and has nothing to do with Authentication.

MSNev avatar Sep 30 '24 16:09 MSNev

we already using connection string to send telemetry to application insight. But we also need to connect to application insight API to read this telemetry and send this data to another data platform. So how long can we use API key to connect to the application insight API to read data.

abdjyg avatar Oct 01 '24 05:10 abdjyg

If your already using the connectionString then you "shouldn't" be seeing the generated warning, are you specifying both?

In terms of the So how long can we use API key thats an unknown question right now, because until we phase out the direct usage of an instrumentation key we can't implement additional options like more easily rotating or using temporary keys -- none of which have been planned right now.

The way the current connection string works is that internally (in the SDK) we actually "parse" the connection string and find the instrumentationkey (all lowercase, because we lower everything) and then internally populate the instrumentationKey from the connection string setting... Until we get to beyond March 2026 and start scheduling / designing any additional work I don't know how that may or may not change.

MSNev avatar Oct 01 '24 18:10 MSNev

This Issue will be closed in 30 days. Please remove the "Stale" label or comment to avoid closure with no action.

github-actions[bot] avatar May 30 '25 07:05 github-actions[bot]