Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
metrics: Introduce MetricBuilderRegistry for instrumenting expression…
…s in server stack Problem Metrics creations are scattered in many stack modules, each stack module has its filter and independent from others. However, instrumenting an expression needs access to all component metrics. Solution Introduce a stack param to cache metrics as well as providing lazy vals to create expressions. Result The original approach was having a stack.module that sits at the end of the stack where all needed metrics are generated. the downside is it registers the same expressions many times (= connections), and the last override the previous ones. The current approach should reduce the expression evaluation time, but requires implementors to have more context on the finagle stack for metrics creation sequence. Differential Revision: https://phabricator.twitter.biz/D663915
- Loading branch information