-
Notifications
You must be signed in to change notification settings - Fork 3.3k
configure_azure_monitor attempts to use uninstalled libraries and logs tracebacks #40517
Copy link
Copy link
Closed
Closed
Copy link
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.MonitorMonitor, Monitor Ingestion, Monitor QueryMonitor, Monitor Ingestion, Monitor QueryOpenTelemetryOpenTelemetry instrumentation (not Monitor-specific)OpenTelemetry instrumentation (not Monitor-specific)Service AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.Workflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Metadata
Metadata
Assignees
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.MonitorMonitor, Monitor Ingestion, Monitor QueryMonitor, Monitor Ingestion, Monitor QueryOpenTelemetryOpenTelemetry instrumentation (not Monitor-specific)OpenTelemetry instrumentation (not Monitor-specific)Service AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.Workflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
configure_azure_monitorattempts to setup instrumentations for libraries that are not installedTo Reproduce
Steps to reproduce the behavior:
azure-monitor-opentelemetrywithout unnecessary dependencies (e.g. withoutdjango).configure_azure_monitorObserve logs like:
Expected behavior
No tracebacks displayed for attempts to setup instrumentation for uninstalled libraries.
Additional context
The problem seems to be in this function:
azure-sdk-for-python/sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_configure.py
Lines 210 to 214 in ce204aa
There used to be logic there for skipping setup on uninstalled libraries, but it was removed in #40463