Closed cwe1ss closed 6 years ago
@opentracing/opentracing-c-maintainers feedback/approval please so that we can include this in the next release.
I'll merge this on/after Friday (May 18th) if there's no objections.
@cwe1ss This change looks great to me (definitely the explicit interface impl bit is a handy thing to have here).
I'll merge this now. I want to do an RC-release anyway so if there's any concerns, feel free to create a new issue!
This implements the new "Trace Identifiers RFC" by adding
TraceId
&SpanId
members toISpanContext
.The interesting thing to discuss here is the naming collision with existing tracer properties - e.g.
MockTracer
already had properties with the same names.In this PR I changed the
MockTracer
properties tostring
but C# also has the possibility to "explicitly implement an interface" which would make it possible to keep the properties aslong
. This would look like this:Obviously, this is a bit confusing as it's quite easy to get the "wrong" type depending on what one is doing.
As
MockTracer
is used for unit tests where checking these properties is often necessary, I thought that changing the types tostring
makes this much less confusing.For a real tracer, just explicitly implementing the interface and keeping the original types for its properties might be the best option though.