• /
  • EnglishEspañol日本語한국어Português
  • Inicia sesiónComenzar ahora

Python agent release notesRSS

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.

November 26, 2019
Python agent v5.4.0.132

Notes

This release of the Python agent includes the logs in context feature 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.

Features

  • Logs In Context

    The logs in context feature is now supported by the PythonaAgent. For more information, see the Python logs-in-context page.

Bug Fixes

  • The plugin list in the environment page may have been inaccurately reported

    When using absolute imports in Python 2, the agent may have reported relative imports that were attempted but unsuccessful. Python 3 is not impacted. Modules are now reported correctly in Python 2.

November 13, 2019
Python agent v5.2.3.131

Notes

This release of the Python agent includes support for Python 3.8 and restores the original record-deploy command interface.

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.

Updates

  • Added Support for Python 3.8

    Python 3.8 support has been added in this release.

  • Restore newrelic-admin record-deploy command interface

    The newrelic-admin command was previously updated to require an application id via the command line. The requirement has been removed, restoring the original record-deploy CLI arguments.

November 6, 2019
Python agent v5.2.2.130

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

  • Fix thread utilization data on agent versions v5.x.x

    Thread utilization data was not reported for agents v5.x.x, resulting in missing data on the capacity analysis page. The agent will now report thread utilization data.

  • Fix untraced database calls when using pymysql context manager assignments

    When using context managers to create and assign a cursor in pymysql, database calls on that cursor object were not traced. Database calls in pymysql are now properly traced.

October 9, 2019
Python agent v5.2.1.129

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

  • Fix a crash when using future-based interfaces on Tornado's http client

    Tornado's http client returns a future when fetch is called. Prior to this release, the agent caused a coroutine object to be returned rather than a future, causing a potential crash when application code assumed a future would be returned. A future will now be returned from http client fetch as expected.

  • Fix a crash when running a coroutine created in another transaction

    When running a coroutine outside of the transaction that created it, the agent may have crashed if a separate transaction was active.

October 1, 2019
Python agent v5.2.0.127

Notes

This release of the Python agent includes a bug fix for tornado and support for recording deployment markers in the EU region as well as specifying a deploy timestamp.

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.

Features

  • Support for Real Time Streaming

    • Event data is now sent to New Relic every five seconds, instead of every minute. As a result, transaction, error, and custom events will now be available in New Relic and Insights dashboards in near real time. For more information on how to view your events with a five-second refresh, see the real time streaming documentation.
    • Note that the overall limits on how many events can be sent per minute have not changed. Also, span events, metrics, and trace data is unaffected, and will still be sent every minute.
  • Added timestamp and EU region support for recording deployment markers

    When using the newrelic-admin record-deploy script an optional timestamp can be provided to specify when the deployment marker should be created. Furthermore support for accounts in the EU region have been added in this release.

Bug Fixes

  • Fixed a crash in tornado versions >= 6.1

    Tornado 6.1 internals changed in a way that may have caused the agent's built-in instrumentation to fail. The instrumentation has been updated to alleviate this issue.

August 12, 2019
Python agent v5.0.2.126

Notes

This release of the Python agent includes bug fixes for feedparser and django-piston.

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

  • Fixed a crash when using feedparser

    When running with the feedparser library the agent would crash on attempting to parse an RSS feed. This issue has now been corrected.

  • Fixed a crash when using django-piston

    When running with the django-piston library the agent would crash on attempting to service a request. This issue has now been corrected.

August 9, 2019
Python agent v5.0.1.125

Notes

This release of the Python agent includes a bug fix for the mako library instrumentation.

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

  • Fixed a crash when using the Mako template library

    When running with the Mako template library the agent would crash on attempting to render a template. This issue has now been corrected.

August 6, 2019
Python agent v5.0.0.124

Notes

This release of the Python agent introduces:

  • Event loop diagnostics feature
  • Tornado instrumentation for versions 6 or higher
  • Improved context manager API functionality and interfaces

This release also drops support for Python 3.4.

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.

Event loop diagnostics

Introducing event loop diagnostics for asyncio! The Python agent can now surface information about transactions that block the event loop. The agent will be able to generate information about transactions that have waited a significant amount of time to acquire control of the event loop.

Event loop diagnostic information will be available in both APM and via NRQL query.

Event loop metrics will appear in the transaction Breakdown table:

Image of breakdown UI page

Time spent waiting on other transactions will be shown in the transaction Trace details page, as shown here:

Image of breakdown UI page

eventLoopTime and eventLoopWait attributes will be available via NRQL query. An example query might be:
SELECT count(*) as 'count', average(eventLoopTime) as 'loopTime', average(eventLoopWait) as 'loopWait' FROM Transaction facet name

In New Relic Insights, this might show a result like this:

Image of breakdown UI page

Diagnostics will be available by default through our existing aiohttp, sanic, and Tornado instrumentation. Diagnostic information will also be available for coroutines that use our background_task and web_transaction decorator APIs.

Tornado 6 Instrumentation

Instrumentation for Tornado framework version 6.x is supported without any feature flags. Support for versions earlier than Tornado 6.x has been dropped. The Tornado web server, framework, and http client are instrumented and information will show up in both APM and insights.

Important: Using the tornado.gen.coroutine with instrumentation is not supported. Any usage of tornado.gen.coroutine should be replaced with an asyncio coroutine.

Before

class MainHandler(tornado.web.RequestHandler):
@tornado.gen.coroutine
def get(self):
yield gen.sleep(0.2)

After

class MainHandler(tornado.web.RequestHandler):
@asyncio.coroutine
def get(self):
yield from gen.sleep(0.2)

Improved APIs for time trace context managers

Context managers (such as FunctionTrace, ExternalTrace, DatastoreTrace) may now be used from within asyncio coroutines! Additionally, the transaction argument is no longer used for any context manager API. In order to transition to the new API, the transaction argument must be removed.

Before

transaction = newrelic.agent.current_transaction()
with newrelic.agent.FunctionTrace(transaction, "my_trace"):
pass

After

with newrelic.agent.FunctionTrace("my_trace"):
pass

Updated WebTransaction context manager

The WebTransaction context manager is no longer WSGI dependent. The context manager takes generic HTTP arguments, which you can use to build web transactions that appear in the APM product. For more information, see our API documentation.

Copyright © 2024 New Relic Inc.

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