mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-17 03:42:46 +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,6 +1,6 @@
|
||||
use crate::chunked_vector::{chunk_key, Chunk, Field};
|
||||
use crate::{HotColdDB, ItemStore};
|
||||
use slog::error;
|
||||
use tracing::error;
|
||||
use types::{ChainSpec, EthSpec, Slot};
|
||||
|
||||
/// Iterator over the values of a `BeaconState` vector field (like `block_roots`).
|
||||
@@ -82,9 +82,8 @@ where
|
||||
.cloned()
|
||||
.or_else(|| {
|
||||
error!(
|
||||
self.store.log,
|
||||
"Missing chunk value in forwards iterator";
|
||||
"vector index" => vindex
|
||||
vector_index = vindex,
|
||||
"Missing chunk value in forwards iterator"
|
||||
);
|
||||
None
|
||||
})?;
|
||||
@@ -100,19 +99,17 @@ where
|
||||
)
|
||||
.map_err(|e| {
|
||||
error!(
|
||||
self.store.log,
|
||||
"Database error in forwards iterator";
|
||||
"chunk index" => self.next_cindex,
|
||||
"error" => format!("{:?}", e)
|
||||
chunk_index = self.next_cindex,
|
||||
error = ?e,
|
||||
"Database error in forwards iterator"
|
||||
);
|
||||
e
|
||||
})
|
||||
.ok()?
|
||||
.or_else(|| {
|
||||
error!(
|
||||
self.store.log,
|
||||
"Missing chunk in forwards iterator";
|
||||
"chunk index" => self.next_cindex
|
||||
chunk_index = self.next_cindex,
|
||||
"Missing chunk in forwards iterator"
|
||||
);
|
||||
None
|
||||
})?;
|
||||
|
||||
Reference in New Issue
Block a user