Skip to content

Comments

[Tracing] Default tracer to global bootstrapped tracer#861

Merged
ktoso merged 1 commit intoswift-server:mainfrom
ktoso:wip-forgot-to-default-to-global
Oct 9, 2025
Merged

[Tracing] Default tracer to global bootstrapped tracer#861
ktoso merged 1 commit intoswift-server:mainfrom
ktoso:wip-forgot-to-default-to-global

Conversation

@ktoso
Copy link
Contributor

@ktoso ktoso commented Oct 8, 2025

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.

FYI @slashmo

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.
@ktoso ktoso requested a review from glbrntt October 8, 2025 23:35
@ktoso ktoso added the 🔨 semver/patch No public API change. label Oct 8, 2025
@ktoso ktoso merged commit c2a3a2c into swift-server:main Oct 9, 2025
34 of 36 checks passed
@ktoso ktoso deleted the wip-forgot-to-default-to-global branch October 9, 2025 08:01
@ktoso
Copy link
Contributor Author

ktoso commented Oct 9, 2025

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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants