ifdef::env-github[]
NOTE: Release notes are best read in our documentation at
https://www.elastic.co/guide/en/apm/agent/python/current/release-notes.html[elastic.co]
endif::[]

////
[[release-notes-x.x.x]]
==== x.x.x - YYYY-MM-DD

[float]
===== Breaking changes

[float]
===== Features
* Cool new feature: {pull}2526[#2526]

[float]
===== Bug fixes
////

//=== Unreleased

// Unreleased changes go here
// When the next release happens, nest these changes under the "Python Agent version 6.x" heading
//[float]
//===== Features
//
//[float]
//===== Bug fixes
//

[[release-notes-6.x]]
=== Python Agent version 6.x

[[release-notes-6.26.2]]
==== 6.26.2 - 2026-06-22

[float]
===== Bug fixes

* Fix httpcore instrumentation handling of default port {pull}2669[#2669]
* Handle FastAPI 0.137 ``_IncludedRouter`` in route name resolution {pull}2682[#2682]

[[release-notes-6.26.1]]
==== 6.26.1 - 2026-05-25

[float]
===== Bug fixes

* Make AWS lambda layers publication more robust against regions failure {pull}2658[#2658]

[[release-notes-6.26.0]]
==== 6.26.0 - 2026-05-25

[float]
===== Bug fixes

* Remove usage of modules and patterns deprecated on recent Python versions {pull}2531[#2531]
* Avoid warnings reading recent Flask versions {pull}2635[#2635]
* Add back instrumentation of the connection object with ``psycopg[pool]`` {pull}2460[#2460]
* Fix GRPC target reporting when it does not contain the port {pull}2584[#2584]
* Do not consider canceled span available for compression {pull}2651[#2651]

[[release-notes-6.25.0]]
==== 6.25.0 - 2025-12-23

[float]
===== Features

* Introduce `ELASTIC_APM_SKIP_SERVER_INFO` to reduce overhead on serverless with APM server 8.7.1+ {pull}2516[#2516]
* List all exported symbols in elasticapm module  `__all__` {pull}2504[#2504]

[float]
===== Bug fixes

* Handle Tornado 6.5.3 `HttpHeaders` `in` operator behavior change {pull}2512[#2512]

[[release-notes-6.24.1]]
==== 6.24.1 - 2025-11-21

[float]
===== Bug fixes

* Fix handling of psycopg ServerCursor and AsyncServerCursor instrumentation {pull}2489[#2489]
* Fix contrib/opentelemetry set_status to match base signature {pull}2457[#2457]

[[release-notes-6.24.0]]
==== 6.24.0 - 2025-08-12

[float]
===== Features

* Add support for recent sanic versions {pull}2190[#2190], {pull}2194[#2194]
* Make server certificate verification mandatory in fips mode {pull}2227[#2227]
* Add support Python 3.13 {pull}2216[#2216]
* Add support for azure-data-tables package for azure instrumentation {pull}2187[#2187]
* Add span links from SNS messages {pull}2363[#2363]

[float]
===== Bug fixes

* Fix psycopg2 cursor execute and executemany signatures {pull}2331[#2331]
* Fix psycopg cursor execute and executemany signatures {pull}2332[#2332]
* Fix asgi middleware distributed tracing {pull}2334[#2334]
* Fix typing of start in Span / capture_span to float {pull}2335[#2335]
* Fix azure instrumentation client_class and metrics sets invocation {pull}2337[#2337]
* Fix mysql_connector instrumentation connection retrieval {pull}2344[#2344]
* Remove spurious Django QuerySet evaluation in case of database errors {pull}2158[#2158]

[[release-notes-6.23.0]]
==== 6.23.0 - 2024-07-30

[float]
===== Features

* Make published Docker images multi-platform with the addition of linux/arm64 {pull}2080[#2080]

[float]
===== Bug fixes

* Fix handling consumer iteration if transaction not sampled in kafka instrumentation {pull}2075[#2075]
* Fix race condition with urllib3 at shutdown {pull}2085[#2085]
* Fix compatibility with setuptools>=72 that removed test command {pull}2090[#2090]

===== Deprecations

* Python 3.6 support will be removed in version 7.0.0 of the agent
* The log shipping LoggingHandler will be removed in version 7.0.0 of the agent.
* The log shipping feature in the Flask instrumentation will be removed in version 7.0.0 of the agent.
* The log shipping feature in the Django instrumentation will be removed in version 7.0.0 of the agent.
* The OpenTracing bridge will be removed in version 7.0.0 of the agent.
* Celery 4.0 support is deprecated because it's not installable anymore with a modern pip

[[release-notes-6.22.3]]
==== 6.22.3 - 2024-06-10

[float]
===== Bug fixes

* Fix outcome in ASGI and Starlette apps on error status codes without an exception {pull}2060[#2060]

[[release-notes-6.22.2]]
==== 6.22.2 - 2024-05-20

[float]
===== Bug fixes

* Fix CI release workflow {pull}2046[#2046]

[[release-notes-6.22.1]]
==== 6.22.1 - 2024-05-17

[float]
===== Features

* Relax wrapt dependency to only exclude 1.15.0 {pull}2005[#2005]

[[release-notes-6.22.0]]
==== 6.22.0 - 2024-04-03

[float]
===== Features

* Add ability to override default JSON serialization {pull}2018[#2018]

[[release-notes-6.21.4]]
==== 6.21.4 - 2024-03-19

[float]
===== Bug fixes

* Fix urllib3 2.0.1+ crash with many args {pull}2002[#2002]

[[release-notes-6.21.3]]
==== 6.21.3 - 2024-03-08

[float]
===== Bug fixes

* Fix artifacts download in CI workflows {pull}1996[#1996]

[[release-notes-6.21.2]]
==== 6.21.2 - 2024-03-07

[float]
===== Bug fixes

* Fix artifacts upload in CI build-distribution workflow {pull}1993[#1993]

[[release-notes-6.21.1]]
==== 6.21.1 - 2024-03-07

[float]
===== Bug fixes

* Fix CI release workflow {pull}1990[#1990]

[[release-notes-6.21.0]]
==== 6.21.0 - 2024-03-06

[float]
===== Bug fixes

* Fix starlette middleware setup without client argument {pull}1952[#1952]
* Fix blocking of gRPC stream-to-stream requests {pull}1967[#1967]
* Always take into account body reading time for starlette requests {pull}1970[#1970]
* Make urllib3 transport tests more robust against local env {pull}1969[#1969]
* Clarify starlette integration documentation {pull}1956[#1956]
* Make dbapi2 query scanning for dollar quotes a bit more correct {pull}1976[#1976]
* Normalize headers in AWS Lambda integration on API Gateway v1 requests {pull}1982[#1982]

[[release-notes-6.20.0]]
==== 6.20.0 - 2024-01-10

[float]
===== Features

* Async support for dbapi2 (starting with psycopg) {pull}1944[#1944]
* Add object name to procedure call spans in dbapi2 {pull}1938[#1938]
* Add support for python 3.10 and 3.11 lambda runtimes

[float]
===== Bug fixes

* Fix asyncpg support for 0.29+ {pull}1935[#1935]
* Fix dbapi2 signature extraction to handle square brackets in table name {pull}1947[#1947]

[float]
===== Pending Deprecations

* The log shipping LoggingHandler will be removed in version 7.0.0 of the agent.

[[release-notes-6.19.0]]
==== 6.19.0 - 2023-10-11

[float]
===== Features

* Add Python 3.12 support
* Collect the `configured_hostname` and `detected_hostname` separately, and switch to FQDN for the `detected_hostname`. {pull}1891[#1891]
* Improve postgres dollar-quote detection to be much faster {pull}1905[#1905]

[float]
===== Bug fixes

* Fix url argument fetching in aiohttp_client instrumentation {pull}1890[#1890]
* Fix a bug in the AWS Lambda instrumentation when `event["headers"] is None` {pull}1907[#1907]
* Fix a bug in AWS Lambda where metadata could be incomplete, causing validation errors with the APM Server {pull}1914[#1914]
* Fix a bug in AWS Lambda where sending the partial transaction would be
recorded as an extra span {pull}1914[#1914]

[float]
===== Pending Deprecations

* The log shipping feature in the Flask instrumentation will be removed in version 7.0.0 of the agent.

[[release-notes-6.18.0]]
==== 6.18.0 - 2023-07-25

[float]
===== Features

* Add support for grpc aio server interceptor {pull}1870[#1870]

[float]
===== Bug fixes

* Fix a bug in the Elasticsearch client instrumentation which was causing loss of database context (including statement) when interacting with Elastic Cloud {pull}1878[#1878]

[[release-notes-6.17.0]]
==== 6.17.0 - 2023-07-03

[float]
==== Features
* Add `server_ca_cert_file` option to provide custom CA certificate {pull}1852[#1852]
* Add `include_process_args` option to allow users to opt-in to collecting process args {pull}1867[#1867]

[float]
===== Bug fixes
* Fix a bug in the GRPC instrumentation when reaching the maximum amount of spans per transaction {pull}1861[#1861]

[[release-notes-6.16.2]]
==== 6.16.2 - 2023-06-12

[float]
===== Bug fixes

* Fix compatibility issue with older versions of OpenSSL in lambda runtimes {pull}1847[#1847]
* Add `latest` tag to docker images {pull}1848[#1848]
* Fix issue with redacting `user:pass` in URLs in Python 3.11.4 {pull}1850[#1850]

[[release-notes-6.16.1]]
==== 6.16.1 - 2023-06-06

[float]
===== Bug fixes

* Fix release process for docker and the lambda layer {pull}1845[#1845]

[[release-notes-6.16.0]]
==== 6.16.0 - 2023-06-05

[float]
===== Features

* Add lambda layer for instrumenting AWS Lambda functions {pull}1826[#1826]
* Implement instrumentation of Azure Functions {pull}1766[#1766]
* Add support for Django to wrapper script {pull}1780[#1780]
* Add support for Starlette to wrapper script {pull}1830[#1830]
* Add `transport_json_serializer` configuration option {pull}1777[#1777]
* Add S3 bucket and key name to OTel attributes {pull}1790[#1790]
* Implement partial transaction support in AWS lambda {pull}1784[#1784]
* Add instrumentation for redis.asyncio {pull}1807[#1807]
* Add support for urllib3 v2.0.1+ {pull}1822[#1822]
* Add `service.environment` to log correlation {pull}1833[#1833]
* Add `ecs_logging` as a dependency {pull}1840[#1840]
* Add support for synchronous psycopg3 {pull}1841[#1841]

[float]
===== Bug fixes

* Fix spans being dropped if they don't have a name {pull}1770[#1770]
* Fix AWS Lambda support when `event` is not a dict {pull}1775[#1775]
* Fix deprecation warning with urllib3 2.0.0 pre-release versions {pull}1778[#1778]
* Fix `activation_method` to only send to APM server 8.7.1+ {pull}1787[#1787]
* Fix span.context.destination.service.resource for S3 spans to have an "s3/" prefix. {pull}1783[#1783]
+
*Note*: While this is considered a bugfix, it can potentially be a breaking
change in the Kibana APM app: It can break the history of the S3-Spans / metrics
for users relying on `context.destination.service.resource`. If users happen to
run agents both with and without this fix (for same or different languages), the
same S3-buckets can appear twice in the service map (with and without
s3-prefix).
* Fix instrumentation to not bubble up exceptions during instrumentation {pull}1791[#1791]
* Fix HTTP transport to not print useless and confusing stack trace {pull}1809[#1809]

[[release-notes-6.15.1]]
==== 6.15.1 - 2023-03-06

[float]
===== Bug fixes

* Fix issue with botocore instrumentation creating spans with an incorrect `service.name` {pull}1765[#1765]
* Fix a bug in the GRPC instrumentation when the agent is disabled or not recording {pull}1761[#1761]

[[release-notes-6.15.0]]
==== 6.15.0 - 2023-02-16

[float]
===== Features

* Add `service.agent.activation_method` to the metadata {pull}1743[#1743]

[float]
===== Bug fixes

* Small fix to underlying Starlette logic to prevent duplicate Client objects {pull}1735[#1735]
* Change `server_url` default to `http://127.0.0.1:8200` to avoid ipv6 ambiguity {pull}1744[#1744]
* Fix an issue in GRPC instrumentation with unsampled transactions {pull}1740[#1740]
* Fix error in async Elasticsearch instrumentation when spans are dropped {pull}1758[#1758]

[[release-notes-6.14.0]]
==== 6.14.0 - 2023-01-30

[float]
===== Features

* GRPC support {pull}1703[#1703]
* Wrapper script Flask support (experimental) {pull}1709[#1709]

[float]
===== Bug fixes

* Fix an async issue with long elasticsearch queries {pull}1725[#1725]
* Fix a minor inconsistency with the W3C tracestate spec {pull}1728[#1728]
* Fix a cold start performance issue with our AWS Lambda integration {pull}1727[#1727]
* Mark `**kwargs` config usage in our AWS Lambda integration as deprecated {pull}1727[#1727]

[[release-notes-6.13.2]]
==== 6.13.2 - 2022-11-17

[float]
===== Bug fixes

* Fix error in Elasticsearch instrumentation when spans are dropped {pull}1690[#1690]
* Lower log level for errors in APM Server version fetching {pull}1692[#1692]
* Fix for missing parent.id when logging from a DroppedSpan under a leaf span {pull}1695[#1695]

[[release-notes-6.13.1]]
==== 6.13.1 - 2022-11-03

[float]
===== Bug fixes

* Fix elasticsearch instrumentation for track_total_hits=False {pull}1687[#1687]

[[release-notes-6.13.0]]
==== 6.13.0 - 2022-10-26

[float]
===== Features
 * Add support for Python 3.11
 * Add backend granularity data to SQL backends as well as Cassandra and pymongo {pull}1585[#1585], {pull}1639[#1639]
 * Add support for instrumenting the Elasticsearch 8 Python client {pull}1642[#1642]
 * Add `*principal*` to default `sanitize_field_names` configuration {pull}1664[#1664]
 * Add docs and better support for custom metrics, including in AWS Lambda {pull}1643[#1643]
 * Add support for capturing span links from AWS SQS in AWS Lambda {pull}1662[#1662]

[float]
===== Bug fixes

* Fix Django's `manage.py check` when agent is disabled {pull}1632[#1632]
* Fix an issue with long body truncation for Starlette {pull}1635[#1635]
* Fix an issue with transaction outcomes in Flask for uncaught exceptions {pull}1637[#1637]
* Fix Starlette instrumentation to make sure transaction information is still present during exception handling {pull}1674[#1674]


[[release-notes-6.12.0]]
==== 6.12.0 - 2022-09-07

[float]
===== Features

* Add redis query to context data for redis instrumentation {pull}1406[#1406]
* Add AWS request ID to all botocore spans (at `span.context.http.request.id`) {pull}1625[#1625]

[float]
===== Bug fixes

* Differentiate Lambda URLs from API Gateway in AWS Lambda integration {pull}1609[#1609]
* Restrict the size of Django request bodies to prevent APM Server rejection {pull}1610[#1610]
* Restrict length of `exception.message` for exceptions captured by the agent {pull}1619[#1619]
* Restrict length of Starlette request bodies {pull}1549[#1549]
* Fix error when using elasticsearch(sniff_on_start=True) {pull}1618[#1618]
* Improve handling of ignored URLs and capture_body=off for Starlette {pull}1549[#1549]
* Fix possible error in the transport flush for Lambda functions {pull}1628[#1628]

[[release-notes-6.11.0]]
==== 6.11.0 - 2022-08-09

[float]
===== Features

* Added lambda support for ELB triggers {pull}1605[#1605]

[[release-notes-6.10.2]]
==== 6.10.2 - 2022-08-04

[float]
===== Bug fixes

* Fixed an issue with non-integer ports in Django {pull}1590[#1590]
* Fixed an issue with non-integer ports in Redis {pull}1591[#1591]
* Fixed a performance issue for local variable shortening via `varmap()` {pull}1593[#1593]
* Fixed `elasticapm.label()` when a Client object is not available {pull}1596[#1596]

[[release-notes-6.10.1]]
==== 6.10.1 - 2022-06-30

[float]
===== Bug fixes

* Fix an issue with Kafka instrumentation and unsampled transactions {pull}1579[#1579]

[[release-notes-6.10.0]]
==== 6.10.0 - 2022-06-22

[float]
===== Features

* Add instrumentation for https://github.com/aio-libs/aiobotocore[`aiobotocore`] {pull}1520[#1520]
* Add instrumentation for https://kafka-python.readthedocs.io/en/master/[`kafka-python`] {pull}1555[#1555]
* Add API for span links, and implement span link support for OpenTelemetry bridge {pull}1562[#1562]
* Add span links to SQS ReceiveMessage call {pull}1575[#1575]
* Add specific instrumentation for SQS delete/batch-delete {pull}1567[#1567]
* Add `trace_continuation_strategy` setting {pull}1564[#1564]

[float]
===== Bug fixes

* Fix return for `opentelemetry.Span.is_recording()` {pull}1530[#1530]
* Fix error logging for bad SERVICE_NAME config {pull}1546[#1546]
* Do not instrument old versions of Tornado > 6.0 due to incompatibility {pull}1566[#1566]
* Fix transaction names for class based views in Django 4.0+ {pull}1571[#1571]
* Fix a problem with our logging handler failing to report internal errors in its emitter {pull}1568[#1568]


[[release-notes-6.9.1]]
==== 6.9.1 - 2022-03-30

[float]
===== Bug fixes

* Fix `otel_attributes`-related regression with older versions of APM Server (<7.16) {pull}1510[#1510]

[[release-notes-6.9.0]]
==== 6.9.0 - 2022-03-29

[float]
===== Features

* Add OpenTelemetry API bridge {pull}1411[#1411]
* Change default for `sanitize_field_names` to sanitize `*auth*` instead of `authorization` {pull}1494[#1494]
* Add `span_stack_trace_min_duration` to replace deprecated `span_frames_min_duration` {pull}1498[#1498]
* Enable exact_match span compression by default {pull}1504[#1504]
* Allow parent celery tasks to specify the downstream `parent_span_id` in celery headers {pull}1500[#1500]

[float]
===== Bug fixes

* Fix Sanic integration to properly respect the `capture_body` config {pull}1485[#1485]
* Lambda fixes to align with the cross-agent spec {pull}1489[#1489]
* Lambda fix for custom `service_name` {pull}1493[#1493]
* Change default for `stack_trace_limit` from 500 to 50 {pull}1492[#1492]
* Switch all duration handling to use `datetime.timedelta` objects {pull}1488[#1488]

[[release-notes-6.8.1]]
==== 6.8.1 - 2022-03-09

[float]
===== Bug fixes

* Fix `exit_span_min_duration` and disable by default {pull}1483[#1483]

[[release-notes-6.8.0]]
==== 6.8.0 - 2022-02-22

[float]
===== Features
 * use "unknown-python-service" as default service name if no service name is configured {pull}1438[#1438]
 * add transaction name to error objects {pull}1441[#1441]
 * don't send unsampled transactions to APM Server 8.0+ {pull}1442[#1442]
 * implement snapshotting of certain configuration during transaction lifetime {pull}1431[#1431]
 * propagate traceparent IDs via Celery {pull}1371[#1371]
 * removed Python 2 compatibility shims {pull}1463[#1463]
 ** Note: Python 2 support was already removed with version 6.0 of the agent, this now removes unused compatibilit shims.

[float]
===== Bug fixes
 * fix span compression for redis, mongodb, cassandra and memcached {pull}1444[#1444]
 * fix recording of status_code for starlette {pull}1466[#1466]
 * fix aioredis span context handling {pull}1462[#1462]

[[release-notes-6.7.2]]
==== 6.7.2 - 2021-12-07

[float]
===== Bug fixes
* fix AttributeError in sync instrumentation of httpx {pull}1423[#1423]
* add setting to disable span compression, default to disabled {pull}1429[#1429]

[[release-notes-6.7.1]]
==== 6.7.1 - 2021-11-29

[float]
===== Bug fixes

* fix an issue with Sanic exception tracking {pull}1414[#1414]
* asyncpg: Limit SQL queries in context data to 10000 characters {pull}1416[#1416]


[[release-notes-6.7.0]]
==== 6.7.0 - 2021-11-17

[float]
===== Features

* Add support for Sanic framework {pull}1390[#1390]

[float]
===== Bug fixes

* fix compatibility issues with httpx 0.21 {pull}1403[#1403]
* fix `span_compression_exact_match_max_duration` default value {pull}1407[#1407]

[[release-notes-6.6.3]]
==== 6.6.3 - 2021-11-15

[float]
===== Bug fixes

 * fix an issue with `metrics_sets` configuration referencing the `TransactionMetricSet` removed in 6.6.2 {pull}1397[#1397]

[[release-notes-6.6.2]]
==== 6.6.2 - 2021-11-10

[float]
===== Bug fixes

* Fix an issue where compressed spans would count against `transaction_max_spans` {pull}1377[#1377]
* Make sure HTTP connections are not re-used after a process fork {pull}1374[#1374]
* Fix an issue with psycopg2 instrumentation when multiple hosts are defined {pull}1386[#1386]
* Update the `User-Agent` header to the new https://github.com/elastic/apm/pull/514[spec] {pull}1378[#1378]
* Improve status_code handling in AWS Lambda integration {pull}1382[#1382]
* Fix `aiohttp` exception handling to allow for non-500 responses including `HTTPOk` {pull}1384[#1384]
* Force transaction names to strings {pull}1389[#1389]

[float]
===== Other

* Remove unused `http.request.socket.encrypted` context field {pull}1332[#1332]
* Remove unused transaction metrics (APM Server handles these metrics instead) {pull}1388[#1388]

[[release-notes-6.6.1]]
==== 6.6.1 - 2021-11-02

[float]
===== Bug fixes

* Fix some context fields and metadata handling in AWS Lambda support {pull}1368[#1368]

[[release-notes-6.6.0]]
==== 6.6.0 - 2021-10-18

[float]
===== Features

* Add experimental support for AWS lambda instrumentation {pull}1193[#1193]
* Add support for span compression {pull}1321[#1321]
* Auto-infer destination resources for easier instrumentation of new resources {pull}1359[#1359]
* Add support for dropped span statistics {pull}1327[#1327]

[float]
===== Bug fixes

* Ensure that Prometheus histograms are encoded correctly for APM Server {pull}1354[#1354]
* Remove problematic (and duplicate) `event.dataset` from logging integrations {pull}1365[#1365]
* Fix for memcache instrumentation when configured with a unix socket {pull}1357[#1357]


[[release-notes-6.5.0]]
==== 6.5.0 - 2021-10-04

[float]
===== Features

* Add instrumentation for Azure Storage (blob/table/fileshare) and Azure Queue {pull}1316[#1316]

[float]
===== Bug fixes

* Improve span coverage for `asyncpg` {pull}1328[#1328]
* aiohttp: Correctly pass custom client to tracing middleware {pull}1345[#1345]
* Fixed an issue with httpx instrumentation {pull}1337[#1337]
* Fixed an issue with Django 4.0 removing a private method {pull}1347[#1347]


[[release-notes-6.4.0]]
==== 6.4.0 - 2021-08-31

[float]
===== Features

* Rename the experimental `log_ecs_formatting` config to `log_ecs_reformatting` {pull}1300[#1300]
* Add support for Prometheus histograms {pull}1165[#1165]

[float]
===== Bug fixes

* Fixed cookie sanitization when Cookie is capitalized {pull}1301[#1301]
* Fix a bug with exception capturing for bad UUIDs {pull}1304[#1304]
* Fix potential errors in json serialization {pull}1203[#1203]
* Fix an issue with certain aioredis commands {pull}1308[#1308]

[[release-notes-6.3.3]]
==== 6.3.3 - 2021-07-14

[float]
===== Bug fixes

* ensure that the elasticsearch instrumentation handles DroppedSpans correctly {pull}1190[#1190]

[[release-notes-6.3.2]]
==== 6.3.2 - 2021-07-07

[float]
===== Bug fixes

* Fix handling of non-http scopes in Starlette/FastAPI middleware {pull}1187[#1187]

[[release-notes-6.3.1]]
==== 6.3.1 - 2021/07/07

[float]
===== Bug fixes

* Fix issue with Starlette/FastAPI hanging on startup {pull}1185[#1185]

[[release-notes-6.3.0]]
==== 6.3.0 - 2021/07/06

[float]
===== Features

* Add additional context information about elasticsearch client requests {pull}1108[#1108]
* Add `use_certifi` config option to allow users to disable `certifi` {pull}1163[#1163]

[float]
===== Bug fixes

* Fix for Starlette 0.15.0 error collection {pull}1174[#1174]
* Fix for Starlette static files {pull}1137[#1137]

[[release-notes-6.2.3]]
==== 6.2.3 - 2021/06/28

[float]
===== Bug fixes
 * suppress the default_app_config attribute in Django 3.2+ {pull}1155[#1155]
 * bump log level for multiple set_client calls to WARNING {pull}1164[#1164]
 * fix issue with adding disttracing to SQS messages when dropping spans {pull}1170[#1170]

[[release-notes-6.2.2]]
==== 6.2.2 - 2021/06/07

[float]
===== Bug fixes
 * Fix an attribute access bug introduced in 6.2.0 {pull}1149[#1149]

[[release-notes-6.2.1]]
==== 6.2.1 - 2021/06/03

[float]
===== Bug fixes
 * catch and log exceptions in interval timer threads {pull}1145[#1145]

[[release-notes-6.2.0]]
==== 6.2.0 - 2021/05/31

[float]
===== Features
 * Added support for aioredis 1.x {pull}1082[#2526]
 * Added support for aiomysql {pull}1107[#1107]
 * Added Redis pub/sub instrumentation {pull}1129[#1129]
 * Added specific instrumentation for AWS SQS {pull}1123[#1123]

[float]
===== Bug fixes
 * ensure metrics are flushed before agent shutdown {pull}1139[#1139]
 * added safeguard for exceptions in processors {pull}1138[#1138]
 * ensure sockets are closed which were opened for cloud environment detection {pull}1134[#1134]

[[release-notes-6.1.3]]
==== 6.1.3 - 2021/04/28

[float]
===== Bug fixes
 * added destination information to asyncpg instrumentation {pull}1115[#1115]
 * fixed issue with collecting request meta data with Django REST Framework {pull}1117[#1117]
 * fixed httpx instrumentation for newly released httpx 0.18.0 {pull}1118[#1118]


[[release-notes-6.1.2]]
==== 6.1.2 - 2021/04/14

[float]
===== Bug fixes

 * fixed issue with empty transaction name for the root route with Django {pull}1095[#1095]
 * fixed on-the-fly initialisation of Flask apps {pull}1099[#1099]

[[release-notes-6.1.1]]
==== v6.1.1 - 2021/04/08

[float]
===== Bug fixes

 * fixed a validation issue with the newly introduced instrumentation for S3, SNS and DynamoDB {pull}1090[#1090]

[[release-notes-6.1.0]]
==== v6.1.0 - 2021/03/31

[float]
===== Features

* Add global access to Client singleton object at `elasticapm.get_client()` {pull}1043[#1043]
* Add `log_ecs_formatting` config option {pull}1058[#1058] {pull}1063[#1063]
* Add instrumentation for httplib2 {pull}1031[#1031]
* Add better instrumentation for some AWS services (S3, SNS, DynamoDB) {pull}1054[#1054]
* Added beta support for collecting metrics from prometheus_client {pull}1083[#1083]


[float]
===== Bug fixes

* Fix for potential `capture_body: error` hang in Starlette/FastAPI {pull}1038[#1038]
* Fix a rare error around processing stack frames {pull}1012[#1012]
* Fix for Starlette/FastAPI to correctly capture request bodies as strings {pull}1042[#1041]
* Fix transaction names for Starlette Mount routes {pull}1037[#1037]
* Fix for elastic excepthook arguments {pull}1050[#1050]
* Fix issue with remote configuration when resetting config values {pull}1068[#1068]
* Use a label for the elasticapm Django app that is compatible with Django 3.2 validation {pull}1064[#1064]
* Fix an issue with undefined routes in Starlette {pull}1076[#1076]

[[release-notes-6.0.0]]
==== v6.0.0 - 2021/02/01

[float]
===== Breaking changes

* Python 2.7 and 3.5 support has been deprecated. The Python agent now requires Python 3.6+ {pull}1021[#1021]
* No longer collecting body for `elasticsearch-py` `update` and `delete_by_query` {pull}1013[#1013]
* Align `sanitize_field_names` config with the
  https://github.com/elastic/apm/blob/3fa78e2a1eeea81c73c2e16e96dbf6b2e79f3c64/specs/agents/sanitization.md[cross-agent spec].
  If you are using a non-default `sanitize_field_names`, surrounding each of your entries with stars (e.g.
  `*secret*`) will retain the old behavior. {pull}982[#982]
* Remove credit card sanitization for field values. This improves performance, and the security value of this check was
  dubious anyway. {pull}982[#982]
* Remove HTTP querystring sanitization. This improves performance, and is meant to standardize behavior across the
  agents, as defined in https://github.com/elastic/apm/pull/334. {pull}982[#982]
* Remove `elasticapm.tag()` (deprecated since 5.0.0) {pull}1034[#1034]

[float]
===== Bug fixes

* Fix for GraphQL span spamming from scalar fields with required flag {pull}1015[#1015]

[[release-notes-5.x]]
=== Python Agent version 5.x


[[release-notes-5.10.1]]
==== v5.10.1 - 2021/01/20

[float]
===== Bug fixes

* Fix for custom serializers in elasticsearch-py {pull}998[#998]
* Fix large query truncation in psycopg2 {pull}994[#994]
* Fix memory metrics reporting when `memory.usage_in_bytes` is unavailable {pull}987[#987]
* Fix for Starlette/FastAPI integration to properly obey `enabled` config {pull}1000[#1000]

[[release-notes-5.10.0]]
==== v5.10.0 - 2020/11/18
[float]
===== Features

* Implement "sample_rate" property for transactions and spans, and propagate through tracestate {pull}891[#891]
* Add support for callbacks on config changes {pull}912[#912]
* Override `sys.excepthook` to catch all exceptions {pull}943[#943]
* Implement `log_level` config (supports central config) {pull}946[#946]
* Implement `transaction_ignore_urls` config (supports central config) {pull}923[#923]
* Add public API to retrieve trace parent header {pull}956[#956]
* Added support for cgroup memory metrics {pull}846[#846]


[float]
===== Bug fixes

* Fix to collect the whole query body in `elasticsearch-py` {pull}940[#940]
* Fix for GraphQL transaction naming {pull}881[#881]
* Ensure that query string max length is maintained after sanitization {pull}968[#968]
* Adapted kubernetes kubepod regex for detecting kubernetes metadata {pull}958[#958]
* Updated Starlette integration to use the route as transaction name if possible {pull}957[#957]

[[release-notes-5.9.0]]
==== v5.9.0 - 2020/09/23

[float]
===== Features

* Add instrumentation support for https://github.com/encode/httpx[`httpx`] and https://github.com/encode/httpcore[`httpcore`] {pull}898[#898]
* Implement "outcome" property for transactions and spans {pull}899[#899]
* Add support for `asyncpg` {pull}889[#889]

[float]
===== Bug fixes

* Fix validation of config to properly require `required` config items. {pull}927[#927]

[[release-notes-5.8.1]]
==== v5.8.1 - 2020/07/13

[float]
===== Bug fixes

* Updated CLOUD_PROVIDER config to allow for new options defined in https://github.com/elastic/apm/issues/289[#289] {pull}878[#878]
* Fixed a bug in AWS metadata collection on docker containers in AWS Elastic Beanstalk {pull}884[#884]
* Fixed a bug in local variable serialization that could occur in multi-threaded applications {pull}885[#885]

[[release-notes-5.8.0]]
==== v5.8.0 - 2020/06/30

[float]
===== Features

* Added graphql (graphene) support {pull}850[#850]
* Collect cloud provider metadata {pull}826[#826]
* Added `sanitize_field_names` config {pull}860[#860]

[float]
===== Bug fixes

* Fix header fetching for ASGI implementations {pull}856[#856]


[[release-notes-5.7.0]]
==== v5.7.0 - 2020/06/11

[float]
===== Features

 * capture number of affected rows for INSERT/UPDATE/DELETE SQL queries {pull}614[#614]
 * Added instrumentation for AsyncElasticsearch {pull}843[#843]

[float]
===== Bug fixes

* Added error handling around frame processing in Django {pull}837[#837]
* Limit SQL queries in context data to 10000 characters {pull}842[#842]
* Omit the "sync" property on spans by default {pull}854[#854]
* Update the pid/ppid in transport metadata when they change {pull}825[#825]
* Added better error handling around closing the transport {pull}838[#838]
* Fixed an issue with the django admin command not detecting misconfigured server urls {pull}855[#855]


[[release-notes-5.6.0]]
==== v5.6.0 - 2020/05/06

[float]
===== New features
 * Added SERVICE_NODE_NAME config {pull}592[#592]
 * Added instrumentation support for https://github.com/pinterest/pymemcache[`pymemcache`] {pull}812[#812]
 * Added new configuration options `enabled` and `recording` {pull}790[#790]

[float]
===== Bug fixes
 * Fixed an issue with metrics collection raising RuntimeErrors {pull}802[#802]
 * Fixed an issue with getting extended destination data from pymongo {pull}797[#797]
 * Fixed an issue with Tornado instrumentation when Tornado isn't the "main" framework {pull}813[#813]
 * Fixed an issue with streaming requests being consumed by the agent even if capture_body is disabled {pull}817[#817]

[float]
===== Pending Deprecations

 * Python 2.7 suppot will be dropped in version 6.0 of the agent.

[[release-notes-5.5.2]]
==== v5.5.2 - 2020/03/20

[float]
===== Bug fixes
* Fixed an issue with Redis using unix domain sockets and destination information {pull}766[#766]

[[release-notes-5.5.1]]
==== v5.5.1 - 2020/03/19

[float]
===== Bug fixes
* Fixed Starlette middleware when capturing request body while the content-type header is absent {pull}763[#763]

[[release-notes-5.5.0]]
==== v5.5.0 - 2020/03/19

[float]
===== Features
* Added destination information to database/HTTP spans, used for service maps {pull}618[#618]

[float]
===== Deprecations

 * *Python 3.4 is no longer supported.*


[[release-notes-5.4.3]]
==== v5.4.3 - 2020/02/27

https://github.com/elastic/apm-agent-python/compare/v5.4.2\...v5.4.3[Check the diff]

[float]
===== Bug fixes

 * fixed a bug in our aiohttp.client support if used with a yarl URL {pull}733[#733]

[[release-notes-5.4.2]]
==== v5.4.2 - 2020/02/18

https://github.com/elastic/apm-agent-python/compare/v5.4.1\...v5.4.2[Check the diff]

[float]
===== Bug fixes

 * fixed a bug in our celery implementation related to the threading refactor in 5.4.0 {pull}724[#724]

[[release-notes-5.4.1]]
==== v5.4.1 - 2020/02/18

https://github.com/elastic/apm-agent-python/compare/v5.4.0\...v5.4.1[Check the diff]

[float]
===== Bug fixes

 * fixed an issue with a DEBUG log message raising an error in some cases {pull}722[#722]

[[release-notes-5.4.0]]
==== v5.4.0 - 2020/02/17

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:

 * Python 3.4
 * Django 1.8, 1.9 and 1.10
 * Flask < 1.0

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

 * Refactored spawning of background threads {pull}636[#636]
 * Added support for aiohttp client and server {pull}659[#659]
 * Added support for tornado web framework {pull}661[#661]
 * Added support for starlette/fastapi {pull}694[#694]
 * Added support for W3C `traceparent` and `tracestate` headers {pull}660[#660]
 * Added Django 3.0 and Flask 1.1 to the support matrix {pull}667[#667]
 * Added support for aiopg {pull}668[#668]
 * Use Span ID as parent ID in errors if an error happens inside a span {pull}669[#669]
 * Added experimental support for API Key authentication {pull}679[#679]

[float]
===== Bug fixes

 * introduced workaround to avoid instrumenting twice in rare cases {pull}708[#708]


[[release-notes-5.3.3]]
==== v5.3.3 - 2020/01/14

https://github.com/elastic/apm-agent-python/compare/v5.3.2\...v5.3.3[Check the diff]

[float]
===== Bug fixes

 * Fixed an issue with OpenTracing bridge and dropped spans {pull}687[#687]
 * Fixed bug that would make the agent ignore the `hostname` configuration setting {pull}689[#689]

[[release-notes-5.3.2]]
==== v5.3.2 - 2019/11/25

https://github.com/elastic/apm-agent-python/compare/v5.3.1\...v5.3.2[Check the diff]

[float]
===== Bug fixes

 * Added support for IPv6 address format when parsing urls {pull}649[#649]

[[release-notes-5.3.1]]
==== v5.3.1 - 2019/11/18

https://github.com/elastic/apm-agent-python/compare/v5.3.0\...v5.3.1[Check the diff]

[float]
===== New Features

* Added support for shortening dicts in local variables {pull}638[#638]

[[release-notes-5.3.0]]
==== v5.3.0 - 2019/11/14

https://github.com/elastic/apm-agent-python/compare/v5.2.3\...v5.3.0[Check the diff]

[float]
===== New Features

* Added instrumentation for mysql-connector and pymysql {pull}603[#603]
* Implemented stack_trace_limit configuration option {pull}623[#623]
* Autoinsert tracing middleware in django settings {pull}625[#625]

[float]
===== Bug fixes

* Fixed issue with transactions not being captured when errors occur in Flask {pull}635[#635]

[[release-notes-5.2.3]]
==== v5.2.3 - 2019/11/13

https://github.com/elastic/apm-agent-python/compare/v5.2.2\...v5.2.3[Check the diff]

[float]
===== Bug fixes

* Ensure that metrics with value 0 are not collected if they have the `reset_on_collect` flag set {pull}615[#615]
* Unwrap postgres cursor for newly introduced psycopg2 extensions {pull}621[#621]
* Fix pod ID for kubernetes when using the systemd cgroup driver {pull}631[#631]

[[release-notes-5.2.2]]
==== v5.2.2 - 2019/10/16

https://github.com/elastic/apm-agent-python/compare/v5.2.1\...v5.2.2[Check the diff]

[float]
===== Bug fixes
* Fixed an issue where a `cpu_total` of `0` could cause an exception {pull}610[#610], {pull}611[#611]

[[release-notes-5.2.1]]
==== v5.2.1 - 2019/10/09

https://github.com/elastic/apm-agent-python/compare/v5.2.0\...v5.2.1[Check the diff]

[float]
===== Bug fixes
* Fixed an issue with DroppedSpans and logging integration {pull}602[#602]
* Fixed an issue with processors not being applied to chained exceptions {pull}604[#604]

[[release-notes-5.2.0]]
==== v5.2.0 - 2019/10/02

https://github.com/elastic/apm-agent-python/compare/v5.1.2\...v5.2.0[Check the diff]

[float]
===== New Features
* Added automatic tagging of LogRecord objects with transaction, trace, and span IDs via a LogRecordFactory (Python 3.2+) {pull}520[#520], {pull}586[#586]
* Added `logging` filter and record factory for adding transaction, trace, and span IDs {pull}520[#520], {pull}586[#586]
* Added `structlog` processor for adding transaction, trace, and span IDs {pull}520[#520], {pull}586[#586]
* Added new public API calls for getting transaction, trace, and span IDs {pull}520[#520], {pull}586[#586]
* Added support for chained exceptions in Python 3 {pull}596[#596].
Note that chained exceptions will be captured and stored in Elasticsearch, but not yet
visualized in the APM UI. The UI component will be released in an upcoming Kibana release (7.5 or later).
* Added support for using `structlog` for agent logging {pull}591[#591]

[float]
===== Bug fixes
* Drop events immediately if a processor returns a falsy value {pull}585[#585]

[[release-notes-5.1.2]]
==== v5.1.2 - 2019/09/04

https://github.com/elastic/apm-agent-python/compare/v5.1.1\...v5.1.2[Check the diff]

[float]
===== Bugfixes
* Fixed an issue with http server_url and `'VERIFY_SERVER_CERT': False` {pull}570[#570], {pull}578[#578]
* Fixed instrumenting of psycopg2 when using their context manager interface {pull}577[#577], {pull}580[#580]
* Fixed zerorpc tests {pull}581[#581]
* Fixed to correctly check if gevent has patched threading.local {pull}579[#579]

[[release-notes-5.1.1]]
==== v5.1.1 - 2019/08/22

https://github.com/elastic/apm-agent-python/compare/v5.1.0\...v5.1.1[Check the diff]

[float]
===== Bug fixes
* Fixed an issue with empty responses from APM Server's config endpoint {pull}562[#562], {pull}563[#563]
* Fixed Windows tests by avoiding time.sleep in breakdown metrics tests {pull}537[#537], {pull}550[#550]
* Fixed container ID matching to match CloudFoundry Garden container IDs {pull}523[#523], {pull}564[#564]
* Fixed an issue in the urllib instrumentation if no port is set {pull}567[#567]

[float]
===== Other
* Added Python 3.8 RC to the test matrix {pull}565[#565]

[[release-notes-5.1.0]]
==== v5.1.0 - 2019/08/14

https://github.com/elastic/apm-agent-python/compare/v5.0.0\...v5.1.0[Check the diff]

[float]
===== Security issues

* This release fixes CVE-2019-7617

[float]
===== New Features

* Added support for global labels which will be applied to every transaction/error/metric {pull}549[#549]
* Added support for `NO_PROXY` environment variable {pull}458[#458], {pull}551[#551]

[float]
===== Bugfixes

* Fixed an issue with using callables in set_context with unsampled transactions {pull}541[#541], {pull}542[#542]
* Limited the length of error.culprit to 1024 characters {pull}491[#491], {pull}543[#543]
* Fixed an issue with the `instrument` config option {pull}546[#546], {pull}547[#547]
* Limited the amount of distinct metrics to 1000 {pull}540[#540], {pull}544[#544]

[[release-notes-5.0.0]]
==== v5.0.0 - 2019/07/31

https://github.com/elastic/apm-agent-python/compare/v4.2.2\...v5.0.0[Check the diff]

[float]
===== Breaking changes

* Implemented type/subtype/action hierachy for spans. Ensure that you run at least APM Server 6.6 {pull}377[#377]
* renamed tags to labels and changed API. The old API remains for backwards compatibility until 6.0 of the agent {pull}538[#538]

[float]
===== Other changes

* Added support for recording breakdown metrics {pull}535[#535]
* Added support for central config management {pull}511[#511]
* Added instrumentation for `urllib2` (Python 2) / `urllib.request` (Python 3) {pull}464[#464]
* Added `disable_metrics` setting {pull}399[#399]
* Updated elasticsearch instrumentation for 7.x {pull}482[#482], {pull}483[#483]
* Fixed an issue with opentracing-python 2.1 {pull}471[#471]
* Fixed an issue with certificate pinning {pull}497[#497]
* Lowered log level of transport success messages {pull}527[#527], {pull}531[#531]

[[release-notes-4.x]]
=== Python Agent version 4.x

[[release-notes-4.2.2]]
==== v4.2.2 - 2019/04/10

https://github.com/elastic/apm-agent-python/compare/v4.2.1\...v4.2.2[Check the diff]

* Fixed an issue with Celery and the prefork worker pool {pull}444[#444]
* Fixed an issue when running uwsgi without a master process {pull}446[#446]
* Fixed an issue with gevent/eventlet on Python 3.7 {pull}451[#451], {pull}454[#454]
* Introduced `IntervalTimer` and use it instead of `threading.Timer` {pull}452[#452]
* Added license header check as pre-commit hook {pull}456[#456]

[[release-notes-4.2.1]]
==== v4.2.1 - 2019/03/22

https://github.com/elastic/apm-agent-python/compare/v4.2.0\...v4.2.1[Check the diff]

* Fixed an issue with the certificate pinning feature introduced in 4.2.0 {pull}433[#433], {pull}434[#434]
* Fixed incompatibility with eventlet introduced in 4.2.0 {pull}435[#435], {pull}436[#436]

[[release-notes-4.2.0]]
==== v4.2.0 - 2019/03/20

https://github.com/elastic/apm-agent-python/compare/v4.1.0\...v4.2.0[Check the diff]

* Implemented a new transport queue, which should avoid certain deadlock scenarios {pull}411[#411]
* Implemented server certificate pinning {pull}405[#405]
* Moved context.url to context.http.url for requests/urllib3 spans {pull}393[#393], {pull}394[#394]
* Added support for using route as transaction name in Django 2.2+ {pull}86[#86], {pull}396[#396]
* Added some randomness to time between requests to APM Server {pull}426[#426]
* Fixed an issue with custom user models in Django using non-string usernames {pull}397[#397], {pull}398[#398]
* Fixed an issue with sending kubernetes metadata to the API {pull}401[#401], {pull}402[#402]
* Fixed an issue with parsing /proc/stat in RHEL/centos 6 {pull}406[#406], {pull}407[#407]
* Added copyright header to all files, and a CI check {pull}429[#429]

[[release-notes-4.1.0]]
==== v4.1.0 - 2019/01/29

https://github.com/elastic/apm-agent-python/compare/v4.0.3\...v4.1.0[Check the diff]

* Added support for collecting system and process metrics {pull}361[#361]
* Added an OpenTracing bridge {pull}388[#388]
* Added `transaction.sampled` to errors {pull}371[#371]
* Added `transaction.type` to errors {pull}391[#391]
* Added parsing of `/proc/self/cgroup` to capture container meta data {pull}352[#352]
* Added option to configure logging for Flask using a log level {pull}344[#344]
* Added `capture_headers` config option {pull}392[#392]

[[release-notes-4.0.3]]
==== v4.0.3 - 2018/12/24

https://github.com/elastic/apm-agent-python/compare/v4.0.2\...v4.0.3[Check the diff]

* Implemented de-dotting of tag names and context keys {pull}353[#353]
* wrote a quickfix for the boto3/botocore instrumentation {pull}367[#367]
* Fixed an issue with psycopg2 and encoded strings {pull}366[#366]

[[release-notes-4.0.2]]
==== v4.0.2 - 2018/12/05

https://github.com/elastic/apm-agent-python/compare/v4.0.1\...v4.0.2[Check the diff]

* Fixed another issue in the new v2 transport {pull}351[#351]

[[release-notes-4.0.1]]
==== v4.0.1 - 2018/11/16

https://github.com/elastic/apm-agent-python/compare/v4.0.0\...v4.0.1[Check the diff]

* Fixed an issue with instrumenting redis-py 3.0+
* Fixed a multithreading issue that occurs when using threaded workers {pull}335[#335]

[[release-notes-4.0.0]]
==== v4.0.0 - 2018/11/14

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:

* The undocumented `AsyncioHTTPTransport` has been removed.
* The `flush_interval` and `max_queue_size` settings have been removed.
* new settings introduced: `api_request_time` and `api_request_size`.
* Some settings now require a unit for duration or size. See documentation on
configuration for more information.
* The option to provide a custom date for exceptions and messages has been removed.

Other changes:
* on Python 3.7, use https://docs.python.org/3/library/contextvars.html[contextvars] instead of threadlocals for storing
current transaction and span. This is a necessary precursor for full asyncio support. {pull}291[#291]

[[release-notes-3.x]]
=== Python Agent version 3.x

[[release-notes-3.0.2]]
==== v3.0.2 - 2018/10/17

https://github.com/elastic/apm-agent-python/compare/v3.0.1\...v3.0.2[Check the diff]

* Fixed an issue with detecting names of wrapped functions that are partials {pull}294[#294]
* Fixed a bug in Flask instrumentation that could appear together with FlaskAPI {pull}286[#286]

[[release-notes-3.0.1]]
==== v3.0.1 - 2018/08/30


https://github.com/elastic/apm-agent-python/compare/v3.0.0\...v3.0.1[Check the diff]

* Added sanitization for `Set-Cookie` response headers {pull}264[#264]
* Added instrumentation for the non-standard `Connection.execute()` method for SQLite3 {pull}271[#271]
* Added "authorization" to list of sensitive keywords, to ensure that "Authorization"
HTTP headers are properly sanitized {pull}275[#275]
* Taught the Logbook handler how to handle the `stack=False` option {pull}278[#278]
* Fixed a race condition with managing the timer-send thread {pull}279[#279]

[[release-notes-3.0.0]]
==== v3.0.0 - 2018/07/20


https://github.com/elastic/apm-agent-python/compare/v2.2.1\...v3.0.0[Check the diff]

- adapted "black" code formatter for this repository {pull}262[#262]
- **BREAKING**: dropped support for Python 3.3 {pull}242[#242]
- **BREAKING**: changed order of precedence when evaluating configuration {pull}255[#255], {pull}261[#261]
- **BREAKING**: changed default value of `span_frames_min_duration` setting
from `-1` (always collect) to `5` (only collect for spans longer than 5 ms) {pull}243[#243]
- added instrumentation for pymssql {pull}241[#241]
- added instrumentation for pyodbc {pull}238[#238]

[[release-notes-2.x]]
=== Python Agent version 2.x

[[release-notes-2.2.1]]
==== v2.2.1 - 2018/06/13


https://github.com/elastic/apm-agent-python/compare/v2.2.0\...v2.2.1[Check the diff]

- fixed an issue with Django Channels {pull}232[#232], {pull}233[#233]

[[release-notes-2.2.0]]
==== v2.2.0 - 2018/06/13


https://github.com/elastic/apm-agent-python/compare/v2.1.1\...v2.2.0[Check the diff]

- introduced consistent logger name scheme for all elasticapm internal log messages {pull}212[#212]
- added instrumentation of cassandra-driver {pull}205[#205]
- added instrumentation of elasticsearch-py {pull}191[#191]
- added Flask 1.0 to the test matrix {pull}207[#207]
- fixed an issue with our minimalistic SQL parser and "fully qualified" table names {pull}206[#206]
- fixed issue with spans in Django’s `StreamingHTTPResponse` not being captured {pull}201[#201], {pull}202[#202]
- fixed issue with spans with Flask’s streaming response 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]]
==== v2.1.1 - 2018/04/09


https://github.com/elastic/apm-agent-python/compare/v2.1.0\...v2.1.1[Check the diff]

- fixed bug in Django management command that would be triggered on Django 1.10 or 1.11 while using the `MIDDLEWARE_CLASSES` setting {pull}186[#186], {pull}187[#187]
- fix an encoding issue with log messages that are hit in rare cases {pull}188[#188], {pull}189[#189]

[[release-notes-2.1.0]]
==== v2.1.0 - 2018/03/19


https://github.com/elastic/apm-agent-python/compare/v2.0.1\...v2.1.0[Check the diff]

- made skipping of initial `elasticapm` frames for span stack traces more generic {pull}167[#167]
- added `context.process.ppid` field (supported in apm-server 6.3+) {pull}168[#168]
- added option to disable stack frame collection for very short spans {pull}142[#142]
- several bug fixes:
    - fix an issue in boto3 instrumentation with nonstandard endpoint URLs {pull}178[#178]
    - fix bug with OPTIONS requests and body capturing {pull}174[#174]
    - fix issue when message has `%` character, but no params {pull}175[#175]

[[release-notes-2.0.1]]
==== v2.0.1 - 2018/02/15


https://github.com/elastic/apm-agent-python/compare/v2.0.0\...v2.0.1[Check the diff]

- fixed compatibility issue with aiohttp 3.0 {pull}157[#157]
- Added truncation for fields that have a `maxLength` in the JSON Schema {pull}159[#159]

[[release-notes-2.0.0]]
==== v2.0.0 - 2018/02/06


https://github.com/elastic/apm-agent-python/compare/v1.0.0\...v2.0.0[Check the diff]

- moved the library-frame detection from a processor to the stacktrace collection {pull}113[#113].
- added settings to enable/disable source code collection and local variables collection for errors and transactions {pull}117[#117]
- added `service.environment` to provide an environment name (e.g. "production", "staging") {pull}123[#123]
- added `transaction.id` to errors to better correlate errors with transactions {pull}122[#122]
- added `transaction_sample_rate` to define a rate with which transactions are sampled {pull}116[#116]
- added `error.handled` to indicate if an exception was handled or not {pull}124[#124].
- added `transaction_max_spans` setting to limit the amount of spans that are recorded per transaction {pull}127[#127]
- added configuration options to limit captured local variables to a certain length {pull}130[#130]
- added options for configuring the amount of context lines that are captured with each frame {pull}136[#136]
- added support for tracing queries formatted as http://initd.org/psycopg/docs/sql.html[`psycopg2.sql.SQL`] objects {pull}148[#148]
- switched to `time.perf_counter` as timing function on Python 3 {pull}138[#138]
- added option to disable capturing of request body {pull}151[#151]
- BREAKING: Several settings and APIs have been renamed (#111, #119, #143):
    - The decorator for custom instrumentation, `elasticapm.trace`, is now `elasticapm.capture_span`
    - The setting `traces_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_INTERVAL`
    - The `app_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`.
    - The `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]
- BREAKING: added `elasticapm.set_custom_context` in favor of the more generic `set_custom_data` function {pull}133[#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 {pull}137[#137]
- BREAKING: renamed several configuration options to align better with other language agents {pull}145[#145]:
    - `disable_instrumentation` became `instrument` and inverted its meaning
    - `max_event_queue_length` became `max_queue_size`
    - `timeout` became `server_timeout`

[[release-notes-1.x]]
=== Python Agent version 1.x

[[release-notes-1.0.0]]
==== v1.0.0 - 2017/12/11


https://github.com/elastic/apm-agent-python/compare/v1.0.0.dev3\...v1.0.0[Check the diff]

- added `max-event-queue-length` setting. {pull}67[#67]
- changed name that the agent reports itself with to the APM server from `elasticapm-python` to `python`. This aligns the Python agent with other languages. {pull}104[#104]
- changed Celery integration to store the task state (e.g. `SUCCESS` or `FAILURE`) in `transaction.result` {pull}100[#100]
- added setting to disable SSL certificate verification {pull}108[#108]
- BREAKING: renamed `server` configuration variable to `server_url` to better align with other language agents {pull}105[#105]
- BREAKING: removed the old and unused urllib2-based HTTP transport, and renamed the urllib3 transport {pull}107[#107]
- BREAKING: several API changes to `capture_exception`, `capture_message`, and added documentation for these and other APIs {pull}112[#112]

[[release-notes-1.0.0-dev3]]
==== v1.0.0.dev3 - 2017/11/13


https://github.com/elastic/apm-agent-python/compare/v1.0.0.dev2\...v1.0.0.dev2[Check the diff]

- added a background thread to process the transactions queue every 60 seconds (configurable) {pull}68[#68]
- adapted trace context for SQL traces to new API {pull}77[#77]
- ensured that transaction data is also passed through processors {pull}84[#84]
- added `uninstrument` function to reverse instrumentation, and exposed both `instrument` and `uninstrument` as public API in the `elasticapm` namespace {pull}90[#90]
- added normalization of HTTP status codes into classes for the `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]]
==== v1.0.0.dev2 - 2017/09/29


https://github.com/elastic/apm-agent-python/compare/v1.0.0.dev1\...v1.0.0.dev2[Check the diff]

- added request context information for Flask {pull}58[#58]
- added response context information for Flask {pull}65[#65]
- BREAKING: changed the `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]
- BREAKING: removed root trace. Due to historical reason, we used to create a "root trace" which was equivalent to the transaction. This is no longer necessary. #61

[[release-notes-1.0.0-dev1]]
==== v1.0.0.dev1 - 2017/09/18


https://github.com/elastic/apm-agent-python/compare/v1.0.0.dev0\...v1.0.0.dev1[Check the diff]

- unified configuration across supported frameworks {pull}33[#33]
- added in-app frame detection {pull}36[#36]
- added tagging functionality {pull}28[#28]
- preliminary support for Django 2.0 {pull}26[#26]
- initial set of documentation

[[release-notes-1.0.0-dev0]]
==== v1.0.0.dev0 - 2017/08/17

First release of the Python agent for Elastic APM
