-
Notifications
You must be signed in to change notification settings - Fork 141
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
Custom .trackRequest and .trackDependency not appearing in Application Insights telemetry data #368
Comments
It appears that either numerous examples are wrong, or there's a missing type cast in both the .trackRequest() and .trackDependency() module. The issue is that the .resultCode property must be of type string in both instances, but the examples indicate using numeric values. When the result codes are changed to strings (encapsulated in double or single quotes) in the .trackDependency() and .trackRequest() calls, the errors go away, and the telemetry can be seen in the Application Insights queries. Here is the test code:
Here are the errors:
and, for the .trackRequest() call:
Following changing the type of the responseCode properties:
|
It looks like those code samples are indeed incorrect. The typescript type for If typescript was being used, this mismatch should result in a compile time error. That being said, we should add an internal cast here because of the incorrect code samples |
* Fix issue #362 * Fix issue #358 * Fix issue #346 * Fix issue #344 * Address issue #368 * Address issue #365 * Add additional logging and fix stability issues with retry caching * Bump package.json * Add calls to ICACLS for windows * Address PR feedback * Fix unit tests in Node < 0.11.12 * Fix more unit tests for Node < 0.11.12 * Fix again
This should be fixed now in 1.0.2. Thanks for reporting! |
When using Azure Functions with the applicationinsights package (1.0.1), the custom
client.trackRequest()
events seem to not be submitted to App Insights. After having issues with custom code, I am unable to get any results when querying the "request" in application insights analytics, but see the other telemetry data (metrics, events, exceptions, etc.). I have also tried the example code at: https://docs.microsoft.com/en-us/azure/azure-functions/functions-monitoring. But even a new function app with just the example code does not cause the custom request items to show up in analytics.No difference in outcome whether I use the base integration (adding the
APPINSIGHTS_INSTRUMENTATIONKEY
app setting), or a custom setup chain within the function. I have tried including/excluding the.start()
from the setup chain, and various true/false settings on the setup chain.The text was updated successfully, but these errors were encountered: