• /
  • EnglishEspañol日本語한국어Português
  • 로그인지금 시작하기

Python agent release notesRSS

August 17, 2020
Python agent v5.16.1.146

Notes

This release of the Python agent introduces manylinux wheels and includes bug fixes.

The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.

Bug fixes

  • Data was erroneously discarded when an HTTP protocol error occurred

    When an unexpected HTTP error occurred (such as a timeout), data was erroneously discarded. Data is now downsampled and retransmitted when an HTTP protocol error occurs.

  • Error when installing with an incompatible setuptools_scm version

    The version requirements were not correctly set for the setuptools_scm build time requirement, which may have resulted in an error at installation. The version requirements for setuptools_scm are now set appropriately.

August 10, 2020
Python agent v5.16.0.145

Notes

This release of the Python agent changes the internal http client from requests to urllib3, updates logging, and includes bug fixes.

The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.

Improved Features

  • The NewRelicContextFormatter now records extras

    When using the NewRelicContextFormatter log formatter, extras are now automatically captured and recorded in the New Relic agent logs product.

  • The agent now internally uses urllib3

    The python agent previously used requests as its http client. The agent now uses urllib3 internally for HTTP communication with New Relic data ingest services.

Bug fixes

  • Fix gRPC application crash when credentials are supplied

    When using the credentials argument, the agent's built in gRPC instrumentation caused an application crash. This crash has been fixed.

  • Fix Tornado framework crashes when finish is called from a different task

    When finish is called from a different task, applications using the Tornado framework may crash. This crash has been fixed.

June 18, 2020
Python agent v5.14.1.144

Notes

This release of the Python agent includes a bug fix.

The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.

Bug fixes

  • When using newrelic-admin run-program on Python 2.7 applications failed to start

    Using the newrelic-admin run-program on Python 2.7 with the 5.14.0 agent resulted in an application crash. Applications now start as expected on Python 2.7.

June 2, 2020
Python agent v5.14.0.142

Notes

This release of the Python agent includes improvements to distributed tracing, and bug fixes.

The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.

New Features

  • Add new span attribute transaction.name

    A new attribute, transaction.name, has been added to the root span.

Improved features

  • Transaction attributes are added to the root span

    Transaction attributes, including response attributes, are now added to the root span.

  • Custom attributes are added to the root span

    The public API methods newrelic.agent.add_custom_param and newrelic.agent.add_custom_params now add the specified custom attribute to the root span in addition to the transaction. If the maximum number of custom attributes is reached, span-level custom attributes take precedence over transaction-level custom attributes.

  • Error attributes added to each span/segment

    Error attributes error.class and error.message to all spans that exit without handling an exception.

Bug fixes

  • asyncio: application crash when a transaction that started on a completed parent task exits

    When a transaction that started on a completed parent task exited, an exception was raised. This error has been fixed.

  • Error attributes are no longer added if the error collector is disabled

    If the error collector is disabled via error_collector.enabled, error attributes error.class and error.message are not added to the currently executing span.

Security Updates

Note that changes were made that add attributes to the root span. Transaction-level attribute filtering via the transaction.attribute.exclude configuration setting will not filter the attribute(s) for the root span. Those attributes may unexpectedly start to appear on the root span.

May 4, 2020
Python agent v5.12.1.141

Notes

This release of the Python agent includes bug fixes.

The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.

Bug fixes

  • AIOHTTP http client urls displayed as unknown.url when using YARL URLs

    When passing a YARL url object to the aiohttp client, the agent did not properly parse this URL, resulting in unknown.url being displayed in the UI. The URL is now parsed correctly in both the YARL url case and the string url case.

  • Data may not be recorded when tornado's RequestHandler.finish

    Using RequestHandler.finish in tornado caused the transaction to exit before all traces (inserted by automatic instrumentation) were complete, resulting in missing data. All traces now exit when RequestHandler.finish is called.

  • asyncio.ensure_future / asyncio.create_task is unable to spawn new transactions

    Calling asyncio.create_task / asyncio.ensure_future was unable to spawn a new transaction if these methods were called from within an existing transaction. New transactions can now be created when ensure_future/create_task is called from within an existing transaction and no traces have been started on the spawned task.

  • py3: A runtime instrumentation error may have occurred when transactions were finalized

    When transactions became garbage (if the reference to the transaction was lost as part of a circular reference for example), a runtime instrumentation error may have been logged. The error conditions have been relaxed to allow for certain states within the agent when a transaction becomes garbage.

  • Application crash when starting a transaction when one is already active

    Starting a transaction via the context manager APIs when a transaction is already active no longer causes an application crash. An error is logged when this case is detected.

  • Creating a message transaction with distributed tracing enabled may have resulted in a crash

    The agent crashed with an AttributeError when using message transactions with distributed tracing enabled when headers were not provided. This error has been fixed.

April 13, 2020
Python agent v5.12.0.140

Notes

This release of the Python agent includes support for a new product called Infinite Tracing, and it also has some bug fixes

The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.

New Feature

This release adds support for Infinite Tracing. Infinite Tracing observes 100% of your distributed traces and provides visualizations for the most actionable data. With Infinite Tracing, you get examples of errors and long-running traces so you can better diagnose and troubleshoot your systems.

Configure your agent to send traces to a trace observer in New Relic Edge. View distributed traces through New Relic’s UI. There is no need to install a collector on your network.

Infinite Tracing is currently available on a sign-up basis. If you would like to participate, please contact your sales representative.

Bug fixes

  • Fix record transaction failure in async applications

    When the agent attempted to record information as part of event loop diagnostics, an AttributeError may have occurred during the record transaction phase causing data to not be recorded for that transaction. This issue has now been fixed.

March 9, 2020
Python agent v5.10.0.138

