Skip to content

Commit

Permalink
fix(releaseNotes): style edits
Browse files Browse the repository at this point in the history
  • Loading branch information
ally-sassman authored Jan 13, 2024
1 parent 72ba6b0 commit 64fe13d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4051,7 +4051,7 @@ For some tips on configuring logs for the Python agent, see [Configure Python lo
</tbody>
</table>

If attributes are enabled for context_data, all attribute keys found in this list will be sent to us in transaction traces. For more information, see the [agent attribute rules](/docs/apm/other-features/attributes/agent-attributes).
If attributes are enabled for `context_data`, all attribute keys found in this list will be sent to us in transaction traces. For more information, see the [agent attribute rules](/docs/apm/other-features/attributes/agent-attributes).

<Callout variant="important">
When adding context attributes, the agent prefixes the keys with `context.` for attributes from the logging framework context, and `message.` for attributes from a dictionary message context.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def fetch():

### Record log event with context data attributes [#context-data-example]

An example of recording a log event using message attributes and context attributes
Here's an example of recording a log event using message attributes and context attributes:

```py
def fetch(product_id):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,31 @@ security: []

## Notes

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.
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 obfuscates logged license keys and user API keys.

Install the agent using `easy_install/pip/distribute` via the [Python Package Index](https://pypi.python.org/pypi/newrelic) or download it directly from the [New Relic download site](https://download.newrelic.com/python_agent/release).


## New features

* **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](/docs/agents/python-agent/configuration/python-agent-configuration#application_logging.forwarding.context_data.enabled) and optionally configure [include](/docs/agents/python-agent/configuration/python-agent-configuration#application_logging.forwarding.context_data.include) and [exclude](/docs/agents/python-agent/configuration/python-agent-configuration#application_logging.forwarding.context_data.exclude) rules to filter the allowed attributes.
* 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](/docs/agents/python-agent/configuration/python-agent-configuration#application_logging.forwarding.context_data.enabled) and optionally configure [include](/docs/agents/python-agent/configuration/python-agent-configuration#application_logging.forwarding.context_data.include) and [exclude](/docs/agents/python-agent/configuration/python-agent-configuration#application_logging.forwarding.context_data.exclude) rules to filter the allowed attributes.

* **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.

* 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.

* 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.

* The agent now obfuscates all instances of license keys or user API keys in agent logs and audit logs.

## Support statement

Expand Down

0 comments on commit 64fe13d

Please sign in to comment.