Azure / azure-sdk-for-rust

This repository is for active development of the *unofficial* Azure SDK for Rust. This repository is *not* supported by the Azure SDK team.
MIT License
696 stars 241 forks source link

Allow certain response headers coming from AzurePipelinesCredential to be logged #1823

Open heaths opened 1 week ago

heaths commented 1 week ago

These two response headers are useful for the service team to debug and diagnose issues, and hence it is requested that we do log them.

We decided, other than logging them, to also add these header values to the exception message that is thrown, so they are always visible, even with logging disabled.

Given our logged headers are based on an allow list, currently these two headers are REDACTED.

https://github.com/Azure/azure-sdk-for-net/blob/a70122eed52b0980afc10db30c76cb56b7bb76db/sdk/core/Azure.Core/src/DiagnosticsOptions.cs#L44-L71

ahsonkhan commented 1 week ago

See https://github.com/Azure/azure-sdk-for-cpp/pull/6001 for an example change from C++.