Currently we don't have anything like explicitly setup in C#, but as you pointed out, .NET framework already provides some classes for contextual data (such as AsyncLocal). One thing you can try: In v1.10.x we are introducing interceptor API, and with that API you should be able to install async context for each of your server-side handlers before they actually run. You should be aware that there might be some performace penalty associated with using contexts, so please doublecheck the performance (if performance is of interest for you).
On Tue, Feb 27, 2018 at 2:32 PM, Benjamin Krämer <[email protected]> wrote: > In Java, there is a io.grpc.Context class which let's you store > key-value-pairs inside a thread. Is there anything similar in C#? It would > be nice to be able to get data into ServerCallContext, like the active > OpenTracing span for the current server handle to the client call. For the > moment, I am using an AsyncLocal instance but have to give each service > implementation a reference to this. > > -- > You received this message because you are subscribed to the Google Groups " > grpc.io" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/grpc-io. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/grpc-io/c4e74716-fa71-4b38-8088-60f68c220aef%40googlegroups.com > <https://groups.google.com/d/msgid/grpc-io/c4e74716-fa71-4b38-8088-60f68c220aef%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Jan -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CACF4M0QbQbHw4MjhWXjWMSELWLwQTkBA_R%3D2HyNHr%2B3849p5TQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
smime.p7s
Description: S/MIME Cryptographic Signature
