NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #3403 most downloaded on PyPI
The official Python module for Elastic APM
Latest stable
6.26.2
Last release 4 months ago
22 Jun 2026
Ships unpredictably
gaps range from 2 weeks to 13 months
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
108 releases · first in 2017
Drag across the ruler to compare, or tap a release to open it.
Updated CLOUD_PROVIDER config to allow for new options defined in #289
[float] ===== Bug fixes
[[release-notes-5.8.0]]
Added graphql (graphene) support [#850]
sanitize_field_names config [#860]Your coding agent can read these notes before it upgrades. Set up the MCP server →
[float] ===== Features
sanitize_field_names config {pull}860[#860][float] ===== Bug fixes
[[release-notes-5.7.0]]
capture number of affected rows for INSERT/UPDATE/DELETE SQL queries
[float] ===== Features
[float] ===== Bug fixes
[[release-notes-5.6.0]]
Added SERVICE_NODE_NAME config [#592]
SERVICE_NODE_NAME config [#592]pymemcache [#812]enabled and recording [#790][float] ===== New features
pymemcache] {pull}812[#812]enabled and recording {pull}790[#790][float] ===== Bug fixes
[float] ===== Pending Deprecations
[[release-notes-5.5.2]]
Fixed an issue with Redis using unix domain sockets and destination information
[float] ===== Bug fixes
[[release-notes-5.5.1]]
Fixed Starlette middleware when capturing request body while the content-type header is absent
[float] ===== Bug fixes
[[release-notes-5.5.0]]
Added destination information to database/HTTP spans, used for service maps
[float] ===== Features
[float] ===== Deprecations
[[release-notes-5.4.3]]
fixed a bug in our aiohttp.client support if used with a yarl URL
https://github.com/elastic/apm-agent-python/compare/v5.4.2...v5.4.3[Check the diff]
[float] ===== Bug fixes
[[release-notes-5.4.2]]
fixed a bug in our celery implementation related to the threading refactor in 5.4.0
https://github.com/elastic/apm-agent-python/compare/v5.4.1...v5.4.2[Check the diff]
[float] ===== Bug fixes
[[release-notes-5.4.1]]
fixed an issue with a DEBUG log message raising an error in some cases
https://github.com/elastic/apm-agent-python/compare/v5.4.0...v5.4.1[Check the diff]
[float] ===== Bug fixes
[[release-notes-5.4.0]]
This will be the last minor release to support the following versions:
This will be the last minor release to support the following versions:
In addition, as of this release we only supported capturing extended information on Elasticsearch queries when using keyword arguments with the elasticsearch-py API. This is in keeping with the upstream policy (https://elasticsearch-py.readthedocs.io/en/master/api.html#api-documentation) of positional arguments being unsupported. (#697)
traceparent and tracestate headers (#660)https://github.com/elastic/apm-agent-python/compare/v5.3.3...v5.4.0[Check the diff]
[float] ===== Deprecations
This will be the last minor release to support the following versions:
In addition, as of this release we only supported capturing extended information on Elasticsearch queries when using keyword arguments with the elasticsearch-py API. This is in keeping with the https://elasticsearch-py.readthedocs.io/en/master/api.html#api-documentation[upstream policy] of positional arguments being unsupported. {pull}697[#697]
[float] ===== New Features
traceparent and tracestate headers {pull}660[#660][float] ===== Bug fixes
[[release-notes-5.3.3]]
Fixed an issue with OpenTracing bridge and dropped spans
hostname configuration setting (#689)https://github.com/elastic/apm-agent-python/compare/v5.3.2...v5.3.3[Check the diff]
[float] ===== Bug fixes
hostname configuration setting {pull}689[#689][[release-notes-5.3.2]]
Added support for IPv6 address format when parsing urls
https://github.com/elastic/apm-agent-python/compare/v5.3.1...v5.3.2[Check the diff]
[float] ===== Bug fixes
[[release-notes-5.3.1]]
Added support for shortening dicts in local variables #638
https://github.com/elastic/apm-agent-python/compare/v5.3.0...v5.3.1[Check the diff]
[float] ===== New Features
[[release-notes-5.3.0]]
added instrumentation for mysql-connector and pymysql
https://github.com/elastic/apm-agent-python/compare/v5.2.3...v5.3.0[Check the diff]
[float] ===== New Features
[float] ===== Bug fixes
[[release-notes-5.2.3]]
ensure that metrics with value 0 are not collected if they have the reset_on_collect flag set
reset_on_collect flag set (#615)https://github.com/elastic/apm-agent-python/compare/v5.2.2...v5.2.3[Check the diff]
[float] ===== Bug fixes
reset_on_collect flag set {pull}615[#615][[release-notes-5.2.2]]
fixed an issue where a cpu_total of 0 could cause an exception (#610, #611)
cpu_total of 0 could cause an exception (#610, #611)https://github.com/elastic/apm-agent-python/compare/v5.2.1...v5.2.2[Check the diff]
[float] ===== Bug fixes
cpu_total of 0 could cause an exception {pull}610[#610], {pull}611[#611][[release-notes-5.2.1]]
fixed an issue with DroppedSpans and logging integration
https://github.com/elastic/apm-agent-python/compare/v5.2.0...v5.2.1[Check the diff]
[float] ===== Bug fixes
[[release-notes-5.2.0]]
added automatic tagging of LogRecord objects with transaction, trace, and span IDs via a LogRecordFactory (Python 3.2+) (#520, #586)
logging filter and record factory for adding transaction, trace, and span IDs (#520, #586)structlog processor for adding transaction, trace, and span IDs (#520, #586)structlog for agent logging (#591)https://github.com/elastic/apm-agent-python/compare/v5.1.2...v5.2.0[Check the diff]
[float] ===== New Features
logging filter and record factory for adding transaction, trace, and span IDs {pull}520[#520], {pull}586[#586]structlog processor for adding transaction, trace, and span IDs {pull}520[#520], {pull}586[#586]structlog for agent logging {pull}591[#591][float] ===== Bug fixes
[[release-notes-5.1.2]]
fixed an issue with http server_url and 'VERIFY_SERVER_CERT': False (#570, #578)
'VERIFY_SERVER_CERT': False (#570, #578)https://github.com/elastic/apm-agent-python/compare/v5.1.1...v5.1.2[Check the diff]
[float] ===== Bugfixes
'VERIFY_SERVER_CERT': False {pull}570[#570], {pull}578[#578][[release-notes-5.1.1]]
fixed an issue with empty responses from APM Server's config endpoint (#562, #563)
https://github.com/elastic/apm-agent-python/compare/v5.1.0...v5.1.1[Check the diff]
[float] ===== Bug fixes
[float] ===== Other
[[release-notes-5.1.0]]
This release fixes CVE-2019-7617 (only relevant if your deployment uses CGI)
NO_PROXY environment variable (#458, #551)instrument config option (#546, #547)https://github.com/elastic/apm-agent-python/compare/v5.0.0...v5.1.0[Check the diff]
[float] ===== Security issues
[float] ===== New Features
NO_PROXY environment variable {pull}458[#458], {pull}551[#551][float] ===== Bugfixes
instrument config option {pull}546[#546], {pull}547[#547][[release-notes-5.0.0]]
implemented type/subtype/action hierachy for spans. Ensure that you run at least APM Server 6.6
urllib2 (Python 2) / urllib.request (Python 3) (#464)disable_metrics setting (#399)https://github.com/elastic/apm-agent-python/compare/v4.2.2...v5.0.0[Check the diff]
[float] ===== Breaking changes
[float] ===== Other changes
urllib2 (Python 2) / urllib.request (Python 3) {pull}464[#464]disable_metrics setting {pull}399[#399][[release-notes-4.x]] === Python Agent version 4.x
[[release-notes-4.2.2]]
fixed an issue with Celery and the prefork worker pool
IntervalTimer and use it instead of threading.Timer (#452)https://github.com/elastic/apm-agent-python/compare/v4.2.1...v4.2.2[Check the diff]
IntervalTimer and use it instead of threading.Timer {pull}452[#452][[release-notes-4.2.1]]
fixed an issue with the certificate pinning feature introduced in 4.2.0 (#433, #434)
https://github.com/elastic/apm-agent-python/compare/v4.2.0...v4.2.1[Check the diff]
[[release-notes-4.2.0]]
Implemented a new transport queue, which should avoid certain deadlock scenarios
https://github.com/elastic/apm-agent-python/compare/v4.1.0...v4.2.0[Check the diff]
[[release-notes-4.1.0]]
Added support for collecting system and process metrics
transaction.sampled to errors (#371)transaction.type to errors (#391)/proc/self/cgroup to capture container meta data (#352)capture_headers config option (#392)https://github.com/elastic/apm-agent-python/compare/v4.0.3...v4.1.0[Check the diff]
transaction.sampled to errors {pull}371[#371]transaction.type to errors {pull}391[#391]/proc/self/cgroup to capture container meta data {pull}352[#352]capture_headers config option {pull}392[#392][[release-notes-4.0.3]]
implemented de-dotting of tag names and context keys
https://github.com/elastic/apm-agent-python/compare/v4.0.2...v4.0.3[Check the diff]
[[release-notes-4.0.2]]
fixed another issue in the new v2 transport
https://github.com/elastic/apm-agent-python/compare/v4.0.1...v4.0.2[Check the diff]
[[release-notes-4.0.1]]
fixed an issue with instrumenting redis-py 3.0+
https://github.com/elastic/apm-agent-python/compare/v4.0.0...v4.0.1[Check the diff]
[[release-notes-4.0.0]]
BREAKING Version 4 of the agent implements a new wire protocol for communicating with the APM Server. This format is only supported in *APM Server 6.5
BREAKING Version 4 of the agent implements a new wire protocol for communicating with the APM Server. This format is only supported in APM Server 6.5+.
Further breaking changes:
AsyncioHTTPTransport has been removed.flush_interval and max_queue_size settings have been removed.api_request_time and api_request_size.Other changes:
https://github.com/elastic/apm-agent-python/compare/v3.0.2...v4.0.0[Check the diff]
BREAKING Version 4 of the agent implements a new wire protocol for communicating with the APM Server. This format is only supported in APM Server 6.5+.
Further breaking changes:
AsyncioHTTPTransport has been removed.flush_interval and max_queue_size settings have been removed.api_request_time and api_request_size.Other changes:
[[release-notes-3.x]] === Python Agent version 3.x
[[release-notes-3.0.2]]
Nothing published for this version
fixed an issue with instrumenting redis-py 3.0+
fixed an issue when logging messages that are not strings (#295, #312)
fixed an issue with detecting names of wrapped functions that are partials
https://github.com/elastic/apm-agent-python/compare/v3.0.1...v3.0.2[Check the diff]
[[release-notes-3.0.1]]
added sanitization for Set-Cookie response headers
Set-Cookie response headers (#264)Connection.execute() method for SQLite3 (#271)stack=False option (#278)https://github.com/elastic/apm-agent-python/compare/v3.0.0...v3.0.1[Check the diff]
Set-Cookie response headers {pull}264[#264]Connection.execute() method for SQLite3 {pull}271[#271]stack=False option {pull}278[#278][[release-notes-3.0.0]]
adapted "black" code formatter for this repository
span_frames_min_duration setting
from -1 (always collect) to 5 (only collect for spans longer than 5 ms) (#243)https://github.com/elastic/apm-agent-python/compare/v2.2.1...v3.0.0[Check the diff]
span_frames_min_duration setting
from -1 (always collect) to 5 (only collect for spans longer than 5 ms) {pull}243[#243][[release-notes-2.x]] === Python Agent version 2.x
[[release-notes-2.2.1]]
fixed an issue with Django Channels (#232, #233)
https://github.com/elastic/apm-agent-python/compare/v2.2.0...v2.2.1[Check the diff]
[[release-notes-2.2.0]]
introduced consistent logger name scheme for all elasticapm internal log messages
StreamingHTTPResponse not being captured (#201, #202)NOTE: This will be the last release with support for Python 3.3.
https://github.com/elastic/apm-agent-python/compare/v2.1.1...v2.2.0[Check the diff]
StreamingHTTPResponse not being captured {pull}201[#201], {pull}202[#202]NOTE: This will be the last release with support for Python 3.3.
[[release-notes-2.1.1]]
fixed bug in Django management command that would be triggered on Django 1.10 or 1.11 while using the MIDDLEWARE_CLASSES setting (#186, #187)
MIDDLEWARE_CLASSES setting (#186, #187)
https://github.com/elastic/apm-agent-python/compare/v2.1.0...v2.1.1[Check the diff]
MIDDLEWARE_CLASSES setting {pull}186[#186], {pull}187[#187][[release-notes-2.1.0]]
made skipping of initial elasticapm frames for span stack traces more generic (\#167)
https://github.com/elastic/apm-agent-python/compare/v2.0.1...v2.1.0[Check the diff]
elasticapm frames for span stack traces more generic {pull}167[#167]context.process.ppid field (supported in apm-server 6.3+) {pull}168[#168]% character, but no params {pull}175[#175][[release-notes-2.0.1]]
fixed compatibility issue with aiohttp 3.0 (\#157)
https://github.com/elastic/apm-agent-python/compare/v2.0.0...v2.0.1[Check the diff]
maxLength in the JSON Schema {pull}159[#159][[release-notes-2.0.0]]
moved the library-frame detection from a processor to the stacktrace collection (\#113).
moved the library-frame detection from a processor to the stacktrace collection (#113).
added settings to enable/disable source code collection and local variables collection for errors and transactions (#117)
added service.environment to provide an environment name (e.g. "production", "staging") (#123)
added transaction.id to errors to better correlate errors with transactions (#122)
added transaction_sample_rate to define a rate with which transactions are sampled (#116)
added error.handled to indicate if an exception was handled or not (#124).
added transaction_max_spans setting to limit the amount of spans that are recorded per transaction (#127)
added configuration options to limit captured local variables to a certain length (#130)
added options for configuring the amount of context lines that are captured with each frame (#136)
added support for tracing queries formatted as psycopg2.sql.SQL objects (#148)
switched to time.perf_counter as timing function on Python 3 (#138)
added option to disable capturing of request body (#151)
BREAKING: Several settings and APIs have been renamed (#111, #119, #143):
elasticapm.trace, is now elasticapm.capture_spantraces_send_frequency has been renamed to flush_interval. The name of the analogous environment variable changed from ELASTIC_APM_TRACES_SEND_FREQ to ELASTIC_APM_FLUSH_INTERVALapp_name setting has been renamed to service_name. The name of the analogous environment variable changed from ELASTIC_APM_APP_NAME to ELASTIC_APM_SERVICE_NAME.app_name arguments to API calls in the whole code base changed to service_name.app_version setting has been renamed to service_version. The name of the analogous environment variable changed from ELASTIC_APM_APP_VERSION to ELASTIC_APM_SERVICE_VERSION.context.request.url.raw has been renamed to context.request.url.full (#121)BREAKING: added elasticapm.set_custom_context in favor of the more generic set_custom_data function (#133)
BREAKING: include_patterns and exclude_patterns now use shell globs instead of regular expressions, and are matched against the full path file path of the module, not against the module name (#137)
BREAKING: renamed several configuration options to align better with other language agents (#145):
disable_instrumentation became instrument and inverted its meaningmax_event_queue_length became max_queue_sizetimeout became server_timeouthttps://github.com/elastic/apm-agent-python/compare/v1.0.0...v2.0.0[Check the diff]
service.environment to provide an environment name (e.g. "production", "staging") {pull}123[#123]transaction.id to errors to better correlate errors with transactions {pull}122[#122]transaction_sample_rate to define a rate with which transactions are sampled {pull}116[#116]error.handled to indicate if an exception was handled or not {pull}124[#124].transaction_max_spans setting to limit the amount of spans that are recorded per transaction {pull}127[#127]psycopg2.sql.SQL] objects {pull}148[#148]time.perf_counter as timing function on Python 3 {pull}138[#138]elasticapm.trace, is now elasticapm.capture_spantraces_send_frequency has been renamed to flush_interval. The name of the analogous environment variable changed from ELASTIC_APM_TRACES_SEND_FREQ to ELASTIC_APM_FLUSH_INTERVALapp_name setting has been renamed to service_name. The name of the analogous environment variable changed from ELASTIC_APM_APP_NAME to ELASTIC_APM_SERVICE_NAME.app_name arguments to API calls in the whole code base changed to service_name.app_version setting has been renamed to service_version. The name of the analogous environment variable changed from ELASTIC_APM_APP_VERSION to ELASTIC_APM_SERVICE_VERSION.context.request.url.raw has been renamed to context.request.url.full {pull}121[#121]elasticapm.set_custom_context in favor of the more generic set_custom_data function {pull}133[#133]include_patterns and exclude_patterns now use shell globs instead of regular expressions, and are matched against the full path file path of the module, not against the module name {pull}137[#137]disable_instrumentation became instrument and inverted its meaningmax_event_queue_length became max_queue_sizetimeout became server_timeout[[release-notes-1.x]] === Python Agent version 1.x
[[release-notes-1.0.0]]
https://github.com/elastic/apm-agent-python/compare/v1.0.0.dev3\...v1.0.0[Check the diff]
https://github.com/elastic/apm-agent-python/compare/v1.0.0.dev3...v1.0.0[Check the diff]
max-event-queue-length setting. {pull}67[#67]elasticapm-python to python. This aligns the Python agent with other languages. {pull}104[#104]SUCCESS or FAILURE) in transaction.result {pull}100[#100]server configuration variable to server_url to better align with other language agents {pull}105[#105]capture_exception, capture_message, and added documentation for these and other APIs {pull}112[#112][[release-notes-1.0.0-dev3]]
added a background thread to process the transactions queue every 60 seconds (configurable)
uninstrument function to reverse instrumentation,
and exposed both instrument and uninstrument as public API in the elasticapm namespace (#90)transaction.result field. A HTTP status of 200
will be turned into HTTP 2xx. The unchanged status code is still available in context.response.status_code.
(#85)https://github.com/elastic/apm-agent-python/compare/v1.0.0.dev2...v1.0.0.dev2[Check the diff]
uninstrument function to reverse instrumentation, and exposed both instrument and uninstrument as public API in the elasticapm namespace {pull}90[#90]transaction.result field. A HTTP status of 200 will be turned into HTTP 2xx. The unchanged status code is still available in context.response.status_code. {pull}85[#85][[release-notes-1.0.0-dev2]]
https://github.com/elastic/apm-agent-python/compare/v1.0.0.dev1\...v1.0.0.dev2[Check the diff]
https://github.com/elastic/apm-agent-python/compare/v1.0.0.dev1...v1.0.0.dev2[Check the diff]
SERVERS list setting to a single SERVER string setting. With this change, we now only support sending events to a single server {pull}59[#59][[release-notes-1.0.0-dev1]]
https://github.com/elastic/apm-agent-python/compare/v1.0.0.dev0\...v1.0.0.dev1[Check the diff]
https://github.com/elastic/apm-agent-python/compare/v1.0.0.dev0...v1.0.0.dev1[Check the diff]
[[release-notes-1.0.0-dev0]]
First release of the Python agent for Elastic APM
First release of the Python agent for Elastic APM
One column per quarter.