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

Implementing DiagnosticsSource for cross silo tracing #3093

Closed
rikbosch opened this issue Jun 6, 2017 · 4 comments
Closed

Implementing DiagnosticsSource for cross silo tracing #3093

rikbosch opened this issue Jun 6, 2017 · 4 comments
Labels
stale Issues with no activity for the past 6 months
Milestone

Comments

@rikbosch
Copy link
Contributor

rikbosch commented Jun 6, 2017

Hi,

At the moment it is possible to correlate activities by propagating the current activityId in the RequestContext.

In NETStandard, the System.Diagnostic.Trace.CorrelationManager.ActivityId is not supported.

When integrating application insights in our silo and client code for tracing, we are looking for a way to correlate these traces.

It seems like System.Diagnostics.Activity (https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/ActivityUserGuide.md#overview) is the recommended replacement.

It would be nice to be able trace grain to grain calls, by instumenting orleans with a DiagnosticsSource (https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/DiagnosticSourceUsersGuide.md)

The implementation could be based on the System.Net.Http diagnostic handler implementation: https://github.com/dotnet/corefx/blob/master/src/System.Net.Http/src/System/Net/Http/DiagnosticsHandler.cs

A combination of RequestContext properties and an Interceptor could implement this, I think.

@sergeybykov sergeybykov added this to the Triage milestone Jun 7, 2017
@jdom
Copy link
Member

jdom commented Jun 7, 2017

Interesting. I don't know exactly what that would mean in terms of how to configure the monitoring, but it would be nice to align better. It's very confusing to compare DiagnosticSource with the other Microsoft.Extensions.Logging abstraction, because typically you would configure the latter to send logs to some persistent storage, where having a correlated activity would be very useful, and I just didn't learn yet how that would work if we mix the two.
Having said that, there's currently an Orleans-specific way to do correlation in the 2.0 TP in case you were not aware, which is by using the RequestContext.ActivityId directly (see #2961).

@rikbosch
Copy link
Contributor Author

I think DiagnosticsSource's purpose is.. well diagnostics of not-serializable in-process data. The ILogging abstraction is for serializable data. One complements the other this way.

I've come up with a basic implementation of a diagnosticssource for use in a silo. You can find it here https://gist.github.com/rikbosch/fe31f5b4c3b029d8b57f238a91913a35

It's based on code from the aspnet core ApplicationHost and requires a preview of the System.Diagnostics.DiagnosticSource nuget package.

The same could be implemented in the grainclient, giving activitytracing accross service boundaries.

@sergeybykov sergeybykov modified the milestones: Triage, Backlog Sep 22, 2017
@ghost ghost added the stale Issues with no activity for the past 6 months label Dec 11, 2021
@ghost
Copy link

ghost commented Dec 11, 2021

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.

@ghost
Copy link

ghost commented Mar 5, 2022

This issue has been marked stale for the past 30 and is being closed due to lack of activity.

@ghost ghost closed this as completed Mar 5, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Apr 4, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale Issues with no activity for the past 6 months
Projects
None yet
Development

No branches or pull requests

3 participants