Notes

This release of the Python agent includes an update to the API for recording exceptions, default request attributes, optional function trace attributes, and bug fixes.

The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.

Improved features

  • newrelic.agent.record_exception now adds attributes to spans

    The public API method newrelic.agent.record_exception now attaches exception details to the currently executing span. Spans with error details are now highlighted red in the distributed tracing UI. Also, the attributes error.class and error.message are added to the span. If multiple errors are recorded for a single span, only the final error's attributes will be added to the span.

  • Note: Exceptions recorded on spans may be double counted in the distributed tracing UI.

  • New default web request attributes.

    The previously optional attributes request.headers.accept, request.headers.host, and request.headers.userAgent are now included by default on all web transactions. These attributes can be excluded through agent configuration.

  • peer.address and peer.hostname can now be excluded from spans through configuration

    peer.address and peer.hostname may be excluded from span events through attribute.exclude options in the agent configuration.

Bug fixes

  • Fix issue which could potentially lead to missing event data

    When the agent was shutting down, event harvest may have been skipped causing any events captured in the final 5 seconds of application execution to be discarded. This has now been fixed.

  • Runtime instrumentation error messages for calling __exit__ before __enter__ were erroneously logged

    Under certain conditions, the agent may have logged an error message for transaction __exit__ being called before trace __enter__. This error message is now printed only if the error condition is true.

Known issues and workarounds

  • If a .NET agent is initiating distributed traces as the root service, you must update that .NET agent to version 8.24 or later before upgrading your downstream New Relic Python agents to this agent release.

February 24, 2020
Python agent v5.8.0.136

Notes

This release of the Python agent includes a new API for adding custom attributes on span events, improvements to external type spans, deprecations, and bug fixes.

The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.

New features

  • Add new api newrelic.agent.add_custom_span_attribute

    There is now a public API method allowing users to add custom attributes directly to spans.

Improved features

  • External spans now contain HTTP response code

    External HTTP spans will now contain a new attribute http.statusCode with the http response code for each external call made. This attribute will be added when using any supported HTTP client.

Deprecations

  • LambdaHandlerWrapper and lambda_handler APIs are deprecated

    The Lambda API functionality has been moved to a separate package called newrelic-lambda. All future lambda implementations should use the new package for lambda monitoring.

Bug fixes

  • Fix application crash when using a non-WSGI framework with synthetics

    When synthetic monitors were used with an application utilizing a non-WSGI web framework (such as aiohttp), a crash could have occurred if an outbound HTTP request was attempted from within the transaction. This crash has now been fixed.

  • The Python agent generates an invalid nr tracestate entry

    Under certain random conditions, the agent may have generated an invalid New Relic w3c tracestate entry, resulting in potentially missing parts of traces. This invalid tracestate entry would not impact propagation of tracestate values from other vendors.

Known issues and workarounds

  • If a .NET agent is initiating distributed traces as the root service, you must update that .NET agent to version 8.24 or later before upgrading your downstream New Relic Python agents to this agent release.

February 3, 2020
Python agent v5.6.0.135

Notes

This release of the Python agent includes an implementation for w3c trace context, support for uvloop, and various bug fixes.

The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.

New Features

  • New APIs for creating / accepting distributed trace headers

    This version of the agent deprecates newrelic.agent.create_distributed_trace_payload and newrelic.agent.accept_distributed_trace_payload in favor of newrelic.agent.insert_distributed_trace_headers and newrelic.agent.accept_distributed_trace_headers. See the Python agent API documentation for details.

  • Support for W3C Trace Context, with easy upgrade from New Relic Trace Context

    Distributed Tracing now supports W3C Trace Context headers for HTTP and gRPC protocols when distributed tracing is enabled. Our implementation can accept and emit both W3C trace header format and New Relic trace header format. This simplifies agent upgrades, allowing trace context to be propagated between services with older and newer releases of New Relic agents. W3C trace header format will always be accepted and emitted. New Relic trace header format will be accepted, and you can optionally disable emission of the New Relic trace header format.

    When distributed tracing is enabled with distributed_tracing.enabled = true, the Python agent will now accept W3C's traceparent and tracestate headers when calling accept_distributed_trace_headers. When calling insert_distributed_trace_headers, the Python agent will include the W3C headers along with the New Relic distributed tracing header, unless the New Relic trace header format is disabled using distributed_tracing.exclude_newrelic_header = true

    Also, see the "Known Issues and Workarounds" section of these Release notes.

Improved Features

  • Add support for uvloop

    Transaction context may not have been propagated when using uvloop. This could have resulted in incomplete traces or instrumentation failures when using uvloop. uvloop is now supported.

Bug Fixes

  • Fix crash when using aiohttp_cors

    Customers using the agent with aiohttp_cors may have experienced a crash when the aiohttp_cors framework was used in conjunction with aiohttp class based views. This crash has now been fixed.

  • Fix grpc v1.26 instrumentation errors

    Customers using grpc v1.26 and above may have experienced an error message in the New Relic agent logs indicating there was an instrumentation error. Additionally, some data may have been missing when this error was encountered. This issue has now been fixed.

Known Issues and Workarounds

  • If a .NET agent is initiating distributed traces as the root service, you must update that .NET agent to version 8.24 or later before upgrading your downstream New Relic Python agents to this agent release.

December 19, 2019
Python agent v5.4.1.134

Notes

This release of the Python agent includes a bug fix for reporting inaccurate metric values.

The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.

Bug Fixes

  • Metrics may be reported with an incorrect throughput after communication failure with New Relic

    For agent versions 5.2.0 through 5.4.0, metric throughput may have been reported inaccurately after experiencing network / communication failures with New Relic. The throughput reported for all metrics after this failure may have been abnormally high.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.