
Explanation:
Box 1: Manual instrumentation with Azure Monitor OpenTelemetry Distros
The best instrumentation methodology for this application is code-based instrumentation using the Azure Monitor OpenTelemetry Distro.
Why Code-Based Instrumentation?
While Azure App Service supports auto-instrumentation (codeless monitoring) for certain runtimes, configuring fixed-rate sampling for Python requires explicit application-level controls.
Autoinstrumentation Limitation: Portal-based, zero-code monitoring uses adaptive sampling by default on server-side apps.
Fixed-Rate Requirement: To enforce a strict, predictable fixed-rate sampling percentage directly at the application source, you must configure it using code-based SDK settings.
Box 2: Manual instrumentation with Azure Monitor OpenTelemetry Distros
The best methodology for this app is Manual instrumentation with Azure Monitor OpenTelemetry Distros.
Rationale
Why Manual OpenTelemetry Distro wins:
The Azure Monitor OpenTelemetry Distro for Python is Microsoft's modern, recommended standard. It requires only one line of code (configure_azure_monitor()) to initialize, perfectly aligning with your constraint to keep development and implementation effort to a absolute minimum. It fully supports custom fixed-rate sampling natively via configuration parameters or environment variables.
Incorrect:
Why Automatic instrumentation is ruled out:
For Python applications connecting to Azure Monitor, true automatic (agent-based) instrumentation is not supported. You must include a minimal code-based initialization to stream telemetry.
Why OpenCensus is ruled out:
OpenCensus is the legacy SDK path. While it supports fixed-rate sampling, Microsoft has deprecated classic SDKs/OpenCensus in favor of OpenTelemetry. Choosing it would introduce technical debt right from the start Reference:
https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview