census-instrumentation / opencensus-csharp

Distributed tracing and stats collecting framework
https://opencensus.io
Apache License 2.0
139 stars 32 forks source link

Add public setter for Trace.CurrentSpan #71

Closed lmolkova closed 5 years ago

lmolkova commented 5 years ago

See motivation for Activity: https://github.com/dotnet/corefx/issues/29207

TL;DR; There are certain cases when async context is not reliable. The most popular case is native code invocation which is common case in ASP.NET classic or libs like System.Drawing.

We should be able to provide users and integrations a way to restore context.

lmolkova commented 5 years ago

this is achieved with Traces.WithSpan