Releases: opentracing/opentracing-csharp
0.12.1
0.12.0
New feature: Trace Identifiers
#96 implements the Trace Identifiers RFC by adding the properties string TraceId
& string SpanId
to ISpanContext
. These identifiers make it easier to correlate tracing data with data in other systems, simplify important tasks, and allow the creation of reusable trace observers.
Current state of this RFC: Test
This RFC is a breaking change for tracers. Tracers who already have existing properties with the same name MAY use explicit interface implementations if they don't want to change the types/names of their existing properties.
Enhancements
- #72 New
ISpan.SetTag
andISpanBuilder.WithTag
overloads for use with Tag types- You can now use the fluent
span.SetTag(Tags.HttpStatus, 200)
syntax instead ofTags.HttpStatus.Set(span, 200)
. The same syntax also works for ISpanBuilder (e.g.spanBuilder.WithTag(Tags.HttpMethod, "GET")
) - This is a breaking change for tracer libraries.
- You can now use the fluent
- #75 New parameterless
ISpanBuilder.StartActive()
overload- Tracers MUST implement this with
finishSpanOnDispose: true
- This is a breaking change for tracer libraries.
- Tracers MUST implement this with
- #77
NoopTracer
types are now public - #80 OpenTracing assembly is signed
- #83
MockTracer
usesAsyncLocalScopeManager
onMockTracer(IPropagator)
constructor- This might be a breaking change for anyone using
MockTracer
- This might be a breaking change for anyone using
- #91
ISpan.Log()
methods now useIEnumerable<KeyValuePair<string, object>>
- This makes it easier to pass more efficient data types. Existing code that passes dictionaries will continue to work because
IDictionary<string, object>
implements that interface. - This is a breaking change for tracer libraries
- This makes it easier to pass more efficient data types. Existing code that passes dictionaries will continue to work because
Bugs
- #99
AsyncLocalScopeManager
now uses instance variables
Docs
- #70 New
examples
folder which contains a port of opentracing-java'sopentracing-examples
- #74 Improved XML docs
We'd like to thank everyone who contributed code or commented on issues for their help!
0.12.0-rc1
This is a release candidate for the upcoming 0.12.0 release!
New feature: Trace Identifiers
#96 implements the Trace Identifiers RFC by adding the properties string TraceId
& string SpanId
to ISpanContext
. These identifiers make it easier to correlate tracing data with data in other systems, simplify important tasks, and allow the creation of reusable trace observers.
Current state of this RFC: Test
This RFC is a breaking change for tracers. Tracers who already have existing properties with the same name MAY use explicit interface implementations if they don't want to change the types/names of their existing properties.
Enhancements
- #72 New
ISpan.SetTag
andISpanBuilder.WithTag
overloads for use with Tag types- You can now use the fluent
span.SetTag(Tags.HttpStatus, 200)
syntax instead ofTags.HttpStatus.Set(span, 200)
. The same syntax also works for ISpanBuilder (e.g.spanBuilder.WithTag(Tags.HttpMethod, "GET")
) - This is a breaking change for tracer libraries.
- You can now use the fluent
- #75 New parameterless
ISpanBuilder.StartActive()
overload- Tracers MUST implement this with
finishSpanOnDispose: true
- This is a breaking change for tracer libraries.
- Tracers MUST implement this with
- #77
NoopTracer
types are now public - #80 OpenTracing assembly is signed
- #83
MockTracer
usesAsyncLocalScopeManager
onMockTracer(IPropagator)
constructor- This might be a breaking change for anyone using
MockTracer
- This might be a breaking change for anyone using
- #91
ISpan.Log()
methods now useIEnumerable<KeyValuePair<string, object>>
- This makes it easier to pass more efficient data types. Existing code that passes dictionaries will continue to work because
IDictionary<string, object>
implements that interface. - This is a breaking change for tracer libraries
- This makes it easier to pass more efficient data types. Existing code that passes dictionaries will continue to work because
Bugs
- #99
AsyncLocalScopeManager
now uses instance variables
Docs
- #70 New
examples
folder which contains a port of opentracing-java'sopentracing-examples
- #74 Improved XML docs
We'd like to thank everyone who contributed code or commented on issues for their help!
0.11.0
v0.11.0 is a major release with enhancements and breaking changes!
Enhancements
- Support for in-process propagation via the new
IScopeManager
&IScope
types and theITracer.ScopeManager
&ITracer.ActiveSpan
properties. The Util-folder contains aAsyncLocalScopeManager
which either usesAsyncLocal
(on .NET Core, .NET 4.6+) orCallContext
(on .NET 4.5) - An integrated
GlobalTracer
class that allows static access to the currentITracer
. A tracer can be registered viaGlobalTracer.Register(ITracer tracer)
. If no custom tracer is registered, it defaults to theNoopTracer
. - An integrated
MockTracer
for unit testing. - Support for SourceLink to allow debugging into the library
Parity with Java API
To ensure feature parity with the Java API, the whole Java code base was ported again with the following notable differences:
General:
- There's only one "OpenTracing" package instead of separate packages for api, util, noop, mock
- We use
DateTimeOffset
instead of long ticks for all APIs that accept a timestamp.
Core API:
- We have a type
LogFields
instead oflog.Fields
ISpanBuilder
is a first class citizen (vsTracer.SpanBuilder
in Java)- We don't have
ISpanBuilder.StartManual()
as it's already deprecated in Java - We use
finishSpanOnDispose
instead offinishSpanOnClose
as the pattern in C# is called IDisposable - Propagation: We use
BuiltinFormats.*
vsFormat.Builtin.*
as it's not possible to use generic types without a type
Util:
- We don't have
AutoFinishScope(Manager)
. We will add this if there's a demand for it. Please create an issue if you need it. GlobalTracer
throws if attempting to set itself; Java just writes a log message.
Noop:
- C# doesn't have interface fields so we don't use interfaces at all
NoopSpanBuilder
does NOT inheritNoopSpanContext
Mock:
- We have a separate
Propagators
type instead of members on the interface as that's not possible in C# - We renamed
PrinterPropagator
toConsolePropagator
as that's more common in .NET.
Breaking changes from v0.10.0
This reboot results in the following notable breaking changes from v0.10.0:
- Log methods require
IDictionary<string, object>
instead ofIEnumerable<KeyValuePair<string, object>>
for the parameterfields
ISpanBuilder.FollowsFrom
was removed- Please use
AddReference(References.FollowsFrom, ...)
instead.
- Please use
- The existing
Tags
class was removed in favor of Java's tags system.- If you need access to a tag name, you can use e.g.
Tags.SpanKind.Key
.
- If you need access to a tag name, you can use e.g.
- The existing propagation types were changed to reflect the types from Java.
- Use e.g.
BuiltinFormats.HttpHeaders
instead ofFormats.HttpHeaders
.
- Use e.g.
NullTracer
was renamed toNoopTracer
.- Use
NoopTracerFactory.Create
to access the tracer
- Use
- The exception types
OpenTracingException
andUnsupportedFormatException
were removed as they are not yet formally defined in the specification. - The library now targets
netstandard1.3
,netstandard2.0
andnet45
instead ofnetstandard1.0
. This should ensure that the library is not used on platforms that are no longer supported by Microsoft (e.g. Silverlight). Please create an issue if you need support for an older platform. - We changed the license from MIT to Apache-2.0 as this is a requirement for CNCF projects.
We'd like to thank everyone who contributed code or commented on issues for their help!
0.10.0
0.9.0
Major rework of 0.8.2 with many breaking changes! The library is now very close to the Java version.
NuGet Package: https://www.nuget.org/packages/OpenTracing/0.9.0