-
Notifications
You must be signed in to change notification settings - Fork 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
Orleans semantic logging and related ideas on general interceptor design #4805
Comments
Distributed tracing and correlation through Service Bus messaging, an example how to connect to Service Bus tracing. Microsoft docs on distributed tracing on HTTP headers, currently more of an example how to do this in micro-services (notable the more standard headers to distribute correlation IDs are described at https://en.wikipedia.org/wiki/List_of_HTTP_header_fields, albeit with the previous middleware proxy these can be interchanged). .NET Core SqlCommand has one example how to create |
"semantic logging on orleans internals", this could be a big project. I don't think we need to do this for all logging in orleans, but just some. So the questions which ones can benefit the most from semantic logging? In and out to external services, such as Azure table? I think if we can define this project more by listing the logs which can benefit most from semantic logging, it would be a good start. |
Cross-referecing dotnet/extensions#526 here as Orleans follows closely ASP.NET Core configuration surface. This feature likely comes more popular and would-like-to-have once it's exposed in ASP.NET core easily. |
Closely related to #4992 An incremental approach is good. I added my thoughts to that issue. |
Indeed closely related, thanks @ReubenBond. I'll cross-reference #3093 (comment) here too since it's basically the same thing and it might be beneficial to have the links quickly at hand. |
We are marking this issue as stale due to the lack of activity in the past six months. If there is no further activity within two weeks, this issue will be closed. You can always create a new issue based on the guidelines provided in our pinned announcement. |
This issue has been marked stale for the past 30 and is being closed due to lack of activity. |
Tagging @jdom and @ReubenBond as they've discussed this in Gitter.
I was learning myself about the new .NET Core tracing and logging infrastructure. This has been discussed in Gitter, but to my knowledge there isn't an open issue that would record the issues in GitHub.
Why:
It looks to me this allows building logging and tracing so that Orleans core and even the plugins, can be the root of activities where other components can then add new leaf levels and whatever is deemed OK (such as timing data). This can be the usual variety if logging, but also performance relatated timings. This way also adds a way for uniform naming across the whole .NET ecosystem.
It looks to me this could be done incrementally at least in the non-core parts, like ADO.NET libraries, so that new tracing information is just created if parent activity is null and then when Orleans core adds parent, or root, activities, the providers add tracing information as leaf data (see the following code snippet). I'm unsure if this requires changes to the core besides adding another system for logging and tracing and if so, how much.
A point I noticed about interceptors. It appears this method also allows one to build ambient interceptors. One example of adding compressiong to
HttpClient
in this snippet.A short example on how one can plug into the ambient logging and tracing system and besides just adding logging and tracing information (that ought to become visible in AppInsight too) also even modify the data in the classes. This is some copy-pastish code. See the link in class comment for well known "logging IDs".
<edit: Almost forgot, creating a new source seems to be as easy as
private static DiagnosticListener SomeDiagnosticsSource { get; } = new DiagnosticListener("SomeSource");
The text was updated successfully, but these errors were encountered: