Skip to content

Commit 2433e86

Browse files
committed
Update metrics use in route
1 parent 10bdd28 commit 2433e86

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Sources/App/routes.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,8 @@ func routes(_ app: Application) throws {
275275
}
276276

277277
do { // Metrics
278-
app.get("metrics") { req -> EventLoopFuture<String> in
279-
let promise = req.eventLoop.makePromise(of: String.self)
280-
try MetricsSystem.prometheus().collect(into: promise)
281-
return promise.futureResult
278+
app.get("metrics") { req -> String in
279+
try await MetricsSystem.prometheus().collect()
282280
}.excludeFromOpenAPI()
283281
}
284282
}

0 commit comments

Comments
 (0)