[Tracing] Default tracer to global bootstrapped tracer#861
Merged
ktoso merged 1 commit intoswift-server:mainfrom Oct 9, 2025
Merged
[Tracing] Default tracer to global bootstrapped tracer#861ktoso merged 1 commit intoswift-server:mainfrom
ktoso merged 1 commit intoswift-server:mainfrom
Conversation
The default tracer should be picked up at configuration creation time from the bootstrapped one, so we don't have to manually configure it in the simplest cases. It is possible to disable it by explicitly setting `nil` on the tracing configuration, even if the global tracer was bootstrapped.
slashmo
approved these changes
Oct 9, 2025
glbrntt
approved these changes
Oct 9, 2025
Contributor
Author
|
Thank you! |
slashmo
added a commit
to swift-otel/swift-otel
that referenced
this pull request
Feb 1, 2026
## Motivation `AsyncHTTPClient` recently gained built-in support for Distributed Tracing (swift-server/async-http-client#857, swift-server/async-http-client#861, swift-server/async-http-client#862). It'd be a great showcase of Distributed Tracing to have an "end-to-end" example involving two server communicating via HTTP and this is now achievable without any manual HTTP client instrumentation. We already have multiple demos for both Vapor and Hummingbird so it feels natural for this demo to exist in Swift OTel as well. ## Modifications - Adds an example with two HTTP servers (Hummingbird & Vapor) where one calls the other via `AsyncHTTPClient` ## Result We now have an example that spans (no pun intended) two servers, connected via `AsyncHTTPClient`.
This file contains hidden or 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
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.
The default tracer should be picked up at configuration creation time from the bootstrapped one, so we don't have to manually configure it in the simplest cases.
It is possible to disable it by explicitly setting
nilon the tracing configuration, even if the global tracer was bootstrapped.FYI @slashmo