This release of the Python agent adds context data attributes to logs, support for dictionary type log messages, adds attribute support to record_log_event API, and obfuscation of logged license keys and user API keys.
Add context data attributes to logs
Context data available from logging frameworks can now be recorded as attributes on logs. These attributes are prefixed with context., which is not considered when filtering attributes from logs.
Context data may include extras, dictionary message attributes, and attributes provided by logging frameworks.
To report these attributes, enable context data forwarding and optionally configure include and exclude rules to filter the allowed attributes. (Documentation will be available shortly here)
Add support for dictionary type log messages
Dictionary type log messages are now supported for logging frameworks which support dictionary type log messages (including the builtin logging module and structlog). 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 with message.. These attributes are subject to the same filtering rules as other context data.
Add attribute support to record_log_event API
The record_log_event API now allows passing context data in using the optional attributes keyword argument, and allows the message argument to be a dictionary as described above.
Obfuscate license keys and user API keys in logs
The agent now obfuscates all instances of license keys or user API keys in agent logs and audit logs.
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.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps newrelic from 9.3.0 to 9.5.0.
Release notes
Sourced from newrelic's releases.
Commits
072eba8
Obfuscate License Keys in Logs (#1031)aebf47f
Logging Attributes (#1033)9990e71
Remove Slack section in CONTRIBUTING.rst. (#1029)8399022
Add checkout actions to deploy workflow (#1027)32c66d8
Deprecate ObjectWrapper API (#996)27c874c
Deprecate get_browser_timing_footer API (#999)1483f73
Parallel Wheel Builds (#1024)3962f54
Remove case sensitive check in ASGIBrowserMiddleware check. (#1017)c3314ae
Temporarily pin hypercorn version in tests (#1021)1357145
Drop py27 from memcache testing. (#1018)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show