NuGet / Home

Repo for NuGet Client issues
Other
1.49k stars 250 forks source link

Client support for X-NuGet-Diagnostic-Info header #6039

Open emgarten opened 6 years ago

emgarten commented 6 years ago

Feature

Allow feeds to send diagnostic info to the client which can be displayed to the user.

This would be displayed in the log in any of the following scenarios:

By default for successful scenarios these messages will not be displayed to user. Scenarios where information from the feed should always be shown is covered by X-NuGet-Warning already.

Header name

X-NuGet-Diagnostic-Info

emgarten commented 6 years ago

Related work for X-NuGet-Session : https://github.com/NuGet/Home/issues/5330

emgarten commented 6 years ago

My plan for this was to add the diagnostic info headers from responses to a hashset persisted in SourceCacheContext. At the end of an operation unique info headers would be logged to ILogger.

SourceCacheContext is unique an operation, and is passed through the entire stack. At the top level the command could decide if it wanted to display this info or not, and if it did, read it from the cache context and log it.