pythonazureazure-functionsazure-application-insights

Azure Functions for python, structured logging to Application Insights?


When using Python (3.8) in Azure Functions, is there a way to send structured logs to Application Insights? More specifically, I'm trying to send custom dimensions with a log message. All I could find about logging is this very brief section.


Solution

  • Note that the accept answer suggests using the OpenCensus Python SDK which has been retired as of July 2023.

    Instead, Microsoft suggest switching across to their OpenTelemetry offering and provide the following migration guidance as well as a guide for how to get started with azure-monitor-opentelemetry .