microsoft / ApplicationInsights-node.js

Microsoft Application Insights SDK for Node.js
MIT License
320 stars 138 forks source link

Configuration of automatic web instrumentation #1232

Open carlo-quinonez opened 8 months ago

carlo-quinonez commented 8 months ago

The Automatic Web Instrumentation feature in Preview is handy. I noticed it's possible to specify the config for the web sdk.

Is it possible to use extensions, like the React or ClickAnalytics extensions, to the webclient with this method?

JacksonWeber commented 7 months ago

Hi @carlo-quinonez this will determine on what plugins you're looking to load. In the case of ClickAnalytics, you'd need to load it in before injection of the web SDK snippet to ensure that it can be accessed by the WebSDK. For React, because React is only available via NPM, it can't be loaded directly through the snippet, but would have to be self-hosted in order to retrieve it for configuration of the snippet.