mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-16 03:12:41 +00:00
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:
@@ -1,9 +1,9 @@
|
||||
use beacon_node_fallback::BeaconNodeFallback;
|
||||
use environment::RuntimeContext;
|
||||
use slog::debug;
|
||||
use slot_clock::SlotClock;
|
||||
use std::sync::Arc;
|
||||
use tokio::time::sleep;
|
||||
use tracing::debug;
|
||||
use types::EthSpec;
|
||||
|
||||
/// The latency service will run 11/12ths of the way through the slot.
|
||||
@@ -17,8 +17,6 @@ pub fn start_latency_service<T: SlotClock + 'static, E: EthSpec>(
|
||||
slot_clock: T,
|
||||
beacon_nodes: Arc<BeaconNodeFallback<T, E>>,
|
||||
) {
|
||||
let log = context.log().clone();
|
||||
|
||||
let future = async move {
|
||||
loop {
|
||||
let sleep_time = slot_clock
|
||||
@@ -39,10 +37,9 @@ pub fn start_latency_service<T: SlotClock + 'static, E: EthSpec>(
|
||||
for (i, measurement) in beacon_nodes.measure_latency().await.iter().enumerate() {
|
||||
if let Some(latency) = measurement.latency {
|
||||
debug!(
|
||||
log,
|
||||
"Measured BN latency";
|
||||
"node" => &measurement.beacon_node_id,
|
||||
"latency" => latency.as_millis(),
|
||||
node = &measurement.beacon_node_id,
|
||||
latency = latency.as_millis(),
|
||||
"Measured BN latency"
|
||||
);
|
||||
validator_metrics::observe_timer_vec(
|
||||
&validator_metrics::VC_BEACON_NODE_LATENCY,
|
||||
|
||||
Reference in New Issue
Block a user