{"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,"search_vec":"'0.1.0':32 '2021':35 'applic':21,39,74 'azur':1,8,23,52,58,69,72 'azure-monitor-events-extens':7 'azure-monitor-opentelemetry-distro':51 'azure-monitor-opentelemetry-export':57 'compon':17 'date':68 'deprec':78 'distro':55 'event':3,10 'export':61 'extens':4,11 'high':42 'insight':75 'integr':19,71 'like':15 'modern':37 'monitor':2,9,24,53,59,70,73 'nativ':49 'older':14 'opentelemetri':48,54,60,77 'opentelemetry-n':47 'packag':6,50 'python':20,38 'recommend':43 'releas':33 'robust':63 'sinc':30 'supersed':16 'telemetri':76 'up-to-d':65 'updat':29 'use':45","created_at":"2026-04-20T18:41:52.234944+00:00","updated_at":"2026-04-20T18:41:52.234944+00:00","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","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.1.0","cli_name":"","cli_version":null,"type":"library","homepage":"https://azure.microsoft.com/products/monitor/","github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["azure","observability"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-15","install_tag":null}}