Closed penance316 closed 2 months ago
After some more research, it appears this is probably related to auto instrumentation of the application insights monitor when running in Azure. I have disabled the auto monitoring and am just using the SDK only, and it seems to be working fine. Thanks
Hi team,
I have a small nodeJS project that I am trying to add some customDimension data to, but I have found I am getting different results running locally vs running in Azure functions.
I have a winston logger setup like so:
And i have the package 'applicationinsights' included in my project something like this:
A basic http hook which initalises the applciation insights package then the logger then logs.
When i run this locally with azure core tools the logging in Azure looks correct and seperates out all customDimensions as expected. The message is correctly parsed and the correlationId and service fields are seperated out from the customDimentions.![image](https://github.com/microsoft/ApplicationInsights-node.js/assets/7299871/60acf8d7-89c3-4e6c-9861-1daad1a6f792)
But when i run the same code in Azure my logs look like this. The logged message is not really parsed out and instead it is just logged as a string making it hard to query.![image](https://github.com/microsoft/ApplicationInsights-node.js/assets/7299871/d3410925-59aa-4bd6-a70e-1d25b8428eab)
Im assuming something is wrong with my setup, but I'm not sure what as everything seems working correctly when I run it locally Some help/pointer would be appreciated Thanks.