Skip to content

Commit

Permalink
Update Examples/tracing-middleware-example/Sources/HelloWorldVaporSer…
Browse files Browse the repository at this point in the history
…ver/HelloWorldVaporServer.swift

Co-authored-by: Si Beaumont <[email protected]>
  • Loading branch information
czechboy0 and simonjbeaumont authored Dec 19, 2024
1 parent fa57274 commit d551569
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ struct Handler: APIProtocol {
let transport = VaporTransport(routesBuilder: app)
let handler = Handler()
try handler.registerHandlers(on: transport, serverURL: URL(string: "/api")!, middlewares: [TracingMiddleware()])
// Consider using Swift Service Lifecycle — https://github.com/swift-server/swift-service-lifecycle
try await withThrowingTaskGroup(of: Void.self) { group in
group.addTask { try await app.execute() }
group.addTask { try await tracer.run() }
Expand Down

0 comments on commit d551569

Please sign in to comment.