Notes
This release of the Python agent fixes a bug when specifying processors in structlog, and updates the NewRelicLogForwardingHandler
to support dictionary type logs and formatters.
Install the agent using easy_install/pip/distribute
via the Python Package Index or download it directly from the New Relic download site.
New features
Support dictionary type logs in
NewRelicLogForwardingHandler
- Dictionary type log messages are now supported in
NewRelicLogForwardingHandler
when passed as the log message, or when a custom formatter returns a dictionary. - The key
message
will be extracted if available and treated as the log message, and any other items will be considered context data attributes and prefixed withmessage.
.- These attributes are subject to the same filtering rules as other context data. The
message.
prefix is not considered when filtering attributes from logs. - To report these attributes, enable context data forwarding and optionally configure include and exclude rules to filter the allowed attributes.
- These attributes are subject to the same filtering rules as other context data. The
- Dictionary type log messages are now supported in
Support logging formatters in
NewRelicLogForwardingHandler
- Logging formatters added with
setFormatter()
are now supported, and may return a string or dicitionary log message type to be forwarded to New Relic.
- Logging formatters added with
Bug fixes
- Fix a bug when specifying processors in structlog
- Previously, there was a bug in the structlog instrumentation where
processors
was assumed to be list type. Now the instrumentation supports processors of all iterable types.
- Previously, there was a bug in the structlog instrumentation where
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.