diff --git a/src/content/docs/apm/agents/python-agent/configuration/python-agent-configuration.mdx b/src/content/docs/apm/agents/python-agent/configuration/python-agent-configuration.mdx index 4ced130637e..9234daa428f 100644 --- a/src/content/docs/apm/agents/python-agent/configuration/python-agent-configuration.mdx +++ b/src/content/docs/apm/agents/python-agent/configuration/python-agent-configuration.mdx @@ -4051,7 +4051,7 @@ For some tips on configuring logs for the Python agent, see [Configure Python lo - 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). 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. diff --git a/src/content/docs/apm/agents/python-agent/python-agent-api/recordlogevent-python-agent-api.mdx b/src/content/docs/apm/agents/python-agent/python-agent-api/recordlogevent-python-agent-api.mdx index 6404272287a..9001ffed68b 100644 --- a/src/content/docs/apm/agents/python-agent/python-agent-api/recordlogevent-python-agent-api.mdx +++ b/src/content/docs/apm/agents/python-agent/python-agent-api/recordlogevent-python-agent-api.mdx @@ -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): diff --git a/src/content/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90500.mdx b/src/content/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90500.mdx index eee3dd14818..7236a450efe 100644 --- a/src/content/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90500.mdx +++ b/src/content/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90500.mdx @@ -10,7 +10,7 @@ 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). @@ -18,20 +18,23 @@ Install the agent using `easy_install/pip/distribute` via the [Python Package In ## 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