The Wayback Machine - https://web.archive.org/web/20210725073040/https://github.com/dotnet/aspnetcore/pull/34680
Skip to content
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

Log KestrelServerOptions when tracing is enabled #34680

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

@davidfowl
Copy link
Contributor

@davidfowl davidfowl commented Jul 24, 2021

  • Dump configured values in a JSON blob and emit an event
{
  "AllowSynchronousIO": false,
  "AddServerHeader": true,
  "AllowAlternateSchemes": false,
  "AllowResponseHeaderCompression": true,
  "EnableAltSvc": false,
  "IsDevCertLoaded": true,
  "RequestHeaderEncodingSelector": "default",
  "ResponseHeaderEncodingSelector": "default",
  "Limits": {
    "KeepAliveTimeout": "00:02:10",
    "MaxConcurrentConnections": null,
    "MaxConcurrentUpgradedConnections": null,
    "MaxRequestBodySize": 30000000,
    "MaxRequestBufferSize": 1048576,
    "MaxRequestHeaderCount": 100,
    "MaxRequestHeadersTotalSize": 32768,
    "MaxRequestLineSize": 8192,
    "MaxResponseBufferSize": 65536,
    "MinRequestBodyDataRate": "240 BPS, Grace Period: 00:00:05",
    "MinResponseDataRate": "240 BPS, Grace Period: 00:00:05",
    "RequestHeadersTimeout": "00:00:30",
    "Http2": {
      "MaxStreamsPerConnection": 100,
      "HeaderTableSize": 4096,
      "MaxFrameSize": 16384,
      "MaxRequestHeaderFieldSize": 16384,
      "InitialConnectionWindowSize": 131072,
      "InitialStreamWindowSize": 98304,
      "KeepAlivePingDelay": "10675199.02:48:05.4775807",
      "KeepAlivePingTimeout": "00:00:20"
    },
    "Http3": {
      "HeaderTableSize": 0,
      "MaxRequestHeaderFieldSize": 16384
    }
  },
  "ListenOptions": []
}

The payload size is event source and LOH safe so >= 2K and 4K (with more listen options).

Contributes to #34578

- Dump configured values in a dictionary and emit an event with the pairs
@JamesNK
Copy link
Member

@JamesNK JamesNK commented Jul 24, 2021

EventSource only allows primitive values afaik. If you want to use eventsource then could could log each name/value in a separate call.

Alternatively, DiagnosticSource supports passing a dictionary.

@davidfowl
Copy link
Contributor Author

@davidfowl davidfowl commented Jul 24, 2021

@noahfalk did some testing and a dictionary worked the other day. But maybe only in narrow cases. I'll likely use JSON if tho doesn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment