This enables metrics, logs and traces for Azure Functions through the Azure Monitor OpenTelemetry library. Telemetry is sent directly to AppInsights by setting the environment variable APPLICATIONINSIGHTS_CONNECTION_STRING
What this adds
Updates the azure functions to programming model v2. See here for a comparison. The main driver behind making this change is that it provides a single location to set up telemetry in function_app.py.
Adds promptflow's @trace annotation to the class based flex flow
Adds context propagation to each function. Incoming requests are not automatically correlated with telemetry being tracked in it. To correlate incoming requests with the function telemetry, we must manually propagate the context. See documentation. If using a flex consumption plan, richer traces and logs be emitted by setting "telemetryMode": "openTelemetry" in host.json. See docs
With context propagation:
Without context propagation:
Turns off the AppInsights native logging. Logs are controlled by configure_azure_monitor. See docs
Description
This enables metrics, logs and traces for Azure Functions through the Azure Monitor OpenTelemetry library. Telemetry is sent directly to AppInsights by setting the environment variable
APPLICATIONINSIGHTS_CONNECTION_STRING
What this adds
function_app.py
.@trace
annotation to the class based flex flow"telemetryMode": "openTelemetry"
in host.json. See docsWith context propagation:
Without context propagation:
configure_azure_monitor
. See docs