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:
Tracer -> TracerProtocol
Tracer is now a namespace in order to Tracer.withSpan {} easily
Span -> SpanProtocol
Introduce LegacyTracerProtocol which does not make use of associated type Span, and can be used in 5.6 libraries; they can deprecate and move away form it ASAP as they start requiring 5.7
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.
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 friendsModifications:
Tracer
->TracerProtocol
Tracer
is now a namespace in order toTracer.withSpan {}
easilySpan
->SpanProtocol
LegacyTracerProtocol
which does not make use of associated type Span, and can be used in 5.6 libraries; they can deprecate and move away form it ASAP as they start requiring 5.7Result:
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