elastic-apm
The official Python module for Elastic APM
What it is and what it does
Elastic APM is the official Python agent for Elastic's Application Performance Monitoring platform. It automatically instruments web frameworks like Django and Flask to capture request metrics, errors, and distributed traces, sending them to a central Elastic APM Server for visualization and analysis. The agent works out-of-the-box with popular frameworks and can be adapted to any WSGI-compatible application through custom integrations.
The package is designed for developers and system administrators who need visibility into application performance and error rates. It depends on urllib3, certifi, wrapt, and ecs_logging to handle HTTP communication, certificate validation, function wrapping for instrumentation, and structured logging. The agent supports Python 3.6 through 3.13 and both CPython and PyPy implementations.
Use it for:
- Monitor request latency and throughput in Django or Flask applications to identify performance bottlenecks.
- Capture and centralize error traces across distributed microservices for root-cause analysis.
- Track database query performance and external API call latencies within your application.
- Instrument custom Python applications or WSGI servers to send performance data to Elastic Stack.
- Correlate application metrics with infrastructure monitoring in a unified Elastic dashboard.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Elastic APM is the official Python agent for Elastic Application Performance Monitoring, instrumenting web frameworks like Django and Flask to capture performance metrics, errors, and traces for centralized monitoring.
Yes. Elastic APM is actively maintained, has low install friction, carries no known vulnerabilities, and is the official agent for a widely-used monitoring platform. Install it if you run applications on Elastic APM Server or plan to adopt centralized performance monitoring; skip it if you have no APM infrastructure or use a different monitoring vendor.
Install
elastic-apm on PyPI
pip
pip install elastic-apmuv
uv add elastic-apmpoetry
poetry add elastic-apmInstalling elastic-apm
Before you install
Low install friction with a pure-Python wheel and four lightweight runtime dependencies. Actively maintained with recent release activity.
License in practice
BSD license is permissive; you can use, modify, and distribute this package freely in commercial and private projects.
Quickstart
pip install elastic-apm
import elasticapm
client = elasticapm.Client({'SERVICE_NAME': 'my-app'})
# Automatically instruments supported frameworks; manual capture available via client methods
Requires a running Elastic APM Server to send data to; without it, the agent will not report metrics or traces.
Verify before relying
- Exact scope of framework auto-instrumentation support beyond Django and Flask.
- Whether WSGI custom integration requires code changes or configuration only.
- Performance overhead and memory footprint in production deployments.
- Specific APM Server version compatibility requirements.
Package facts
| License | BSD (permissive) |
| Python support | supports the current Python release (<4,>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — urllib3, certifi, wrapt, ecs_logging |
| Maintenance | actively maintained — 53 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,753,102/month — #3,590 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: elastic_apm-6.26.2-py2.py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
scout-apmScout APM is a Python application performance…
permissive · top 15,000 on PyPI
newrelicInstruments Python web applications to collect…
permissive · top 5,000 on PyPI
elastic-opentelemetryElastic's customized distribution of…
permissive · top 15,000 on PyPI
opentelemetry-instrumentation-flaskAdds distributed tracing to Flask web…
permissive · top 1,000 on PyPI
opentelemetry-instrumentation-wsgiProvides WSGI middleware for OpenTelemetry that…
permissive · top 1,000 on PyPI
elastic-agent-clientA Python client library for communicating with…
unclear · top 15,000 on PyPI
apm-cliAPM is a dependency manager and configuration…
permissive · top 15,000 on PyPI
ecs-loggingFormats Python logs as Elastic Common Schema…
permissive · top 5,000 on PyPI
newrelic-apiA Python client for interacting with New…
permissive · top 15,000 on PyPI
appdynamicsA Python agent that instruments and monitors…
unclear · top 15,000 on PyPI