- Package Name: azure-monitor-opentelemetry, azure-monitor-opentelemetry-exporter
- Package Version: 1.8.6, 1.0.0b48
- Operating System: Windows, Docker - Linux
- Python Version: 3.13.12
Describe the bug
Bug description
Using the documented Python distro setup with configure_azure_monitor(...) causes deprecation warnings to be emitted from the Azure Monitor OpenTelemetry distro / logging setup path.
The issue is that the officially documented distro onboarding path still appears to initialize OpenTelemetry logging components that now emit deprecation warnings under the currently pinned OpenTelemetry versions.
Repro package versions
Observed with:
- azure-monitor-opentelemetry==1.8.6
- azure-monitor-opentelemetry-exporter==1.0.0b48
- opentelemetry-api==1.39.0
- opentelemetry-sdk==1.39.0
Notably, azure-monitor-opentelemetry==1.8.6 currently declares opentelemetry-sdk==1.39, so this appears to happen on the distro’s supported version line.
To Reproduce
import warnings
warnings.simplefilter("always")
from azure.monitor.opentelemetry import configure_azure_monitor
configure_azure_monitor(
connection_string="InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://westus2-0.in.applicationinsights.azure.com/",
logger_name="app",
enable_live_metrics=True,
)
Observed behavior
Warnings like the following are emitted during configuration:
DeprecationWarning: You should use `Logger` instead. Deprecated since version 1.39.0 and will be removed in a future release.
DeprecationWarning: You should use `LoggerProvider` instead. Deprecated since version 1.39.0 and will be removed in a future release.
DeprecationWarning: You should use `ProxyLoggerProvider` instead. Deprecated since version 1.39.0 and will be removed in a future release.
There may also be a warning path involving Azure Monitor’s configuration internals when configure_azure_monitor() sets up logging.
Expected behavior
The documented distro setup path for Python should not emit deprecation warnings on the distro’s supported dependency set.
If configure_azure_monitor() is the recommended onboarding path in the docs, it should use non-deprecated OpenTelemetry logging APIs internally, or otherwise avoid initializing deprecated paths.
Why this matters
configure_azure_monitor() is the documented distro setup path for Python:
https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-configuration?tabs=python#connection-string
This makes clean test runs and warning-free application startup difficult when following the official guidance.
It creates ambiguity for users about whether they should stay on the distro path or switch to manual exporter wiring.
Additional context
The exporter docs suggest using the distro for simple setup and the exporter path for advanced/manual configuration:
https://learn.microsoft.com/python/api/overview/azure/monitor-opentelemetry-exporter-readme?view=azure-python-preview
That suggests the distro path should ideally remain warning-free for supported package versions.
Describe the bug
Bug description
Using the documented Python distro setup with
configure_azure_monitor(...)causes deprecation warnings to be emitted from the Azure Monitor OpenTelemetry distro / logging setup path.The issue is that the officially documented distro onboarding path still appears to initialize OpenTelemetry logging components that now emit deprecation warnings under the currently pinned OpenTelemetry versions.
Repro package versions
Observed with:
Notably,
azure-monitor-opentelemetry==1.8.6currently declaresopentelemetry-sdk==1.39, so this appears to happen on the distro’s supported version line.To Reproduce
Observed behavior
Warnings like the following are emitted during configuration:
There may also be a warning path involving Azure Monitor’s configuration internals when configure_azure_monitor() sets up logging.
Expected behavior
The documented distro setup path for Python should not emit deprecation warnings on the distro’s supported dependency set.
If configure_azure_monitor() is the recommended onboarding path in the docs, it should use non-deprecated OpenTelemetry logging APIs internally, or otherwise avoid initializing deprecated paths.
Why this matters
configure_azure_monitor()is the documented distro setup path for Python:https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-configuration?tabs=python#connection-string
This makes clean test runs and warning-free application startup difficult when following the official guidance.
It creates ambiguity for users about whether they should stay on the distro path or switch to manual exporter wiring.
Additional context
The exporter docs suggest using the distro for simple setup and the exporter path for advanced/manual configuration:
https://learn.microsoft.com/python/api/overview/azure/monitor-opentelemetry-exporter-readme?view=azure-python-preview
That suggests the distro path should ideally remain warning-free for supported package versions.