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

OpenTracing support #5235

Closed
skyflyer opened this issue Dec 8, 2018 · 4 comments
Closed

OpenTracing support #5235

skyflyer opened this issue Dec 8, 2018 · 4 comments
Labels
stale Issues with no activity for the past 6 months

Comments

@skyflyer
Copy link

skyflyer commented Dec 8, 2018

Do you have any plans / ideas to support OpenTracing concepts? I'm thinking along the lines that a given "call chain" could have an "execution context", which could hold arbitrary data.

It makes a lot of sense for RPC-oriented services, where there is a request and a response, which is not necessarily the case with grains as their lifetime is quite different.

I'm thinking along the lines of passing additional "context" data to each call, but not via interface method parameters, but rather via "client enrichment". Something along the lines of:

var ctx = Context().WithValue("requestid", Request.HttpContext.TraceIdentifier)
var something = _orleansClient.EnrichWith(ctx).GetGrain<ISomething>(Guid.Empty);
await something.DoIt();

Additional data could be passed encoded (don't know anything about how clients in orleans actually communicate with the server) into a communication channel. The server-side (or silo-side) implementation would be able to pick it up:

var ctx = GetRequestContext();
// do something with it

OK, so I just stumbled upon Request context so I see that this is already addressed, I just could not find it. :)

@skyflyer skyflyer closed this as completed Dec 8, 2018
@skyflyer skyflyer changed the title Opentracing support OpenTracing support Dec 8, 2018
@skyflyer
Copy link
Author

skyflyer commented Dec 8, 2018

@benjaminpetit,

I see that the RequestContext already carries an ActivityId which is supposed to be used for something like activity correlation. Is this ActivityId preserved (transferred) when using streams? I glanced over the code in the repo and I would assume it isn't?

For instance, let's say I set the RequestContext.ActivityId on the client, then call into a grain in the silo, which then enqueues the message into a stream. How could I propagate this information to the grain processing the message from the stream (in my case, implicit subscription)?

@skyflyer skyflyer reopened this Dec 8, 2018
@ReubenBond
Copy link
Member

Related #4992

@ReubenBond
Copy link
Member

RequestContext is propagated in streams

@skyflyer
Copy link
Author

skyflyer commented Dec 8, 2018

Great @ReubenBond! I'm closing this in favour of #4992, as that one is pretty much inline with my expectations.
/close

@skyflyer skyflyer closed this as completed Dec 8, 2018
@ghost ghost locked as resolved and limited conversation to collaborators Sep 26, 2021
@ghost ghost added the stale Issues with no activity for the past 6 months label Dec 7, 2021
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

2 participants