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,6 +1,6 @@
use crate::engine_api::{Error as ApiError, PayloadStatusV1, PayloadStatusV1Status};
use crate::engines::EngineError;
use slog::{warn, Logger};
use tracing::warn;
use types::ExecutionBlockHash;
/// Provides a simpler, easier to parse version of `PayloadStatusV1` for upstream users.
@@ -26,15 +26,10 @@ pub enum PayloadStatus {
pub fn process_payload_status(
head_block_hash: ExecutionBlockHash,
status: Result<PayloadStatusV1, EngineError>,
log: &Logger,
) -> Result<PayloadStatus, EngineError> {
match status {
Err(error) => {
warn!(
log,
"Error whilst processing payload status";
"error" => ?error,
);
warn!(?error, "Error whilst processing payload status");
Err(error)
}
Ok(response) => match &response.status {
@@ -66,10 +61,9 @@ pub fn process_payload_status(
// warning here.
if response.latest_valid_hash.is_some() {
warn!(
log,
"Malformed response from execution engine";
"msg" => "expected a null latest_valid_hash",
"status" => ?response.status
msg = "expected a null latest_valid_hash",
status = ?response.status,
"Malformed response from execution engine"
)
}
@@ -82,10 +76,9 @@ pub fn process_payload_status(
// warning here.
if response.latest_valid_hash.is_some() {
warn!(
log,
"Malformed response from execution engine";
"msg" => "expected a null latest_valid_hash",
"status" => ?response.status
msg = "expected a null latest_valid_hash",
status = ?response.status,
"Malformed response from execution engine"
)
}
@@ -96,10 +89,9 @@ pub fn process_payload_status(
// warning here.
if response.latest_valid_hash.is_some() {
warn!(
log,
"Malformed response from execution engine";
"msg" => "expected a null latest_valid_hash",
"status" => ?response.status
msg = "expected a null latest_valid_hash",
status = ?response.status,
"Malformed response from execution engine"
)
}