-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dotnet] Don't include http headers in internal logs #14546
Conversation
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Co-authored-by: codiumai-pr-agent-pro[bot] <151058649+codiumai-pr-agent-pro[bot]@users.noreply.github.com>
Co-authored-by: codiumai-pr-agent-pro[bot] <151058649+codiumai-pr-agent-pro[bot]@users.noreply.github.com>
Failed CI is not related to the changes, thx @nvborisenko |
User description
Description
Before:
After:
22:25:36.208 DEBUG HttpCommandExecutor: Executing command: [b3982ee404c0e5616649ac25dd1d79bc]: get {"url":"http://localhost:63043/common/temp/page4449485843760331092.html"} 22:25:36.210 TRACE HttpCommandExecutor: >> POST RequestUri: http://localhost:63045/session/b3982ee404c0e5616649ac25dd1d79bc/url, Content: System.Net.Http.ByteArrayContent, Headers: 2 {"url":"http://localhost:63043/common/temp/page4449485843760331092.html"} 22:25:36.256 TRACE HttpCommandExecutor: << StatusCodde: 200, ReasonPhrase: OK, Content: System.Net.Http.HttpConnectionResponseContent, Headers: 1 22:25:36.256 DEBUG HttpCommandExecutor: Response: ( Success: ) 22:25:36.266 DEBUG HttpCommandExecutor: Executing command: [b3982ee404c0e5616649ac25dd1d79bc]: findElement {"using":"css selector","value":"#alert"} 22:25:36.267 TRACE HttpCommandExecutor: >> POST RequestUri: http://localhost:63045/session/b3982ee404c0e5616649ac25dd1d79bc/element, Content: System.Net.Http.ByteArrayContent, Headers: 2 {"using":"css selector","value":"#alert"} 22:25:36.303 TRACE HttpCommandExecutor: << StatusCodde: 200, ReasonPhrase: OK, Content: System.Net.Http.HttpConnectionResponseContent, Headers: 1 22:25:36.303 DEBUG HttpCommandExecutor: Response: ( Success: System.Collections.Generic.Dictionary`2[System.String,System.Object]) 22:25:36.304 DEBUG HttpCommandExecutor: Executing command: [b3982ee404c0e5616649ac25dd1d79bc]: clickElement {"id":"f.E17E54A357AA49FBDFA2B6AEB0509871.d.F26ABC8BFDB71F13D70157ABA1E035D5.e.2"} 22:25:36.305 TRACE HttpCommandExecutor: >> POST RequestUri: http://localhost:63045/session/b3982ee404c0e5616649ac25dd1d79bc/element/f.E17E54A357AA49FBDFA2B6AEB0509871.d.F26ABC8BFDB71F13D70157ABA1E035D5.e.2/click, Content: System.Net.Http.ByteArrayContent, Headers: 2 {} 22:25:36.372 TRACE HttpCommandExecutor: << StatusCodde: 200, ReasonPhrase: OK, Content: System.Net.Http.HttpConnectionResponseContent, Headers: 1 22:25:36.373 DEBUG HttpCommandExecutor: Response: ( Success: ) 22:25:36.374 DEBUG HttpCommandExecutor: Executing command: [b3982ee404c0e5616649ac25dd1d79bc]: getAlertText {} 22:25:36.377 TRACE HttpCommandExecutor: >> GET RequestUri: http://localhost:63045/session/b3982ee404c0e5616649ac25dd1d79bc/alert/text, Content: , Headers: 3 22:25:36.382 TRACE HttpCommandExecutor: << StatusCodde: 200, ReasonPhrase: OK, Content: System.Net.Http.HttpConnectionResponseContent, Headers: 1 22:25:36.393 DEBUG HttpCommandExecutor: Response: ( Success: cheese) 22:25:36.393 DEBUG HttpCommandExecutor: Executing command: [b3982ee404c0e5616649ac25dd1d79bc]: dismissAlert {} 22:25:36.393 TRACE HttpCommandExecutor: >> POST RequestUri: http://localhost:63045/session/b3982ee404c0e5616649ac25dd1d79bc/alert/dismiss, Content: System.Net.Http.ByteArrayContent, Headers: 2 {} 22:25:36.396 TRACE HttpCommandExecutor: << StatusCodde: 200, ReasonPhrase: OK, Content: System.Net.Http.HttpConnectionResponseContent, Headers: 1 22:25:36.396 DEBUG HttpCommandExecutor: Response: ( Success: ) 22:25:36.405 DEBUG HttpCommandExecutor: Executing command: [b3982ee404c0e5616649ac25dd1d79bc]: getAlertText {} 22:25:36.406 TRACE HttpCommandExecutor: >> GET RequestUri: http://localhost:63045/session/b3982ee404c0e5616649ac25dd1d79bc/alert/text, Content: , Headers: 3 22:25:36.408 TRACE HttpCommandExecutor: << StatusCodde: 404, ReasonPhrase: Not Found, Content: System.Net.Http.HttpConnectionResponseContent, Headers: 1 {"value":{"error":"no such alert","message":"no such alert\n (Session info: chrome=129.0.6668.60)","stacktrace":"\tGetHandleVerifier [0x00007FF77662B125+29573]\n\t(No symbol) [0x00007FF77659FF50]\n\t(No symbol) [0x00007FF77645B519]\n\t(No symbol) [0x00007FF7764463A4]\n\t(No symbol) [0x00007FF77646EB81]\n\t(No symbol) [0x00007FF77647FEA7]\n\t(No symbol) [0x00007FF7764D73AD]\n\t(No symbol) [0x00007FF77647FD25]\n\t(No symbol) [0x00007FF7764D70A3]\n\t(No symbol) [0x00007FF7764A12DF]\n\t(No symbol) [0x00007FF7764A2441]\n\tGetHandleVerifier [0x00007FF77695C76D+3377613]\n\tGetHandleVerifier [0x00007FF7769A7B67+3685831]\n\tGetHandleVerifier [0x00007FF77699CF8B+3641835]\n\tGetHandleVerifier [0x00007FF7766EB2A6+816390]\n\t(No symbol) [0x00007FF7765AB25F]\n\t(No symbol) [0x00007FF7765A7084]\n\t(No symbol) [0x00007FF7765A7220]\n\t(No symbol) [0x00007FF77659607F]\n\tBaseThreadInitThunk [0x00007FF83964257D+29]\n\tRtlUserThreadStart [0x00007FF83AC8AF28+40]\n"}} 22:25:36.413 DEBUG HttpCommandExecutor: Response: ( NoAlertPresent: System.Collections.Generic.Dictionary`2[System.String,System.Object])`
Motivation and Context
Simplify internal logs reading. It is better when considering security aspects when auth token is sent via http header.
Types of changes
Checklist
PR Type
enhancement
Description
HttpCommandExecutor
to exclude detailed HTTP headers from internal logs.RequestUri
,Content
, andStatusCode
.Changes walkthrough 📝
HttpCommandExecutor.cs
Simplify HTTP request and response logging
dotnet/src/webdriver/Remote/HttpCommandExecutor.cs