Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[HttpClientFactory] Don't log header values by default - #106271

#106271
Merged
CarnaViire merged 4 commits into
dotnet:maindotnet/runtime:mainfrom
CarnaViire:hcf-header-valuesCarnaViire/runtime:hcf-header-valuesCopy head branch name to clipboard
Aug 13, 2024
Merged

[HttpClientFactory] Don't log header values by default#106271
CarnaViire merged 4 commits into
dotnet:maindotnet/runtime:mainfrom
CarnaViire:hcf-header-valuesCarnaViire/runtime:hcf-header-valuesCopy head branch name to clipboard

Conversation

@CarnaViire

Copy link
Copy Markdown
Member

Only affects the default case; if the sensitive headers were ever specified by RedactLoggedHeaders, the behavior is unchanged.

@rokonec rokonec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Only concern is about performance, but I suppose in default we do not log header values so by default perf is not affected by redacting.

Comment thread src/libraries/Microsoft.Extensions.Http/src/Logging/LogHelper.cs

@MihaZupan MihaZupan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we treating this as a breaking change?

Comment thread src/libraries/Microsoft.Extensions.Http/src/Logging/LogHelper.cs
CarnaViire and others added 2 commits August 12, 2024 17:03
Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
@CarnaViire

CarnaViire commented Aug 12, 2024

Copy link
Copy Markdown
Member Author

Only concern is about performance, but I suppose in default we do not log header values so by default perf is not affected by redacting.

@rokonec yeah, these are Trace level logs. And it doesn't matter much from perf perspective whether the value is redacted or not because nothing need to be parsed; FWIW it will be only faster with the redaction on, see HttpHeadersLogValue.ToString() 😄

Are we treating this as a breaking change?

@MihaZupan Yes, we should; there is some tag I need to apply here then, right?

@CarnaViire CarnaViire added breaking-change Issue or PR that represents a breaking API or functional change over a previous release. needs-breaking-change-doc-created Breaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet labels Aug 12, 2024
@dotnet-policy-service

dotnet-policy-service Bot commented Aug 12, 2024

Copy link
Copy Markdown
Contributor

Added needs-breaking-change-doc-created label because this PR has the breaking-change label.

When you commit this breaking change:

  1. Create and link to this PR and the issue a matching issue in the dotnet/docs repo using the breaking change documentation template, then remove this needs-breaking-change-doc-created label.
  2. Ask a committer to mail the .NET Breaking Change Notification DL.

Tagging @dotnet/compat for awareness of the breaking change.

@CarnaViire

Copy link
Copy Markdown
Member Author

/ba-g DeadLetter Helix crash on an unrelated test run (System.Runtime.Tests on ios-arm64)

@CarnaViire
CarnaViire merged commit 47af310 into dotnet:main Aug 13, 2024
@CarnaViire CarnaViire removed the needs-breaking-change-doc-created Breaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet label Aug 13, 2024
@karelz karelz added this to the 9.0.0 milestone Sep 3, 2024
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Extensions-HttpClientFactory breaking-change Issue or PR that represents a breaking API or functional change over a previous release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.