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

KestrelServer Diagnostic Source #58911

Open
maldago opened this issue Nov 13, 2024 · 1 comment
Open

KestrelServer Diagnostic Source #58911

maldago opened this issue Nov 13, 2024 · 1 comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Comments

@maldago
Copy link

maldago commented Nov 13, 2024

I have been trying to get the Diagnostic Source working for the Kestrel Server following the documentation:
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/diagnostics?view=aspnetcore-8.0#diagnosticsource

I couldn't figure out why it wasn't working but in searching the AspNetCore source, I came across this pull request for Metrics #46834

In the KestrelServerImpl the DiagnosticSource passed in the ServiceContext is null and not passed in from the KestrelServerImpl constructor calling CreateServiceContext.

The ServiceContext.DiagnosticSource property is referenced in HttpProtocol - which returns null such that the diagnostic event is not written.

I guess my questions are:

Was this intended with the Metrics prototype PR work? If so, what was the decision for removing the diagnostic source events? And if so, can the supporting documentation be updated?

Many thanks!

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Nov 13, 2024
@BrennanConroy
Copy link
Member

@JamesNK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

No branches or pull requests

2 participants