Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Invalid instrumentation key #17

Open
vinicaval opened this issue Sep 13, 2016 · 2 comments
Open

Invalid instrumentation key #17

vinicaval opened this issue Sep 13, 2016 · 2 comments

Comments

@vinicaval
Copy link

Hi,

I configured the plugin inside my app and the app insights returns an error 400 invalid instrumentation key. Then I created an empty app, and included the plugin again, and I got the same error 400.

Can you help me?

@strickos9
Copy link

strickos9 commented Dec 4, 2016

Hello,
Check the generated file AppInsight.js in the platform folder (platforms\android\assets\www\plugins\cordova-plugin-ms-appinsights\www\AppInsights.js) if it contains the key you specified in config.xml.
Also do not set the key as a variable via plugin add, it doesn't work due to an issue with cordova-lib

I had to set it manually in this file for AppInsight to work.

Hope this helps.

@phonic
Copy link

phonic commented Jan 24, 2018

Is there any progress on this package? Seems to be, that MS isnt very interested in?
There are a couple of ugly things: The instrumentation key cannot assigned by configuration, you can not install the plugin via CLI (just had to clone it locally), no promise implementation, bad documentation. I've forgotten anything? For sure....

By, the way, you should assign the key via:

window.appInsights.config.instrumentationKey = "YOUR_KEY";

...within your device ready event. Don't edit any compiled assets to keep your project clean and updateable.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants