Skip to content

Releases: apple/swift-distributed-tracing

1.3.0

11 Sep 11:28
6600888
Compare
Choose a tag to compare

What's Changed

SemVer Minor

  • Introduce InMemoryTracer (in new InMemoryTracing module) #183 by @slashmo and @ktoso
    • This tracer can be used to capture emitted spans and write tests against them, or manually work with spans in other ways

Full Changelog: 1.2.2...1.3.0

1.2.2

04 Sep 00:55
149fa4c
Compare
Choose a tag to compare

What's Changed

SemVer Patch

  • feat: Add Swift WebAssembly compilation support to swift-distributed-tracing by @scottmarchant in #174
  • Add SpanAttributeConvertible conformances for Int32 by @FranzBusch in #181

Other Changes

New Contributors

Full Changelog: 1.2.1...1.2.2

1.2.1

18 Jun 05:29
1.2.1
b787967
Compare
Choose a tag to compare

What's Changed

SemVer Patch

  • Update activeSpan documentation comment by @slashmo in #164
  • Tracer.withSpan's isolation param should be 'isolated' by @ktoso in #173

Other Changes

New Contributors

Full Changelog: 1.2.0...1.2.1

1.2.0

14 Jan 12:20
a64a0ab
Compare
Choose a tag to compare

What's Changed

SemVer Minor

  • Add activeSpan method to TracerProtocol by @slashmo in #160

Full Changelog: 1.1.3...1.2.0

1.1.3

14 Jan 09:03
0b9ab66
Compare
Choose a tag to compare

What's Changed

SemVer Patch

Other Changes

New Contributors

Full Changelog: 1.1.2...1.1.3

1.1.2

09 Oct 03:20
1.1.2
6483d34
Compare
Choose a tag to compare

What's Changed

Updates in Swift 6 compatibility

  • Fix use of Swift 6 language mode by @orobio #150
  • Adopt Swift 6.0 #isolation; Resolves async closure behavior in withSpan by @ktoso #148
  • Explicitly declare the ServiceContext dependency by @sidepelican #147

Other Changes

New Contributors

Full Changelog: 1.1.1...1.1.2

1.1.1

13 May 09:53
1.1.1
11c756c
Compare
Choose a tag to compare

What's Changed

  • update documentation references to fix broken reference links on SwiftPackageIndex hosted documentation for main by @heckj in #143
  • update the otel-config to match latest otel image by @heckj in #144
  • Support compiling against Musl by @simonjbeaumont in #145

New Contributors

Full Changelog: 1.1.0...1.1.1

1.1.0

01 Feb 03:48
1.1.0
7fbb8b2
Compare
Choose a tag to compare

Supported Swift versions

  • This release drops the support for Swift 5.6, and keeps support for 5.7, 5.8, 5.9, 5.10.

  • The legacy type LegacyTracer remains available however is now deprecated.

  • Please avoid using the deprecated "AnySpan" based APIs.

This release also cleans up some Sendability warnings in preparation for "complete concurrency checking" that will arrive in Swift 6.

What's Changed

  • Update the adoption tables by @ktoso in #131
  • Enable strict concurrency checking in CI by @czechboy0 in #132
  • Add Span.updateAttributes by @adam-fowler in #133
  • Update README with the status of Swift-OTel by @Joannis in #135
  • Remove old benchmark infra and replace with package-benchmark by @ktoso in #140
  • [PATCH] [bug] Fix ignored at argument in two instances of withSpan by @ktoso in #139
  • Add CI for Swift 5.10 by @yim-lee in #138
  • Bump minimum Swift version to 5.7 by @rnro in #134
  • Sendable Instrument Carriers by @slashmo in #136

New Contributors

Full Changelog: 1.0.1...1.1.0

1.0.1

27 Jun 08:00
1.0.1
49b7617
Compare
Choose a tag to compare

1.0.1

Patch release adjusting how we deal with availability annotations.

Marking availability on specific types and not on package level makes it possible to adopt entirely optionally in packages which otherwise do not require the most recent (5.6+) Swift versions.

Thank you to @adam-fowler for the patch and upcoming adoption in Hummingbird.

What's Changed

New Contributors

Full Changelog: 1.0.0...1.0.1

1.0.0

01 Jun 15:14
1.0.0
ba07967
Compare
Choose a tag to compare

Initial 1.0 release

