
Observability Edot Python Migrate
Switch a production Python service from the classic elastic-apm agent to Elastic’s EDOT OpenTelemetry stack without breaking traces in Elastic Observability.
Overview
observability-edot-python-migrate is an agent skill for the Operate phase that migrates a Python app from the classic Elastic APM agent to the EDOT Python OpenTelemetry agent.
Install
npx skills add https://github.com/elastic/agent-skills --skill observability-edot-python-migrateWhat is this skill?
- Stepwise removal of elastic-apm deps, ElasticAPM middleware, ELASTIC_APM_* config, and env vars
- Install elastic-opentelemetry plus edot-bootstrap --action=install for detected library auto-instrumentation
- Require opentelemetry-instrument on the process entrypoint so telemetry actually emits
- Map three OTEL env vars (service name, managed OTLP/EDOT endpoint, auth) instead of legacy APM settings
- Links to official Elastic migration, setup, and configuration docs as the source of truth
- Exactly three required OTEL environment variables after migration
- edot-bootstrap --action=install runs during image build for auto-instrumentation packages
Adoption & trust: 927 installs on skills.sh; 502 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your Python service still runs elastic-apm and ELASTIC_APM_* settings while Elastic and your platform team expect OpenTelemetry export via EDOT.
Who is it for?
Solo builders or tiny teams operating Flask/Django/FastAPI-style Python in Docker or systemd who already use Elastic Observability and want a checklist-driven agent migration.
Skip if: Greenfield apps with no APM yet, non-Python runtimes, or teams that only need local debug logging without OTLP export.
When should I use this skill?
Switching a Python application from elastic-apm to elastic-opentelemetry per Elastic EDOT migration docs.
What do I get? / Deliverables
After the migration, dependencies and startup use elastic-opentelemetry, edot-bootstrap, and opentelemetry-instrument with OTEL_* pointing at the managed OTLP or EDOT Collector endpoint.
- Updated requirements without elastic-apm and with elastic-opentelemetry
- Entrypoint wrapped with opentelemetry-instrument and OTEL_* env configuration
Recommended Skills
Journey fit
Migration happens when the app is already running and you need consistent telemetry in production—not during greenfield feature work. Canonical shelf is monitoring because the skill rewires exporters, service names, and instrumentation around live observability pipelines.
How it compares
Use as a migration runbook skill, not as a generic OpenTelemetry tutorial unrelated to Elastic EDOT.
Common Questions / FAQ
Who is observability-edot-python-migrate for?
Python operators on Elastic who must retire elastic-apm in favor of elastic-opentelemetry and still ship through their normal CI or image build pipeline.
When should I use observability-edot-python-migrate?
Use it in Operate when you are changing production instrumentation, rebuilding container images, or aligning staging and prod with Elastic’s EDOT Python docs before a traffic cutover.
Is observability-edot-python-migrate safe to install?
Review the Security Audits panel on this Prism page and treat the skill as operational guidance that will modify requirements, entrypoints, and secrets-bearing env vars in your repo.
SKILL.md
READMESKILL.md - Observability Edot Python Migrate
# EDOT Python Migration Read the migration guide before making changes: - [Migration guide](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/python/migration) - [EDOT Python setup](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/python/setup) - [EDOT Python configuration](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/python/configuration) ## Guidelines 1. Remove ALL classic APM references: `elastic-apm` from requirements, `ElasticAPM(app)` / `elasticapm.contrib.*` from application code, `app.config['ELASTIC_APM']` blocks, and all `ELASTIC_APM_*` env vars 1. Install `elastic-opentelemetry` via pip (add to `requirements.txt` or equivalent) 1. Run `edot-bootstrap --action=install` during image build to install auto-instrumentation packages for detected libraries 1. Wrap the application entrypoint with `opentelemetry-instrument` — e.g. `opentelemetry-instrument gunicorn app:app`. Without this, no telemetry is collected 1. Set exactly three required environment variables: - `OTEL_SERVICE_NAME` (replaces `ELASTIC_APM_SERVICE_NAME`) - `OTEL_EXPORTER_OTLP_ENDPOINT` — must be the **managed OTLP endpoint** or **EDOT Collector** URL. Do NOT reuse the old `ELASTIC_APM_SERVER_URL` value. Never use an APM Server URL (no `apm-server`, no `:8200`, no `/intake/v2/events`) - `OTEL_EXPORTER_OTLP_HEADERS` — `"Authorization=ApiKey <key>"` or `"Authorization=Bearer <token>"` (replaces `ELASTIC_APM_SECRET_TOKEN`) 1. Do NOT set `OTEL_TRACES_EXPORTER`, `OTEL_METRICS_EXPORTER`, or `OTEL_LOGS_EXPORTER` — the defaults are already correct 1. Never run both classic `elastic-apm` and EDOT on the same application ## Examples See the [EDOT Python migration guide](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/python/migration) for complete examples.