apple / swift-distributed-tracing

Instrumentation library for Swift server applications
https://swiftpackageindex.com/apple/swift-distributed-tracing/main/documentation/tracing
Apache License 2.0
224 stars 34 forks source link

associated type Span, Tracer as short-hand, and *Protocol types #92

Closed ktoso closed 1 year ago

ktoso commented 1 year ago

Motivation:

This is a revival of https://github.com/apple/swift-distributed-tracing/pull/84 where we try to KEEP compatibility with versions below 5.7 with a compatibility "legacy" tracer type, but otherwise move towards requiring 5.7 for all the "nice" apis that use associated types and any TracerProtocol and friends

Modifications:

Result:

Offer the APIs we want in 5.7 but remain compatible with 5.6 until we drop it as soon as 5.9 is released as stable - this allows us to adopt eagerly in libraries without having to wait for 5.9 to drop.

Replaces https://github.com/apple/swift-distributed-tracing/pull/84

ktoso commented 1 year ago

Can't merge this since we stopped running 5.5 CI but this PR requires it 😆

Making a new PR