Skip to content

Releases: opentracing/opentracing-csharp

0.12.1

25 Sep 15:08
Compare
Choose a tag to compare

This release adds the following changes:

  • Binary header propagation support (for Envoy)
  • Improved thread-safety in GlobalTracer.IsRegistered
  • Adds a boolean value to manage if a tracer has been registered in the GlobalTracer.

0.12.0

24 May 15:11
d003497
Compare
Choose a tag to compare

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 and ISpanBuilder.WithTag overloads for use with Tag types
    • You can now use the fluent span.SetTag(Tags.HttpStatus, 200) syntax instead of Tags.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.
  • #75 New parameterless ISpanBuilder.StartActive() overload
    • Tracers MUST implement this with finishSpanOnDispose: true
    • This is a breaking change for tracer libraries.
  • #77 NoopTracer types are now public
  • #80 OpenTracing assembly is signed
  • #83 MockTracer uses AsyncLocalScopeManager on MockTracer(IPropagator) constructor
    • This might be a breaking change for anyone using MockTracer
  • #91 ISpan.Log() methods now use IEnumerable<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

Bugs

  • #99 AsyncLocalScopeManager now uses instance variables

Docs

  • #70 New examples folder which contains a port of opentracing-java's opentracing-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

19 May 21:52
d003497
Compare
Choose a tag to compare
0.12.0-rc1 Pre-release
Pre-release

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 and ISpanBuilder.WithTag overloads for use with Tag types
    • You can now use the fluent span.SetTag(Tags.HttpStatus, 200) syntax instead of Tags.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.
  • #75 New parameterless ISpanBuilder.StartActive() overload
    • Tracers MUST implement this with finishSpanOnDispose: true
    • This is a breaking change for tracer libraries.
  • #77 NoopTracer types are now public
  • #80 OpenTracing assembly is signed
  • #83 MockTracer uses AsyncLocalScopeManager on MockTracer(IPropagator) constructor
    • This might be a breaking change for anyone using MockTracer
  • #91 ISpan.Log() methods now use IEnumerable<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

Bugs

  • #99 AsyncLocalScopeManager now uses instance variables

Docs

  • #70 New examples folder which contains a port of opentracing-java's opentracing-examples
  • #74 Improved XML docs

We'd like to thank everyone who contributed code or commented on issues for their help!

0.11.0

01 Mar 10:33
Compare
Choose a tag to compare

NuGet package | Closed issues

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 the ITracer.ScopeManager & ITracer.ActiveSpan properties. The Util-folder contains a AsyncLocalScopeManager which either uses AsyncLocal (on .NET Core, .NET 4.6+) or CallContext (on .NET 4.5)
  • An integrated GlobalTracer class that allows static access to the current ITracer. A tracer can be registered via GlobalTracer.Register(ITracer tracer). If no custom tracer is registered, it defaults to the NoopTracer.
  • 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 of log.Fields
  • ISpanBuilder is a first class citizen (vs Tracer.SpanBuilder in Java)
  • We don't have ISpanBuilder.StartManual() as it's already deprecated in Java
  • We use finishSpanOnDispose instead of finishSpanOnClose as the pattern in C# is called IDisposable
  • Propagation: We use BuiltinFormats.* vs Format.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 inherit NoopSpanContext

Mock:

  • We have a separate Propagators type instead of members on the interface as that's not possible in C#
  • We renamed PrinterPropagator to ConsolePropagator 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 of IEnumerable<KeyValuePair<string, object>> for the parameter fields
  • ISpanBuilder.FollowsFrom was removed
    • Please use AddReference(References.FollowsFrom, ...) instead.
  • 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.
  • The existing propagation types were changed to reflect the types from Java.
    • Use e.g. BuiltinFormats.HttpHeaders instead of Formats.HttpHeaders.
  • NullTracer was renamed to NoopTracer.
    • Use NoopTracerFactory.Create to access the tracer
  • The exception types OpenTracingException and UnsupportedFormatException were removed as they are not yet formally defined in the specification.
  • The library now targets netstandard1.3, netstandard2.0 and net45 instead of netstandard1.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

31 Jul 21:04
Compare
Choose a tag to compare

https://www.nuget.org/packages/OpenTracing/0.10.0

Changes:

  • #32 Adds missing tags from specification
  • #33 XML documentation for IntelliSense
  • #34 A new LogFields type with constants for fields from specification
  • #42 Timestamps now use DateTimeOffset instead of DateTime

0.9.0

26 Oct 08:40
Compare
Choose a tag to compare

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