-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to new
metrics
crate version (#787)
v0.22.0 of the metrics crate was a breaking change to how its macros work -- they now return the counter/gauge/histogram itself and you call methods on it to record metrics, rather than recording the metric as part of the macro. So this change is mostly a find and replace to get things compiling again with this new change. Other than that change, there's two new things we'd like to use from this new version: 1. Scoped local metrics recorders are now supported, which makes it much easier to write unit tests for metrics. The metrics recorders were previously global, so tests had to use `rusty_fork` to fork a new test process. I've used this change to update the current basic metrics tests. 2. Metrics now include metadata such as severity and module/line location. We're not using this yet, but could use it in the future to create scoped metrics or different metric severities for our logging use. Signed-off-by: James Bornholt <[email protected]>
- Loading branch information
1 parent
5ce4863
commit 9326a48
Showing
14 changed files
with
109 additions
and
161 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
Oops, something went wrong.