Azure-Functions
Azure-Functions copied to clipboard
Migration from V3 to V4 throws unexpected error message
Function App name: NodeJS Tools used: New V4 app or existing V3 app migrated to V4: V3 migrated to V4 + Node16
So, I migrated a function app V3 to V4 and upgraded my node version from 14 to 16. Everything seems to be working, however there's a misleading error message that it's getting thrown with the setup that I had on each request done to the function app.
I created a fully working playground where you could check the issue. Steps to run the demo:
- extract zip
- npm install
- add a valid app insights connection string inside local.settings.json
- npm start
- POST / GET request to localhost:7075/api/demo
Issue: each function app request will log this message
My findings:
- If I remove application insights connection string and no client will be instantiated, function runs without the error message
- I suspect something inside app insights wrap with correlation context / app insights flush doesn't play well with Function App V4.
https://github.com/microsoft/ApplicationInsights-node.js#azure-functions code for context propagating http trigger was inspired from here
Sample code function-app-playground.zip
Let me know if you need any guidance, or if I'm doing something wrong within the project. The separation of func.ts and index.ts was purely to separate business logic from distributed tracing.
Hi @tudor33sud Thanks for the feedback. We are investigating this issue further and will let you know about the findings. Thanks.
@Ved2806 is there any update on the issue? I am just checking to see whether it still needs triage or if it was forwarded to a team. Thanks a lot!