• EnglishEspañol日本語한국어Português
  • ログイン今すぐ開始

Python agent v6.4.0.157

May 25, 2021Download

Notes

This release of the Python agent deprecates the old record_exception API, replaces the error_collector.ignore_errors setting, adds a new notice_error API, adds expected errors functionality, improves the NewRelicContextFormatter, and fixes multiple bugs including a few potential crashes.

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.

Deprecations

  • Deprecated record_exception API

    record_exception has been superseded by the new notice_error API. The old API will forward exceptions to notice_error with a deprecation warning.

  • Deprecated error_collector.ignore_errors setting

    error_collector.ignore_errors has been replaced with error_collector.ignore_classes to match other agents. Please update your config files to use the new setting. The old setting will continue to function with a deprecation warning.

New Features

Improved Features

  • Improved NewRelicContextFormatter

    Adds new log_record_to_dict function to separate logic for JSON serialization and converting to a dictionary, enabling custom formatters to access the data more easily.

    Custom attributes now attempt JSON serialization by default and fallback to strings, meaning dictionaries and other serializable types are now supported.

    Thank you to @chrislawlor and @qvik-olli for your contributions!

  • error_collector.ignore_status_codes is now configurable in server-side configuration

    Previously this setting was only available in the config file, but is now available via server-side configuration.

Bug Fixes

  • Infinite tracing crash fix

    Crashes had occurred in infinite tracing following the inclusion of some startup timeout changes in v6.0.0. These changes have been rolled back.

  • RuntimeInstrumentationError crash removed

    Crashes occurred when a RuntimeInstrumentationError was reached, indicating a potential problem with existing instrumentation. The exception is now caught and replaced with error level log messages to avoid crashing applications.

  • SQLite instrumentation consumes generator objects passed to executemany

    A generator passed to Connection.executemany would unexpectedly be consumed by our instrumentation. This has been corrected and generators are now properly supported.

Known Issues

  • Flask v2.0.0 support

    Flask released a new major version recently that we do not yet support, but expect to in the near future.

  • Sanic support

    Sanic has released large changes to the framework recently that have broken some of our instrumentation on certain versions, and can crash the agent on others. We expect to correct these issues in the near future.

Copyright © 2024 New Relic株式会社。

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