-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Calling methods from Metrics in go-metrics has a nasty side-effect where the implementation is modifying the input "key" slice passed to it. The implementation inserts the service name (and metric type for M3) to the beginning of the "key" slice. This is causing confusing metrics names when emitting to multiple implementations of Metrics, since each time the "key" is passed to a method of Metrics, the key changes. Since there is always an in-memory sink initialized, if any metrics sink configuration is specified, the key is different when passed to different sinks. Mitigating this issue in go-metrics for now by always copying the "key" slice before passing it to go-metrics. Signed-off-by: Ryan Turner <turner@uber.com>
- Loading branch information
Showing
1 changed file
with
28 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters