Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracing events #40

Draft
wants to merge 31 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d2e89ca
feat: add tracing crates
Karrenbelt Sep 4, 2024
66d053a
feat: replace `log` with `tracing` crate in grandine/src/main.rs
Karrenbelt Sep 4, 2024
558b6ae
feat: improve tracing setup and add stdout writer
Karrenbelt Sep 4, 2024
b14b17b
feat: replace all log with tracing in grandine module
Karrenbelt Sep 4, 2024
9596fa0
chore: cleanup unused imports
Karrenbelt Sep 4, 2024
eff1618
feat: replace all log with tracing in attestation_verifier module
Karrenbelt Sep 4, 2024
6e387dd
feat: replace all log with tracing in ad_hoc_bench module
Karrenbelt Sep 4, 2024
1292575
feat: replace all log with tracing in block_producer module
Karrenbelt Sep 4, 2024
f4e4cfa
feat: replace all log with tracing in builder_api module
Karrenbelt Sep 4, 2024
8ccce1c
feat: replace all log with tracing in database module
Karrenbelt Sep 4, 2024
69f3fd5
feat: replace all log with tracing in eth1 module
Karrenbelt Sep 4, 2024
bc412e2
feat: replace all log with tracing in eth1_api module
Karrenbelt Sep 4, 2024
a84660c
feat: replace all log with tracing in fork_choice_control module
Karrenbelt Sep 4, 2024
50af7a7
feat: replace all log with tracing in http_api module
Karrenbelt Sep 4, 2024
0b63a36
feat: replace all log with tracing in http_api_utils module
Karrenbelt Sep 4, 2024
27229c5
feat: replace all log with tracing in keymanager module
Karrenbelt Sep 4, 2024
682d74f
feat: replace all log with tracing in liveness_tracker module
Karrenbelt Sep 4, 2024
afb5bcb
feat: replace all log with tracing in metrics module
Karrenbelt Sep 4, 2024
dbd466d
feat: replace all log with tracing in operation_pools module
Karrenbelt Sep 4, 2024
34dd77d
feat: replace all log with tracing in prometheus_metrics module
Karrenbelt Sep 4, 2024
5fb013d
feat: replace all log with tracing in runtime module
Karrenbelt Sep 4, 2024
4bc3bc2
feat: replace all log with tracing in signer module
Karrenbelt Sep 4, 2024
cde29c0
feat: replace all log with tracing in slasher module
Karrenbelt Sep 4, 2024
d8f8f7e
feat: replace all log with tracing in slashing_protection module
Karrenbelt Sep 4, 2024
99390a4
feat: replace all log with tracing in state_cache module
Karrenbelt Sep 4, 2024
41a7309
draft tracing
bomanaps Sep 7, 2024
b3b38fa
Tracing draft
bomanaps Sep 7, 2024
18a45f7
Improved correction on Tracin
bomanaps Sep 8, 2024
ef61fe8
add tracing to fork_choice_control
bomanaps Sep 22, 2024
e245c03
Added Timing Metrics to Fork_choice_control
bomanaps Oct 9, 2024
f6c4290
Update block_processor with fmt implementation for TimingMetrics
bomanaps Oct 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
162 changes: 133 additions & 29 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,8 @@ tokio-util = { version = '0.7', features = ['codec', 'compat', 'time'] }
tower = { version = '0.4.13', features = ['timeout'] }
tower-http = { version = '0.5.2', features = ['cors', 'trace'] }
tracing = '0.1.40'
tracing-appender = "0.2.3"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
triomphe = '0.1.13'
tynm = '0.1.10'
typenum = '1.17.0'
Expand Down
2 changes: 1 addition & 1 deletion ad_hoc_bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ fork_choice_control = { workspace = true }
fork_choice_store = { workspace = true }
futures = { workspace = true }
jemalloc-ctl = { workspace = true }
log = { workspace = true }
rand = { workspace = true }
tracing = { workspace = true }
types = { workspace = true }
2 changes: 1 addition & 1 deletion ad_hoc_bench/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use eth2_cache_utils::{goerli, holesky, holesky_devnet, mainnet, medalla, withdr
use fork_choice_control::AdHocBenchController;
use fork_choice_store::StoreConfig;
use jemalloc_ctl::Result as JemallocResult;
use log::info;
use tracing::info;
use rand::seq::SliceRandom as _;
use types::{
combined::{BeaconState, SignedBeaconBlock},
Expand Down
2 changes: 1 addition & 1 deletion attestation_verifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ fork_choice_store = { workspace = true }
futures = { workspace = true }
helper_functions = { workspace = true }
itertools = { workspace = true }
log = { workspace = true }
prometheus_metrics = { workspace = true }
rayon = { workspace = true }
std_ext = { workspace = true }
tracing = {workspace = true }
types = { workspace = true }
2 changes: 1 addition & 1 deletion attestation_verifier/src/attestation_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use helper_functions::{
verifier::{MultiVerifier, Triple, Verifier},
};
use itertools::Either;
use log::{debug, warn};
use tracing::{debug, warn};
use prometheus_metrics::Metrics;
use rayon::iter::{IntoParallelIterator as _, ParallelBridge as _, ParallelIterator as _};
use std_ext::ArcExt as _;
Expand Down
2 changes: 1 addition & 1 deletion block_producer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ futures = { workspace = true }
helper_functions = { workspace = true }
itertools = { workspace = true }
keymanager = { workspace = true }
log = { workspace = true }
nonzero_ext = { workspace = true }
operation_pools = { workspace = true }
prometheus_metrics = { workspace = true }
Expand All @@ -36,6 +35,7 @@ std_ext = { workspace = true }
tap = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
transition_functions = { workspace = true }
try_from_iterator = { workspace = true }
tynm = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion block_producer/src/block_producer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use futures::{
use helper_functions::{accessors, misc, predicates};
use itertools::{Either, Itertools as _};
use keymanager::ProposerConfigs;
use log::{error, info, warn};
use tracing::{error, info, warn};
use nonzero_ext::nonzero;
use operation_pools::{
AttestationAggPool, BlsToExecutionChangePool, PoolAdditionOutcome, PoolRejectionReason,
Expand Down
2 changes: 1 addition & 1 deletion block_producer/src/eth1_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use deposit_tree::DepositTree;
use eth1::{DepositEvent, Eth1Block, Eth1Chain};
use helper_functions::misc::compute_timestamp_at_slot;
use itertools::Itertools as _;
use log::{error, warn};
use tracing::{error, warn};
use prometheus_metrics::Metrics;
use ssz::ContiguousList;
use thiserror::Error;
Expand Down
2 changes: 1 addition & 1 deletion builder_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ derive_more = { workspace = true }
helper_functions = { workspace = true }
hex-literal = { workspace = true }
itertools = { workspace = true }
log = { workspace = true }
prometheus_metrics = { workspace = true }
reqwest = { workspace = true }
serde = { workspace = true }
serde_utils = { workspace = true }
ssz = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
typenum = { workspace = true }
types = { workspace = true }

Expand Down
2 changes: 1 addition & 1 deletion builder_api/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use bls::PublicKeyBytes;
use derive_more::Constructor;
use helper_functions::signing::SignForAllForks;
use itertools::Itertools as _;
use log::{debug, info};
use tracing::{debug, info};
use prometheus_metrics::Metrics;
use reqwest::{Client, Response, StatusCode, Url};
use ssz::SszHash as _;
Expand Down
1 change: 0 additions & 1 deletion consensus-spec-tests
Submodule consensus-spec-tests deleted from 5df4cd
2 changes: 1 addition & 1 deletion database/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ fs-err = { workspace = true }
im = { workspace = true }
itertools = { workspace = true }
libmdbx = { workspace = true }
log = { workspace = true }
snap = { workspace = true }
std_ext = { workspace = true }
tap = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
unwrap_none = { workspace = true }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion database/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use bytesize::ByteSize;
use im::OrdMap;
use itertools::Either;
use libmdbx::{DatabaseFlags, Environment, Geometry, WriteFlags};
use log::info;
use tracing::info;
use snap::raw::{Decoder, Encoder};
use std_ext::ArcExt as _;
use tap::Pipe as _;
Expand Down
2 changes: 1 addition & 1 deletion eth1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ fs-err = { workspace = true }
futures = { workspace = true }
genesis = { workspace = true }
itertools = { workspace = true }
log = { workspace = true }
prometheus_metrics = { workspace = true }
reqwest = { workspace = true }
ssz = { workspace = true }
std_ext = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
tokio-stream = { workspace = true }
tracing = { workspace = true }
tynm = { workspace = true }
types = { workspace = true }
url = { workspace = true }
2 changes: 1 addition & 1 deletion eth1/src/download_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::sync::Arc;
use anyhow::{Context as _, Result};
use eth1_api::{Eth1Api, Eth1ApiToMetrics, Eth1Block};
use futures::channel::mpsc::UnboundedSender;
use log::{info, warn};
use tracing::{info, warn};
use prometheus_metrics::Metrics;
use reqwest::Client;
use std_ext::ArcExt as _;
Expand Down
2 changes: 1 addition & 1 deletion eth1/src/eth1_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use futures::{
channel::mpsc::UnboundedSender,
stream::{Stream, TryStreamExt as _},
};
use log::{error, info};
use tracing::{error, info};
use prometheus_metrics::Metrics;
use reqwest::Client;
use std_ext::ArcExt as _;
Expand Down
2 changes: 1 addition & 1 deletion eth1/src/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use chrono::{Local, TimeZone as _};
use eth1_api::{DepositEvent, Eth1Block};
use futures::stream::{Stream, TryStreamExt as _};
use genesis::Incremental;
use log::info;
use tracing::info;
use ssz::{SszRead as _, SszWrite as _};
use thiserror::Error;
use types::{
Expand Down
2 changes: 1 addition & 1 deletion eth1_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ futures = { workspace = true }
hex = { workspace = true }
hex-literal = { workspace = true }
jwt-simple = { workspace = true }
log = { workspace = true }
memoffset = { workspace = true }
panics = { workspace = true }
prometheus_metrics = { workspace = true }
Expand All @@ -33,6 +32,7 @@ static_assertions = { workspace = true }
std_ext = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
typenum = { workspace = true }
types = { workspace = true }
web3 = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion eth1_api/src/eth1_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use execution_engine::{
ForkChoiceUpdatedResponse, PayloadAttributes, PayloadId, PayloadStatusV1,
};
use futures::{channel::mpsc::UnboundedSender, lock::Mutex, Future};
use log::warn;
use tracing::warn;
use prometheus_metrics::Metrics;
use reqwest::{header::HeaderMap, Client, Url};
use serde::{de::DeserializeOwned, Deserialize};
Expand Down
2 changes: 1 addition & 1 deletion eth1_api/src/eth1_execution_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use derive_more::Constructor;
use either::Either;
use execution_engine::{ExecutionEngine, PayloadAttributes, PayloadId, PayloadStatusV1};
use futures::channel::{mpsc::UnboundedSender, oneshot::Sender};
use log::{info, warn};
use tracing::{info, warn};
use tokio::runtime::{Builder, Handle};
use types::{
combined::{ExecutionPayload, ExecutionPayloadParams},
Expand Down
2 changes: 1 addition & 1 deletion eth1_api/src/execution_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use either::Either;
use execution_engine::{ForkChoiceUpdatedResponse, PayloadAttributes, PayloadStatusV1};
use fork_choice_control::Wait;
use futures::{channel::mpsc::UnboundedReceiver, StreamExt as _};
use log::warn;
use tracing::warn;
use types::{
combined::{ExecutionPayload, ExecutionPayloadParams},
nonstandard::Phase,
Expand Down
2 changes: 1 addition & 1 deletion eth1_api/src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use anyhow::Result;
use either::Either;
use execution_engine::{PayloadAttributes, PayloadId, PayloadStatusV1};
use futures::channel::{mpsc::UnboundedSender, oneshot::Sender};
use log::debug;
use tracing::debug;
use types::{
combined::{ExecutionPayload, ExecutionPayloadParams},
nonstandard::Phase,
Expand Down
Binary file added features/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion fork_choice_control/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ genesis = { workspace = true }
helper_functions = { workspace = true }
http_api_utils = { workspace = true }
itertools = { workspace = true }
log = { workspace = true }
mime = { workspace = true }
nonzero_ext = { workspace = true }
num_cpus = { workspace = true }
Expand All @@ -42,6 +41,7 @@ std_ext = { workspace = true }
strum = { workspace = true }
tap = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
transition_functions = { workspace = true }
tynm = { workspace = true }
types = { workspace = true }
Expand Down
Loading