mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-21 23:08:23 +00:00
Tracing executor and metrics rename
This commit is contained in:
@@ -42,7 +42,7 @@ hex = { workspace = true }
|
||||
int_to_bytes = { workspace = true }
|
||||
itertools = { workspace = true }
|
||||
kzg = { workspace = true }
|
||||
lighthouse_metrics = { workspace = true }
|
||||
metrics = { workspace = true }
|
||||
lighthouse_version = { workspace = true }
|
||||
logging = { workspace = true }
|
||||
lru = { workspace = true }
|
||||
|
||||
@@ -74,7 +74,7 @@ use derivative::Derivative;
|
||||
use eth2::types::{BlockGossip, EventKind, PublishBlockRequest};
|
||||
use execution_layer::PayloadStatus;
|
||||
pub use fork_choice::{AttestationFromBlock, PayloadVerificationStatus};
|
||||
use lighthouse_metrics::TryExt;
|
||||
use metrics::TryExt;
|
||||
use parking_lot::RwLockReadGuard;
|
||||
use proto_array::Block as ProtoBlock;
|
||||
use safe_arith::ArithError;
|
||||
|
||||
@@ -2,7 +2,7 @@ use crate::observed_attesters::SlotSubcommitteeIndex;
|
||||
use crate::types::consts::altair::SYNC_COMMITTEE_SUBNET_COUNT;
|
||||
use crate::{BeaconChain, BeaconChainError, BeaconChainTypes};
|
||||
use bls::FixedBytesExtended;
|
||||
pub use lighthouse_metrics::*;
|
||||
pub use metrics::*;
|
||||
use slot_clock::SlotClock;
|
||||
use std::sync::LazyLock;
|
||||
use types::{BeaconState, Epoch, EthSpec, Hash256, Slot};
|
||||
|
||||
@@ -86,7 +86,7 @@ async fn produces_attestations_from_attestation_simulator_service() {
|
||||
let expected_miss_metrics_count = 0;
|
||||
let expected_hit_metrics_count =
|
||||
num_blocks_produced - UNAGGREGATED_ATTESTATION_LAG_SLOTS as u64;
|
||||
lighthouse_metrics::gather().iter().for_each(|mf| {
|
||||
metrics::gather().iter().for_each(|mf| {
|
||||
if hit_prometheus_metrics.contains(&mf.get_name()) {
|
||||
assert_eq!(
|
||||
mf.get_metric()[0].get_counter().get_value() as u64,
|
||||
|
||||
@@ -16,7 +16,7 @@ task_executor = { workspace = true }
|
||||
slot_clock = { workspace = true }
|
||||
lighthouse_network = { workspace = true }
|
||||
types = { workspace = true }
|
||||
lighthouse_metrics = { workspace = true }
|
||||
metrics = { workspace = true }
|
||||
parking_lot = { workspace = true }
|
||||
num_cpus = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
pub use lighthouse_metrics::*;
|
||||
pub use metrics::*;
|
||||
use std::sync::LazyLock;
|
||||
|
||||
/*
|
||||
|
||||
@@ -33,7 +33,7 @@ sensitive_url = { workspace = true }
|
||||
genesis = { workspace = true }
|
||||
task_executor = { workspace = true }
|
||||
environment = { workspace = true }
|
||||
lighthouse_metrics = { workspace = true }
|
||||
metrics = { workspace = true }
|
||||
time = "0.3.5"
|
||||
directory = { workspace = true }
|
||||
http_api = { workspace = true }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
pub use lighthouse_metrics::*;
|
||||
pub use metrics::*;
|
||||
use std::sync::LazyLock;
|
||||
|
||||
pub static SYNC_SLOTS_PER_SECOND: LazyLock<Result<IntGauge>> = LazyLock::new(|| {
|
||||
|
||||
@@ -25,7 +25,7 @@ logging = { workspace = true }
|
||||
superstruct = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
state_processing = { workspace = true }
|
||||
lighthouse_metrics = { workspace = true }
|
||||
metrics = { workspace = true }
|
||||
task_executor = { workspace = true }
|
||||
eth2 = { workspace = true }
|
||||
sensitive_url = { workspace = true }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
pub use lighthouse_metrics::*;
|
||||
pub use metrics::*;
|
||||
use std::sync::LazyLock;
|
||||
|
||||
/*
|
||||
|
||||
@@ -35,7 +35,7 @@ slot_clock = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
rand = { workspace = true }
|
||||
zeroize = { workspace = true }
|
||||
lighthouse_metrics = { workspace = true }
|
||||
metrics = { workspace = true }
|
||||
ethers-core = { workspace = true }
|
||||
builder_client = { path = "../builder_client" }
|
||||
fork_choice = { workspace = true }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
pub use lighthouse_metrics::*;
|
||||
pub use metrics::*;
|
||||
use std::sync::LazyLock;
|
||||
|
||||
pub const HIT: &str = "hit";
|
||||
|
||||
@@ -20,7 +20,7 @@ lighthouse_network = { workspace = true }
|
||||
eth1 = { workspace = true }
|
||||
state_processing = { workspace = true }
|
||||
lighthouse_version = { workspace = true }
|
||||
lighthouse_metrics = { workspace = true }
|
||||
metrics = { workspace = true }
|
||||
warp_utils = { workspace = true }
|
||||
slot_clock = { workspace = true }
|
||||
ethereum_ssz = { workspace = true }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
pub use lighthouse_metrics::*;
|
||||
pub use metrics::*;
|
||||
use std::sync::LazyLock;
|
||||
|
||||
pub static HTTP_API_PATHS_TOTAL: LazyLock<Result<IntCounterVec>> = LazyLock::new(|| {
|
||||
|
||||
@@ -14,7 +14,7 @@ beacon_chain = { workspace = true }
|
||||
store = { workspace = true }
|
||||
lighthouse_network = { workspace = true }
|
||||
slot_clock = { workspace = true }
|
||||
lighthouse_metrics = { workspace = true }
|
||||
metrics = { workspace = true }
|
||||
lighthouse_version = { workspace = true }
|
||||
warp_utils = { workspace = true }
|
||||
malloc_utils = { workspace = true }
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::Context;
|
||||
use beacon_chain::BeaconChainTypes;
|
||||
use lighthouse_metrics::TextEncoder;
|
||||
use lighthouse_network::prometheus_client::encoding::text::encode;
|
||||
use malloc_utils::scrape_allocator_metrics;
|
||||
use metrics::TextEncoder;
|
||||
|
||||
pub fn gather_prometheus_metrics<T: BeaconChainTypes>(
|
||||
ctx: &Context<T>,
|
||||
@@ -17,13 +17,13 @@ pub fn gather_prometheus_metrics<T: BeaconChainTypes>(
|
||||
// - Statically updated: things which are only updated at the time of the scrape (used where we
|
||||
// can avoid cluttering up code with metrics calls).
|
||||
//
|
||||
// The `lighthouse_metrics` crate has a `DEFAULT_REGISTRY` global singleton
|
||||
// The `metrics` crate has a `DEFAULT_REGISTRY` global singleton
|
||||
// which keeps the state of all the metrics. Dynamically updated things will already be
|
||||
// up-to-date in the registry (because they update themselves) however statically updated
|
||||
// things need to be "scraped".
|
||||
//
|
||||
// We proceed by, first updating all the static metrics using `scrape_for_metrics(..)`. Then,
|
||||
// using `lighthouse_metrics::gather(..)` to collect the global `DEFAULT_REGISTRY` metrics into
|
||||
// using `metrics::gather(..)` to collect the global `DEFAULT_REGISTRY` metrics into
|
||||
// a string that can be returned via HTTP.
|
||||
|
||||
if let Some(beacon_chain) = ctx.chain.as_ref() {
|
||||
@@ -48,7 +48,7 @@ pub fn gather_prometheus_metrics<T: BeaconChainTypes>(
|
||||
}
|
||||
|
||||
encoder
|
||||
.encode_utf8(&lighthouse_metrics::gather(), &mut buffer)
|
||||
.encode_utf8(&metrics::gather(), &mut buffer)
|
||||
.unwrap();
|
||||
// encode gossipsub metrics also if they exist
|
||||
if let Some(registry) = ctx.gossipsub_registry.as_ref() {
|
||||
|
||||
@@ -21,7 +21,7 @@ futures = { workspace = true }
|
||||
error-chain = { workspace = true }
|
||||
dirs = { workspace = true }
|
||||
fnv = { workspace = true }
|
||||
lighthouse_metrics = { workspace = true }
|
||||
metrics = { workspace = true }
|
||||
smallvec = { workspace = true }
|
||||
tokio-io-timeout = "1"
|
||||
lru = { workspace = true }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
pub use lighthouse_metrics::*;
|
||||
pub use metrics::*;
|
||||
use std::sync::LazyLock;
|
||||
|
||||
pub static NAT_OPEN: LazyLock<Result<IntGaugeVec>> = LazyLock::new(|| {
|
||||
|
||||
@@ -37,7 +37,7 @@ smallvec = { workspace = true }
|
||||
rand = { workspace = true }
|
||||
fnv = { workspace = true }
|
||||
alloy-rlp = { workspace = true }
|
||||
lighthouse_metrics = { workspace = true }
|
||||
metrics = { workspace = true }
|
||||
logging = { workspace = true }
|
||||
task_executor = { workspace = true }
|
||||
igd-next = "0.14"
|
||||
|
||||
@@ -5,11 +5,11 @@ use beacon_chain::{
|
||||
sync_committee_verification::Error as SyncCommitteeError,
|
||||
};
|
||||
use fnv::FnvHashMap;
|
||||
pub use lighthouse_metrics::*;
|
||||
use lighthouse_network::{
|
||||
peer_manager::peerdb::client::ClientKind, types::GossipKind, GossipTopic, Gossipsub,
|
||||
NetworkGlobals,
|
||||
};
|
||||
pub use metrics::*;
|
||||
use std::sync::{Arc, LazyLock};
|
||||
use strum::IntoEnumIterator;
|
||||
use types::EthSpec;
|
||||
|
||||
@@ -8,9 +8,9 @@ use crate::sync::{network_context::SyncNetworkContext, BatchOperationOutcome, Ba
|
||||
use beacon_chain::block_verification_types::RpcBlock;
|
||||
use beacon_chain::BeaconChainTypes;
|
||||
use fnv::FnvHashMap;
|
||||
use lighthouse_metrics::set_int_gauge;
|
||||
use lighthouse_network::service::api_types::Id;
|
||||
use lighthouse_network::{PeerAction, PeerId};
|
||||
use metrics::set_int_gauge;
|
||||
use rand::seq::SliceRandom;
|
||||
use rand::Rng;
|
||||
use slog::{crit, debug, o, warn};
|
||||
|
||||
@@ -7,7 +7,7 @@ edition = { workspace = true }
|
||||
[dependencies]
|
||||
derivative = { workspace = true }
|
||||
itertools = { workspace = true }
|
||||
lighthouse_metrics = { workspace = true }
|
||||
metrics = { workspace = true }
|
||||
parking_lot = { workspace = true }
|
||||
types = { workspace = true }
|
||||
state_processing = { workspace = true }
|
||||
@@ -25,4 +25,4 @@ tokio = { workspace = true }
|
||||
maplit = { workspace = true }
|
||||
|
||||
[features]
|
||||
portable = ["beacon_chain/portable"]
|
||||
portable = ["beacon_chain/portable"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
pub use lighthouse_metrics::*;
|
||||
pub use metrics::*;
|
||||
use std::sync::LazyLock;
|
||||
|
||||
pub static BUILD_REWARD_CACHE_TIME: LazyLock<Result<Histogram>> = LazyLock::new(|| {
|
||||
|
||||
@@ -20,7 +20,7 @@ safe_arith = { workspace = true }
|
||||
state_processing = { workspace = true }
|
||||
slog = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
lighthouse_metrics = { workspace = true }
|
||||
metrics = { workspace = true }
|
||||
lru = { workspace = true }
|
||||
sloggers = { workspace = true }
|
||||
directory = { workspace = true }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
pub use lighthouse_metrics::{set_gauge, try_create_int_gauge, *};
|
||||
pub use metrics::{set_gauge, try_create_int_gauge, *};
|
||||
|
||||
use directory::size_of_dir;
|
||||
use std::path::Path;
|
||||
|
||||
Reference in New Issue
Block a user