Description of changes: Migrate to swift-log and swift-metrics.
New Types
The SmokeServerInvocationReporting type stores the logger and internal request id for a request.
The SmokeServerReportingConfiguration stores configuration on what metrics to record for what operation
The SmokeServerOperationReporting type stores metrics counters for a particular operation and is initialised based on an operation identifier and an SmokeServerReportingConfiguration.
The SmokeServerInvocationContext is the combination of SmokeServerRequestReporting and SmokeServerOperationReporting for a particular invocation (the combination of reporting for the request and reporting for the operation).
Flow Changes
Pass through the logger and internal request id from HTTP1ChannelInboundHandler to the HTTP1RequestHandler.
Pass through the logger and internal request id from OperationServerHTTP1RequestHandler to the OperationHandler for the determined operation.
The OperationHandler decorates the request logger if needed and creates the SmokeServerInvocationReporting instance for the request. It then combines it with the SmokeServerOperationReporting instance for that operation into a SmokeServerInvocationContext instance for that request.
The operation handlers can then use the SmokeServerInvocationContext to call the operation handler.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue #, if available: #
Description of changes: Migrate to swift-log and swift-metrics.
New Types
SmokeServerInvocationReporting
type stores the logger and internal request id for a request.SmokeServerReportingConfiguration
stores configuration on what metrics to record for what operationSmokeServerOperationReporting
type stores metrics counters for a particular operation and is initialised based on an operation identifier and anSmokeServerReportingConfiguration
.SmokeServerInvocationContext
is the combination ofSmokeServerRequestReporting
andSmokeServerOperationReporting
for a particular invocation (the combination of reporting for the request and reporting for the operation).Flow Changes
SmokeServerInvocationContext
instances for anonymous request (ping, unknown operation) OTHERWISEOperationHandler
for the determined operation.OperationHandler
decorates the request logger if needed and creates theSmokeServerInvocationReporting
instance for the request. It then combines it with theSmokeServerOperationReporting
instance for that operation into aSmokeServerInvocationContext
instance for that request.SmokeServerInvocationContext
to call the operation handler.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.