Skip to content

Commit

Permalink
Capture metrics for graphql api (#1113)
Browse files Browse the repository at this point in the history
closes #1036

based on #1090, but completes the work and squashes into a single commit
for easy cherry-picking

pulls in all changes from
#1114
  • Loading branch information
Voxelot authored Apr 20, 2023
1 parent ab60ed5 commit 5846339
Show file tree
Hide file tree
Showing 17 changed files with 256 additions and 88 deletions.
79 changes: 52 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 25 additions & 24 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,32 +45,32 @@ homepage = "https://fuel.network/"
keywords = ["blockchain", "cryptocurrencies", "fuel-vm", "vm"]
license = "BUSL-1.1"
repository = "https://github.com/FuelLabs/fuel-core"
version = "0.17.8"
version = "0.17.9"

[workspace.dependencies]
# Workspace members
fuel-core = { version = "0.17.8", path = "./crates/fuel-core", default-features = false }
fuel-core-client-bin = { version = "0.17.8", path = "./bin/client" }
fuel-core-bin = { version = "0.17.8", path = "./bin/fuel-core" }
fuel-core-keygen = { version = "0.17.8", path = "./bin/keygen" }
fuel-core-chain-config = { version = "0.17.8", path = "./crates/chain-config" }
fuel-core-client = { version = "0.17.8", path = "./crates/client" }
fuel-core-database = { version = "0.17.8", path = "./crates/database" }
fuel-core-metrics = { version = "0.17.8", path = "./crates/metrics" }
fuel-core-services = { version = "0.17.8", path = "./crates/services" }
fuel-core-consensus-module = { version = "0.17.8", path = "./crates/services/consensus_module" }
fuel-core-bft = { version = "0.17.8", path = "./crates/services/consensus_module/bft" }
fuel-core-poa = { version = "0.17.8", path = "./crates/services/consensus_module/poa" }
fuel-core-executor = { version = "0.17.8", path = "./crates/services/executor" }
fuel-core-importer = { version = "0.17.8", path = "./crates/services/importer" }
fuel-core-p2p = { version = "0.17.8", path = "./crates/services/p2p" }
fuel-core-producer = { version = "0.17.8", path = "./crates/services/producer" }
fuel-core-relayer = { version = "0.17.8", path = "./crates/services/relayer" }
fuel-core-sync = { version = "0.17.8", path = "./crates/services/sync" }
fuel-core-txpool = { version = "0.17.8", path = "./crates/services/txpool" }
fuel-core-storage = { version = "0.17.8", path = "./crates/storage" }
fuel-core-trace = { version = "0.17.8", path = "./crates/trace" }
fuel-core-types = { version = "0.17.8", path = "./crates/types", default-features = false }
fuel-core = { version = "0.17.9", path = "./crates/fuel-core", default-features = false }
fuel-core-client-bin = { version = "0.17.9", path = "./bin/client" }
fuel-core-bin = { version = "0.17.9", path = "./bin/fuel-core" }
fuel-core-keygen = { version = "0.17.9", path = "./bin/keygen" }
fuel-core-chain-config = { version = "0.17.9", path = "./crates/chain-config" }
fuel-core-client = { version = "0.17.9", path = "./crates/client" }
fuel-core-database = { version = "0.17.9", path = "./crates/database" }
fuel-core-metrics = { version = "0.17.9", path = "./crates/metrics" }
fuel-core-services = { version = "0.17.9", path = "./crates/services" }
fuel-core-consensus-module = { version = "0.17.9", path = "./crates/services/consensus_module" }
fuel-core-bft = { version = "0.17.9", path = "./crates/services/consensus_module/bft" }
fuel-core-poa = { version = "0.17.9", path = "./crates/services/consensus_module/poa" }
fuel-core-executor = { version = "0.17.9", path = "./crates/services/executor" }
fuel-core-importer = { version = "0.17.9", path = "./crates/services/importer" }
fuel-core-p2p = { version = "0.17.9", path = "./crates/services/p2p" }
fuel-core-producer = { version = "0.17.9", path = "./crates/services/producer" }
fuel-core-relayer = { version = "0.17.9", path = "./crates/services/relayer" }
fuel-core-sync = { version = "0.17.9", path = "./crates/services/sync" }
fuel-core-txpool = { version = "0.17.9", path = "./crates/services/txpool" }
fuel-core-storage = { version = "0.17.9", path = "./crates/storage" }
fuel-core-trace = { version = "0.17.9", path = "./crates/trace" }
fuel-core-types = { version = "0.17.9", path = "./crates/types", default-features = false }
fuel-core-tests = { version = "0.0.0", path = "./tests" }
fuel-core-xtask = { version = "0.0.0", path = "./xtask" }

Expand Down Expand Up @@ -99,8 +99,9 @@ mockall = "0.11"
test-case = "2.2"
axum = "0.5"
lazy_static = "1.4"
libp2p-prom-client = { package = "prometheus-client", version = "0.18" }
once_cell = "1.16"
prometheus-client = "0.18"
prometheus-client = "0.20"
itertools = "0.10"
insta = "1.8"
tempfile = "3.4"
2 changes: 1 addition & 1 deletion bin/e2e-test-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ insta = { workspace = true }
tempfile = { workspace = true }

[features]
default = ["fuel-core?/default"]
default = ["fuel-core?/default", "fuel-core?/metrics"]
p2p = ["fuel-core?/p2p"]
dev-deps = ["fuel-core/test-helpers"]
2 changes: 2 additions & 0 deletions crates/fuel-core/src/graphql_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ use std::net::SocketAddr;

mod honeycomb;
pub mod ports;
#[cfg(feature = "metrics")]
pub(crate) mod prometheus;
pub mod service;

#[derive(Clone, Debug)]
Expand Down
Loading

0 comments on commit 5846339

Please sign in to comment.