opentracing-csharp
opentracing-csharp copied to clipboard
Managing Context across App Domains
Ran into this issue recently in a Unit Test and uncovered a possible issue that could happen in production code: https://stackoverflow.com/questions/5439719/is-it-possible-to-use-the-logical-call-context-within-a-unit-test-in-vs-2010
Trying to keep the IScope around but it is not marked as either Serializable or MarshalByRefObject so it dies when being used across app domains. Likely the easy button is to mark it as Serializable, but I'm cool with whatever. Thanks.
This library only defines the interfaces and I don't think interfaces can be marked as Serializable so this is something that each tracer would have to implement. Also, AppDomains are no longer supported in .NET Core & .NET 5 onwards so I don't think this is something that's still important for this project (given that it's being replaced by OpenTelemetry).
I'll leave this open though to see if anyone else has an opinion on that.