-
Notifications
You must be signed in to change notification settings - Fork 36
associated type Span, Tracer as short-hand, and *Protocol types #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
**Motivation:** This is a revival of #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.
9d7a9c8
to
afb07cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really clever solution!
README.md
Outdated
@@ -261,7 +261,7 @@ When instrumenting server applications there are typically three parties involve | |||
|
|||
1. [Application developers](#application-developers-setting-up-instruments) creating server-side applications | |||
2. [Library/Framework developers](#libraryframework-developers-instrumenting-your-software) providing building blocks to create these applications | |||
3. [Instrument developers](#instrument-developers-creating-an-instrument) providing tools to collect distributed metadata about your application | |||
3. [InstrumentProtocol developers](#instrument-developers-creating-an-instrument) providing tools to collect distributed metadata about your application |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, a batch rename mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks yeah will clean it up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Pinged some folks for more review -- if you spot anything off please comment and I'll address in follow ups! 👍 |
Resolves #78 |
Motivation:
This is a revival of #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 friendsReplaces #92
Modifications:
Tracer
->TracerProtocol
Tracer
is now a namespace in order toTracer.withSpan {}
easilySpan
->SpanProtocol
LegacyTracerProtocol
which does not make use of associatedtype 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.