{"id":14454,"library":"azure-monitor-events-extension","title":"Azure Monitor Events Extension","description":"This package, `azure-monitor-events-extension`, is an older, likely superseded component for integrating Python applications with Azure Monitor. It has not been updated since its `0.1.0` release in 2021. For modern Python applications, it is highly recommended to use the OpenTelemetry-native packages `azure-monitor-opentelemetry-distro` and `azure-monitor-opentelemetry-exporter` for robust and up-to-date Azure Monitor integration.","status":"deprecated","version":"0.1.0","language":"en","source_language":"en","source_url":"https://github.com/microsoft/ApplicationInsights-Python/tree/main/azure-monitor-events-extension","tags":["azure","monitor","application insights","telemetry","opentelemetry","deprecated"],"install":[{"cmd":"pip install azure-monitor-events-extension","lang":"bash","label":"Install Deprecated Package"},{"cmd":"pip install azure-monitor-opentelemetry-distro","lang":"bash","label":"Recommended Modern Installation"}],"dependencies":[{"reason":"This package, if functional, would depend on older OpenTelemetry SDK versions. Modern Azure Monitor integration relies on `azure-monitor-opentelemetry-distro` and its dependencies.","package":"opentelemetry-sdk","optional":false}],"imports":[{"note":"The `azure-monitor-events-extension` package does not expose a direct `configure_opentelemetry` function for general use. The modern and recommended way to configure OpenTelemetry for Azure Monitor is via `azure-monitor-opentelemetry-distro`.","wrong":"from azure_monitor_events_extension import configure_opentelemetry","symbol":"configure_opentelemetry","correct":"from azure.monitor.opentelemetry.distro import configure_opentelemetry"}],"quickstart":{"code":"import os\nfrom opentelemetry import trace\nfrom azure.monitor.opentelemetry.distro import configure_opentelemetry\n\n# NOTE: This quickstart demonstrates the recommended way using the *successor* library,\n#       `azure-monitor-opentelemetry-distro`, not the deprecated `azure-monitor-events-extension`.\n\n# Configure OpenTelemetry to export to Azure Monitor\nconfigure_opentelemetry(\n    connection_string=os.environ.get(\"APPLICATIONINSIGHTS_CONNECTION_STRING\", \"\")\n)\n\n# Example usage with OpenTelemetry tracer\ntracer = trace.get_tracer(__name__)\n\nwith tracer.start_as_current_span(\"my-span\"):\n    print(\"Hello from my-span!\")\n\n# In a real application, ensure the application stays alive long enough for telemetry to be sent.\n# For example, a web framework automatically handles this. For a script, you might need\n# to add a small delay or ensure there's ongoing activity.","lang":"python","description":"This quickstart demonstrates how to integrate OpenTelemetry with Azure Monitor using the recommended and actively maintained `azure-monitor-opentelemetry-distro` package, which has superseded `azure-monitor-events-extension`. It configures the OpenTelemetry SDK to send telemetry to Azure Application Insights using a connection string."},"warnings":[{"fix":"Migrate your application to use `azure-monitor-opentelemetry-distro`. Uninstall `azure-monitor-events-extension` and install `pip install azure-monitor-opentelemetry-distro`.","message":"The `azure-monitor-events-extension` package is deprecated and considered abandoned. It has not received updates since its `0.1.0` release in 2021. Users should migrate to `azure-monitor-opentelemetry-distro` and `azure-monitor-opentelemetry-exporter` for current and supported Azure Monitor integration.","severity":"breaking","affected_versions":"<=0.1.0"},{"fix":"Always use `azure-monitor-opentelemetry-distro` for standard OpenTelemetry integration with Azure Monitor. Refer to the official Azure Monitor Python documentation for the latest guidance.","message":"Despite its name, `azure-monitor-events-extension` refers to an older, custom implementation, not the current OpenTelemetry-native approach. Attempting to use it alongside modern OpenTelemetry SDKs will likely lead to conflicts or non-functional telemetry.","severity":"gotcha","affected_versions":"0.1.0"},{"fix":"Use the actively maintained `azure-monitor-opentelemetry-distro` which supports recent Python versions (typically `>=3.7`).","message":"The package requires Python `>=3.7` but has not been tested or updated for newer Python versions (3.9, 3.10, 3.11, 3.12+). Compatibility with modern Python environments is not guaranteed.","severity":"gotcha","affected_versions":"0.1.0"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"This package is deprecated. For Azure Monitor integration, install `azure-monitor-opentelemetry-distro` and use `from azure.monitor.opentelemetry.distro import configure_opentelemetry` instead.","cause":"Attempting to initialize or use `azure-monitor-events-extension` with an API pattern that either doesn't exist or is from a different, modern package.","error":"AttributeError: module 'azure_monitor_events_extension' has no attribute 'init'"},{"fix":"This package is deprecated. It is strongly recommended to uninstall `azure-monitor-events-extension` and use the officially supported `azure-monitor-opentelemetry-distro` and `azure-monitor-opentelemetry-exporter` for Azure Monitor integration.","cause":"The `azure-monitor-events-extension` package likely depends on older, potentially incompatible versions of OpenTelemetry or other libraries, leading to dependency conflicts when installed with modern packages.","error":"Package 'azure-monitor-events-extension' conflicts with 'opentelemetry-sdk' version X.Y.Z"}],"ecosystem":"pypi"}