{"id":7002,"library":"arize-otel","title":"Arize-OTel","description":"Arize-OTel is a helper package designed to streamline OpenTelemetry (OTel) setup for sending traces to Arize AI and Arize Phoenix. It simplifies instrumenting Python applications by providing pre-configured exporters and an instrumentor for common libraries, enabling quick observability integration. The current version is 0.12.0, and the project maintains a regular release cadence for new features, bug fixes, and dependency updates.","status":"active","version":"0.12.0","language":"en","source_language":"en","source_url":"https://github.com/Arize-ai/arize-otel-python","tags":["opentelemetry","observability","tracing","arize","phoenix","ai-observability"],"install":[{"cmd":"pip install arize-otel","lang":"bash","label":"Basic Installation"},{"cmd":"pip install \"arize-otel[data,evals]\"","lang":"bash","label":"With Phoenix Data and Evals Features"}],"dependencies":[{"reason":"Core OpenTelemetry API for tracing.","package":"opentelemetry-api"},{"reason":"Core OpenTelemetry SDK for trace processing.","package":"opentelemetry-sdk"},{"reason":"For exporting traces via OTLP (OpenTelemetry Protocol).","package":"opentelemetry-exporter-otlp"},{"reason":"Provides AWS-specific OpenTelemetry resource detection and extensions.","package":"opentelemetry-sdk-extension-aws","optional":true},{"reason":"Integration with Arize Phoenix for data visualization and evaluation features. Requires '[data,evals]' extras for full functionality.","package":"arize-phoenix","optional":true}],"imports":[{"note":"The function name changed in v0.10.0 from `configure_opentelemetry_for_arize` to `configure_opentelemetry_for_arize_phoenix`.","wrong":"from arize_otel.tracing.config import configure_opentelemetry_for_arize","symbol":"configure_opentelemetry_for_arize_phoenix","correct":"from arize_otel.tracing.config import configure_opentelemetry_for_arize_phoenix"},{"symbol":"ArizeInstrumentor","correct":"from arize_otel.tracing.instrumentation import ArizeInstrumentor"}],"quickstart":{"code":"import os\nfrom opentelemetry import trace\nfrom arize_otel.tracing.config import configure_opentelemetry_for_arize_phoenix\nfrom arize_otel.tracing.instrumentation import ArizeInstrumentor\n\n# Configure OpenTelemetry to send traces to Arize and Phoenix\n# Ensure ARIZE_API_KEY and ARIZE_SPACE_KEY environment variables are set.\nconfigure_opentelemetry_for_arize_phoenix(\n    arize_api_key=os.environ.get(\"ARIZE_API_KEY\", \"\"),\n    arize_space_key=os.environ.get(\"ARIZE_SPACE_KEY\", \"\"),\n    phoenix_host=\"http://localhost:6006\" # Optional: defaults to \"http://localhost:6006\"\n)\n\n# Manually instrument an application using OpenTelemetry Tracer\ntracer = trace.get_tracer(\"my-arize-app\")\n\nwith tracer.start_as_current_span(\"my-manual-span\"):\n    print(\"Performing some traced operation...\")\n\n# Automatically instrument common libraries (e.g., requests, flask, django)\n# Ensure you have installed the respective opentelemetry-instrumentation- packages.\nArizeInstrumentor().instrument()\n\n# Example using a common library (e.g., requests) which will be automatically traced\ntry:\n    import requests\n    response = requests.get(\"https://www.example.com\")\n    print(f\"Requests response status: {response.status_code}\")\nexcept ImportError:\n    print(\"Install 'opentelemetry-instrumentation-requests' to trace requests.\")\n\nprint(\"Tracing configured and example operation completed.\")","lang":"python","description":"This quickstart initializes OpenTelemetry with Arize and Phoenix exporters, then demonstrates both manual and automatic instrumentation. Ensure `ARIZE_API_KEY` and `ARIZE_SPACE_KEY` environment variables are set for Arize and Phoenix is running locally if using the default host. For automatic instrumentation, relevant `opentelemetry-instrumentation-*` packages must be installed separately (e.g., `pip install opentelemetry-instrumentation-requests`)."},"warnings":[{"fix":"Update your import statement and function call to `from arize_otel.tracing.config import configure_opentelemetry_for_arize_phoenix`.","message":"The primary configuration function `configure_opentelemetry_for_arize` was renamed to `configure_opentelemetry_for_arize_phoenix` in `arize-otel` version 0.10.0.","severity":"breaking","affected_versions":">=0.10.0"},{"fix":"Install using `pip install \"arize-otel[data,evals]\"`.","message":"To utilize all features of Arize Phoenix (e.g., data visualization, evaluations), you must install `arize-otel` with the `data` and `evals` extras.","severity":"gotcha","affected_versions":"All versions"},{"fix":"For example, to instrument `requests`, run `pip install opentelemetry-instrumentation-requests` and ensure `ArizeInstrumentor().instrument()` is part of your setup.","message":"Automatic instrumentation of third-party libraries (like `requests`, `flask`, `django`, `fastapi`) requires their respective `opentelemetry-instrumentation-*` packages to be installed alongside `arize-otel` and `ArizeInstrumentor().instrument()` to be called.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Set `export ARIZE_API_KEY='your_api_key'` and `export ARIZE_SPACE_KEY='your_space_key'` in your environment, or pass them as arguments: `configure_opentelemetry_for_arize_phoenix(arize_api_key='...', arize_space_key='...')`.","message":"Arize API and Space Keys (`ARIZE_API_KEY`, `ARIZE_SPACE_KEY`) are crucial for sending traces to Arize. Ensure these are provided either via environment variables or explicitly passed to `configure_opentelemetry_for_arize_phoenix`.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Update your import and function call to `from arize_otel.tracing.config import configure_opentelemetry_for_arize_phoenix`.","cause":"The function `configure_opentelemetry_for_arize` was renamed to `configure_opentelemetry_for_arize_phoenix` in version 0.10.0.","error":"ImportError: cannot import name 'configure_opentelemetry_for_arize' from 'arize_otel.tracing.config'"},{"fix":"Install `arize-otel` with the necessary extras: `pip install \"arize-otel[data,evals]\"`.","cause":"The core `arize-otel` installation does not include all optional dependencies for `arize-phoenix`'s data and evals components.","error":"ModuleNotFoundError: No module named 'arize_phoenix.data' (or 'arize_phoenix.evals')"},{"fix":"Ensure you have installed the relevant instrumentation package (e.g., `pip install opentelemetry-instrumentation-requests` for `requests`) in addition to `arize-otel`.","cause":"Automatic instrumentation relies on specific `opentelemetry-instrumentation-*` packages for each library. These must be installed separately.","error":"My Flask/Requests/Django application is not being automatically traced, even with ArizeInstrumentor().instrument() called."}]}