diagnostics
                                
                                 diagnostics copied to clipboard
                                
                                    diagnostics copied to clipboard
                            
                            
                            
                        Add dumprequests command to sos
The dumprequests command will show all executing requests in the captured dump. It should have a statistics view of all the requests grouped by path and should allow digging into a specific "async stack" for a request.
Super high level (maybe seemingly obvious):
- It should support all servers (Kestrel, IIS, HttpSysServer)
- It should support Http1 and Http2 (Http3 etc)
WIP:
> dumprequests -stat
Statistics:
                    Path    |  StatusCode   | Protocol      | ResponseStarted
                --------------------------------------------------------------
                     /      |     500       |   HTTP/1      |   True
                     /grpc  |     200       |   HTTP/2      |   False
Total 100 Requests
By default I am putting all the incoming feature requests into 5.0. If you had something ready much sooner than that we can still PR it.
@noahfalk yep expected, I think we'll need some iteration on the design before doing anything else here.
hello, i would be willing to work on this if i get a pointer where to start from .
Looking at the command examples like dumpasync in https://github.com/dotnet/diagnostics/blob/50a1ea135699ce5c5d10a49c49e672597b95c99c/src/Microsoft.Diagnostics.ExtensionCommands/DumpAsyncCommand.cs is probably the best way to start. There is a little documentation on SOS extensibility here: https://github.com/dotnet/diagnostics/blob/main/documentation/design-docs/dotnet-dump-extensibility.md
It's probably much simpler that dump async 😄. It should be as "simple" as finding all of the requests in memory and doing some digging around the various object models to grab state from them.
cc @halter73 @Tratcher @adityamandaleeka
What about outgoing HTTP requests? It's also very useful to dump requests with headers and content when available. It should be a separate command, I think.
Filter options:
- Request URL
- Response status code
- Request/response header value (eg. filter by trace id)
- Request/response body size (find heavy requests)