After a very long period of incubation, including the development of language features (SE-0311: Task Locals) and multiple iterations on exact shapes of the API to ensure least possible impact on instrumented code when tracing is disabled, we are happy to announce the first source stable release of swift-distributed-tracing!

This package is an "API package", in the same way swift-log and swift-metrics are. This means that this package does not offer a Tracer implementation, but allows libraries to use this abstract API to instrument their code (e.g. http clients, distributed actors, gRPC or other) using tracing and once a tracer is bootstrapped by an end user, spans from given library are included in the distributed trace.

Special thanks

It should be noted that this project initially kicked off thanks to Swift participating in Google Summer of Code in 2020 (initial repository announcement), and would not have been possible without the relentless efforts of @slashmo sticking to the work and project even 3 years after GSoC concluded.

Maturing such crucial "core" libraries for the server ecosystem takes time, and we've since gained multiple Swift language features which made this library possible, and we'd like to extend our thanks to everyone involved along the way. Thanks!

Reference Documentation

Getting started with distributed tracing can be somewhat daunting, so in order to explain how to adopt and what "kind of adopter" and aspect of APIs you should be looking at, the initial release features comprehensive reference documentation in the form of docc documentation hosted on swiftpackageindex.com (or generated from the 1.0 sources).

Notable changes since beta releases

When upgrading from beta releases you might need to take care of the following changes:

  • The Baggage type, previously vended by the swift-distributed-tracing-baggage package is now known as ServiceContext and has also announced its 1.0 release.
  • It is possible to mock time using the tracing instant types
  • The library now splits its API between LegacyTracer which is Swift 5.6 compatible, and Tracer which requires Swift 5.7+
    • The reason for this is that the APIs now return a concrete Span type from startSpan which allows avoiding existential boxing if using tracers explicitly. And such return type is only supported since Swift 5.7 because the Span protocol is a "protocol with associated types"

Further, several small improvements have been made since the betas, but nothing has fundamentally changed in the APIs.

Adoption plans

We anticipate a few tracing implementations (most notably slashmo/swift-otel) to soon release 1.0 compatible versions of libraries.

We (as in the SSWG workgroup) will also collaborate with various client (e.g. http) and server projects to spread the adoption of this API in such way that enabling tracing should give a great ecosystem wide user experience. This process will take time, and we would love to see the community help with this process!

If you have any questions about implementing tracers, or adopting them in your libraries or projects please don't hesitate to reach out on the forums: https://forums.swift.org/c/server/43 or in this repository's issues.

What's Changed

  • startSpan should take tracepoint location by @ktoso in #68
  • Add .spi.yml for Swift Package Index DocC support by @yim-lee in #72
  • Change 'landing' target to Tracing by @yim-lee in #74
  • notes about LoggingContext by @ktoso in #75
  • Add CI for Swift 5.8 and update nightly to Ubuntu 22.04 by @yim-lee in #76
  • Mark types Sendable by @ktoso in #83
  • Update CoC and add CONTRIBUTING file by @ktoso in #87
  • Allow for reading and mutating a span name by @ktoso in #88
  • Recording an error may carry attributes by @ktoso in #90
  • associated type Span, Tracer as short-hand, and *Protocol types by @ktoso in #93
  • Enable struct Spans with reference semantics; optimal NoopSpan by @ktoso in #94
  • remove not used docker configurations by @ktoso in #96
  • remove linux test shims by @ktoso in #97
  • Provide explicit set/get to avoid SpanAttributeConvertible wrapping by @ktoso in #95
  • Implement TracerClock and abstract away "now" by @ktoso in #98
  • Remove some unused/untested dead code by @fabianfett in #100
  • Correct the default impl for startAnySpan for 5.7 by @ktoso in #112
  • Introduce top level withSpan; reclaim Tracer and Instrument for protocols by @ktoso in #113
  • Add nanoseconds to instant protocol by @ktoso in #114
  • Update CI by @yim-lee in #116
  • Add nanoseconds to SpanEvent by @slashmo in #118
  • remove clock protocol, use autoclosure "now" instant by @ktoso in #120
  • end() should take an autoclosure instant, not direct instant by @ktoso in #122
  • consider TracerSpan assoc type -> Span by @ktoso in #111
  • [Docs] Combined initial documentation work by @ktoso in #121
  • Adopt ServiceContext 1.0 by @ktoso in #127
  • Use 1.0.0 service-context by @ktoso in #128
  • Rename do not switch case by @fabianfett in #129

New Contributors

Full Changelog: 0.3.1...1.0.0