-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: I'm changing the approach of how mononoke->prometheus export will work: * before I've planned to use OSS `metrics` crate for logging from mononoke instead of our internal stack (which exposes fb303 endpoint) * this diff fully relies on internal stack instead: * all the metrics will be exposed in fb303 endpoint * the new fb303_prometheus_exporter will query fb303 endpoint and export same metrics in prometheus-friendly format This has many benefits: * we don't need to modify `stats` crate with all its macros * we rely on scalable internal stack for metrics * there's 1:1 feature parity: all aggregations, histograms, etc work out of the box * the only difference is the counters naming: prometheus only allows alphanumeric chars and `_` so we have to sanitise the names. In addition the adapter server component implementation turned out to be really simple. Reviewed By: andreacampi Differential Revision: D66663139 fbshipit-source-id: fda13aed293079691b9c2041f2c27b8c8ec2693c
- Loading branch information
1 parent
1d84330
commit f463021
Showing
10 changed files
with
142 additions
and
168 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
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 was deleted.
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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
load("@fbcode_macros//build_defs:rust_library.bzl", "rust_library") | ||
|
||
oncall("scm_server_infra") | ||
|
||
rust_library( | ||
name = "fb303_prometheus_exporter", | ||
srcs = glob(["src/**/*.rs"]), | ||
deps = [ | ||
"fbsource//third-party/rust:anyhow", | ||
"fbsource//third-party/rust:gotham", | ||
"fbsource//third-party/rust:hyper", | ||
"fbsource//third-party/rust:tokio", | ||
"//common/rust/gflags:gflags", | ||
"//common/rust/shed/fbinit:fbinit", | ||
"//fb303/thrift:fb303_core-rust-thriftclients", | ||
], | ||
) |
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