-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Documentation should clarify that node apps should use applicationinsights, not this package #1792
Comments
|
@MSNev Should the last two items be separated into:
|
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description/Screenshot
This package's README contains no indication that it is not intended for use with Node.js applications. The closest thing to documentation about use from a non-DOM environment that I was able to find linked from the README was this comment in the suggested sample for the
@microsoft/applicationinsights-web-basic
package, which made me expect that that package would be the appropriate one to use in a Node environment without DOM access:Neither
@microsoft/applicationinsights-web-basic
nor@microsoft/applicationinsights-web
work in a Node.js environment (at least, not unless anXMLHttpRequest
polyfill exists globally) - both of them run without error, but don't actually send any telemetry (they fail silently when trying to useXMLHttpRequest
and not finding it).The Azure diagnostics when a user makes this mistake are not useful; the only meaningful suggestion they make is to "double check your instrumentation key".
Steps to Reproduce
Expected behavior
XMLHttpRequest
implementation to work, it should check whether one is available during initialization and fail fast if none is available. The error message should suggest that if this is a Node.js environment, you should use theapplicationinsights
package instead.TroubleshootDiagnoseBlade
suggestions under the path "Application Insights > Diagnose and solve problems > Configure and sending data using Open Telemetry or Application Insights SDK > I need to monitor a non-Web App (console, etc.)" should contain a specific suggestion for a user in this scenario.Additional context
n/a
The text was updated successfully, but these errors were encountered: