-
Notifications
You must be signed in to change notification settings - Fork 139
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
Add Linux support via a TaskLocalContextManager #546
Merged
bryce-b
merged 31 commits into
open-telemetry:main
from
semicoleon:linuxConcurrencyWrapper
Jul 23, 2024
Merged
Add Linux support via a TaskLocalContextManager #546
bryce-b
merged 31 commits into
open-telemetry:main
from
semicoleon:linuxConcurrencyWrapper
Jul 23, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…. Remove some unnecessary 'Base' protocols in favor of wrapper types in OpenTelemetryConcurrency
semicoleon
requested review from
nachoBonafonte,
bryce-b and
vvydier
as code owners
June 8, 2024 01:50
can you add a GH action that runs the build & tests on linux? |
bryce-b
reviewed
Jun 12, 2024
@bryce-b I believe this is ready again. I had to debug a bizarre issue that was appearing in the Linux job, but it seems to be resolved now |
bryce-b
reviewed
Jul 2, 2024
bryce-b
approved these changes
Jul 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is another attempt at adding Linux support (and closing #38) after #438 turned out to be unworkable for merging.
I have attempted to avoid changes to the core library as much as possible, instead using an additional library
OpenTelemetryConcurrency
(better name suggestions are welcome) which uses some wrapper types, and the split outSpanBuilderBase
andSpanBase
protocols to discourage use of old style APIs likesetActive
andend(time:)
which don't behave as expected when usingTaskLocal
's to carry context around for users who have elected to use the wrapper library.Spliting
SpanBuilder
andSpan
into two protocols each is the most invasive change in this PR. I chose to do it that way to avoid having to maintain all of theSpanBuilderBase
andSpanBase
methods on a wrapper type, but if that split would be a semver hazard (or just not desirable to the team) I can switch to using a wrapper type for those like I did forTracerProvider
andTracer
.Using a wrapper library does require exposing some API's outside of
OpenTelemetryApi
. I elected to use thepackage
keyword rather than make the public, but that meansOpenTelemetryConcurrency
can't be used on versions of swift < 5.9. This is also something that could be adjusted if that's not desirable.