From c679c1626b0841ac7b3cf14667603e8275a3102e Mon Sep 17 00:00:00 2001 From: Kyle OBrien Date: Wed, 24 May 2023 13:30:44 -0500 Subject: [PATCH] docs(logging): Change `contains_attributes` to `when_header` (#3127) Ref: https://github.com/apollographql/router/pull/2040 --- docs/source/configuration/logging.mdx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/source/configuration/logging.mdx b/docs/source/configuration/logging.mdx index 832cdccddb..a6f902970d 100644 --- a/docs/source/configuration/logging.mdx +++ b/docs/source/configuration/logging.mdx @@ -71,9 +71,13 @@ JSON-formatted logging provides compatibility with common searchable logging too > This is part of an experimental feature, it means any time until it's stabilized (without the prefix `experimental_`) we might change the configuration shape or adding/removing features. > If you want to give feedback or participate in that feature feel free to join [this discussion on GitHub](https://github.com/apollographql/router/discussions/1961). -By default some of our logs containing sensitive data (like request body, response body, headers) are not displayed even if we are in the right log level. -For example if you need to display raw responses from one of your subgraph it won't be displayed by default. To enable them you have to configure it thanks to the `contains_attributes` setting. -Here is an example on how you can configure it: +By default, the router _doesn't_ log certain values that might contain sensitive data, even if a sufficient log level is set: + + - Request bodies + - Response bodies + - Headers + +You can enable selective logging of these values via the `when_header` option: ```yaml title="router.yaml" telemetry: