amzn / smoke-framework

A light-weight server-side service framework written in the Swift programming language.
Apache License 2.0
1.45k stars 41 forks source link

Report request latency, broken down into time for service calls, retry waits. #68

Closed tachyonics closed 3 years ago

tachyonics commented 3 years ago

Issue #, if available:

Description of changes:

Add three additional metrics to potentially be emitted

let serviceLatencyTimer: Metrics.Timer
let outwardsServiceCallLatencySumTimer: Metrics.Timer
let outwardsServiceCallRetryWaitSumTimer: Metrics.Timer

Create a SmokeInwardsRequestContext protocol to aggregate all the request data and emit metrics at the end of the request.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.