Integrate tracing (#6339)

Tracing Integration
- [reference](5bbf1859e9/projects/project-ideas.md (L297))


  - [x] replace slog & log with tracing throughout the codebase
- [x] implement custom crit log
- [x] make relevant changes in the formatter
- [x] replace sloggers
- [x] re-write SSE logging components

cc: @macladson @eserilev
This commit is contained in:
ThreeHrSleep
2025-03-13 04:01:05 +05:30
committed by GitHub
parent f23f984f85
commit d60c24ef1c
241 changed files with 9485 additions and 9328 deletions

View File

@@ -1,22 +1,19 @@
//! The subnet predicate used for searching for a particular subnet.
use super::*;
use crate::types::{EnrAttestationBitfield, EnrSyncCommitteeBitfield};
use slog::trace;
use std::ops::Deref;
use tracing::trace;
use types::data_column_custody_group::compute_subnets_for_node;
use types::ChainSpec;
/// Returns the predicate for a given subnet.
pub fn subnet_predicate<E>(
subnets: Vec<Subnet>,
log: &slog::Logger,
spec: Arc<ChainSpec>,
) -> impl Fn(&Enr) -> bool + Send
where
E: EthSpec,
{
let log_clone = log.clone();
move |enr: &Enr| {
let attestation_bitfield: EnrAttestationBitfield<E> = match enr.attestation_bitfield::<E>()
{
@@ -48,9 +45,8 @@ where
if !predicate {
trace!(
log_clone,
"Peer found but not on any of the desired subnets";
"peer_id" => %enr.peer_id()
peer_id = %enr.peer_id(),
"Peer found but not on any of the desired subnets"
);
}
predicate