HttpClientLogger doesn't log query string parameters #6937
Replies: 3 comments 2 replies
-
|
@rainsxng are you able to share some insight? |
Beta Was this translation helpful? Give feedback.
-
|
@darraghjones your understanding is correct, you have to opt-in each query string key for it to be logged. There are multiple justifications for that:
Query parameters logging follows the same approach as we have it for headers and path segments since they are small, enumerable, can carry sensitive tokens or IDs, and become structured tags that impact telemetry size and cost. Bodies are only logged when explicitly enabled and content types are allow‑listed; parsing and redacting arbitrary body payloads would add significant overhead, so we keep body handling coarse and let applications add custom enrichers if field redaction is needed. It is possible to add an option to log all the parameters, but I don't see enough justification for that yet. |
Beta Was this translation helpful? Give feedback.
-
|
I appreciate you taking the time to come back to me. i'm not sure i agree with the cardinality argument. if you have a query string like "name" the values could be almost endless. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I raised this github issue #6385 and it seems like it's been completed by this PR #6521.
but if i understand correctly, the way it's implemented, i need to opt-in for each query string key/value pair i want to log?
i don't really understand that design decision. it seems like it's got something to do with redacting potentially sensitive information in the query string?
but the logger already lets you log the entire request/response body.
i really want to use this logger, because logging the request/body has always been challenging in asp.net. but it seems like logging the simple things like headers and query string, this logger makes difficult.
where is the "just log everything" option?
Beta Was this translation helpful? Give feedback.
All reactions