Skip to content

Commit

Permalink
docs(logging): Change contains_attributes to when_header (#3127)
Browse files Browse the repository at this point in the history
Ref: #2040
  • Loading branch information
obrien-k authored May 24, 2023
1 parent 94b8364 commit c679c16
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/source/configuration/logging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c679c16

Please sign in to comment.