Commit 1a913fe 1 parent b30b5ed commit 1a913fe Copy full SHA for 1a913fe
File tree 3 files changed +16
-1
lines changed
Sources/Hummingbird/Middleware
3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 15
15
import HTTPTypes
16
16
import Logging
17
17
18
- /// Middleware outputting to log for every call to server
18
+ /// Middleware outputting to log for every call to server.
19
+ ///
20
+ /// Uses [Swift-Log](https://github.com/apple/swift-log) for logging the output.
21
+ /// Swift-Log has a flexible backend, and will output to console by default.
22
+ /// You can replace the Logging backend with other implementations.
23
+ /// A list of implementations is available in the swift-log repository's README.
19
24
public struct LogRequestsMiddleware < Context: RequestContext > : RouterMiddleware {
20
25
/// Header filter
21
26
public struct HeaderFilter : Sendable , ExpressibleByArrayLiteral {
Original file line number Diff line number Diff line change @@ -19,6 +19,11 @@ import Metrics
19
19
///
20
20
/// Records the number of requests, the request duration and how many errors were thrown. Each metric has additional
21
21
/// dimensions URI and method.
22
+ ///
23
+ /// Uses [Swift-Metrics](https://github.com/apple/swift-metrics) for recording the metrics.
24
+ /// Swift-Metrics has a flexible backend, which will need to be initialized before any metrics are recorded.
25
+ ///
26
+ /// A list of implementations is available in the swift-log repository's README.
22
27
public struct MetricsMiddleware < Context: RequestContext > : RouterMiddleware {
23
28
public init ( ) { }
24
29
Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ import Tracing
23
23
///
24
24
/// You may opt in to recording a specific subset of HTTP request/response header values by passing
25
25
/// a set of header names.
26
+ ///
27
+ /// Uses [Swift-Distributed-Tracing](https://github.com/apple/swift-distributed-tracing) for recording the traces.
28
+ /// Swift-Distributed-Tracing has a flexible backend, which will need to be initialized before any traces are recorded.
29
+ ///
30
+ /// A list of implementations is available in the swift-distributed-tracing repository's README.
26
31
public struct TracingMiddleware < Context: RequestContext > : RouterMiddleware {
27
32
private let headerNamesToRecord : Set < RecordingHeader >
28
33
private let attributes : SpanAttributes ?
You can’t perform that action at this time.
0 commit comments