pypi newrelic 9.4.0
v9.4.0

latest releases: 10.0.0, 9.13.0, 9.12.0...
8 months ago

Notes

This release of the Python agent adds support for nonced content security policies for Browser Agent injection, adds new wheels for Python 3.12 and musl Linux systems such as Alpine, deprecates the ObjectWrapper and get_browser_timing_footer APIs, fixes a crash with Kafka instrumentation when using distributed tracing, and removes a case sensitive header check in ASGIBrowserMiddleware.

Install the agent using easy_install/pip/distribute via the Python Package Index or download it directly from the New Relic download site.

Deprecations

  • Deprecate newrelic.agent.ObjectWrapper API
    Removes custom newrelic.agent.ObjectWrapper implementation and instead creates a pass through to wrapt.FunctionWrapper.

  • Deprecate get_browser_timing_footer API
    Previously get_browser_timing_footer was an API that would be used to supply information to the Browser Agent loaded by get_browser_timing_header. This step is now included in get_browser_timing_header making get_browser_timing_footer obsolete. This function now returns an empty string to avoid breaking existing applications.

New features

  • Add nonced content security policies (CSPs) for Browser Agent injection
    The Browser Agent injection API get_browser_timing_header has a new parameter nonce that takes a cryptographic nonce for use with content security policies. The nonce will be automatically inserted into the generated HTML.

  • Add additional wheel options for Python 3.12 and musl Linux
    Add pre-built binary wheel support for Python 3.12, as well as alternative wheels for musl based Linux operating systems (such as Alpine).

  • Add newrelic.agent.CallableObjectProxy to public APIs
    Previously CallableObjectProxy was never exposed for general use with custom instrumentation, but was present in internal modules used by the agent. This API has been added to newrelic.agent.CallableObjectProxy for general use.

Bug fixes

  • Fix a crash with kafka-python and confluent-kafka when using distributed tracing
    Previously Kafka instrumentation packages would sometimes fail to generate distributed tracing headers and cause a crash. This has been fixed and distributed tracing headers should now generate correctly.

  • Remove case sensitive header check in ASGIBrowserMiddleware
    The agent previously only supported HTML insertion for headers that were lowercase in ASGI applications. The header check is now case insensitive in compliance with the ASGI specification.

Support statement

We recommend updating to the latest agent version as soon as it's available. If you can't upgrade to the latest version, update your agents to a version no more than 90 days old. Read more about keeping agents up to date.

See the New Relic Python agent EOL policy for information about agent releases and support dates.

Don't miss a new newrelic release

NewReleases is sending notifications on new releases.