opentracing / opentracing-csharp

OpenTracing API for C# (.NET). 🛑 This library is DEPRECATED! https://github.com/opentracing/specification/issues/163
http://opentracing.io
Apache License 2.0
517 stars 73 forks source link

AsyncLocalScopeManager isolation #99

Closed ndrwrbgs closed 6 years ago

ndrwrbgs commented 6 years ago

Fixes #93. https://github.com/opentracing/opentracing-csharp/commit/aef788dda7b577ffce25714348076d5b0cdde0d0 demonstrates a test that fails before the change and passes after it.

Problem: Separate instances of AsyncLocalScopeManager will overwrite each other's data. Fix: Use non-static AsyncLocal in the non-static AsyncLocalScopeManager class, and use Guid instead of AppDomain.Id for the pre4.6 implementation.

cwe1ss commented 6 years ago

I fixed the code style issues so that I can add it to the upcoming RC release. Thanks again for the PR!