mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +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:
@@ -2,7 +2,6 @@ use crate::{BeaconChain, BeaconChainError, BeaconChainTypes, StateSkipConfig};
|
||||
use attesting_indices_base::get_attesting_indices;
|
||||
use eth2::lighthouse::StandardBlockReward;
|
||||
use safe_arith::SafeArith;
|
||||
use slog::error;
|
||||
use state_processing::common::attesting_indices_base;
|
||||
use state_processing::{
|
||||
common::{
|
||||
@@ -19,6 +18,7 @@ use store::{
|
||||
consts::altair::{PARTICIPATION_FLAG_WEIGHTS, PROPOSER_WEIGHT, WEIGHT_DENOMINATOR},
|
||||
RelativeEpoch,
|
||||
};
|
||||
use tracing::error;
|
||||
use types::{AbstractExecPayload, BeaconBlockRef, BeaconState, BeaconStateError, EthSpec};
|
||||
|
||||
type BeaconBlockSubRewardValue = u64;
|
||||
@@ -56,9 +56,8 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
.compute_beacon_block_proposer_slashing_reward(block, state)
|
||||
.map_err(|e| {
|
||||
error!(
|
||||
self.log,
|
||||
"Error calculating proposer slashing reward";
|
||||
"error" => ?e
|
||||
error = ?e,
|
||||
"Error calculating proposer slashing reward"
|
||||
);
|
||||
BeaconChainError::BlockRewardError
|
||||
})?;
|
||||
@@ -67,9 +66,8 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
.compute_beacon_block_attester_slashing_reward(block, state)
|
||||
.map_err(|e| {
|
||||
error!(
|
||||
self.log,
|
||||
"Error calculating attester slashing reward";
|
||||
"error" => ?e
|
||||
error = ?e,
|
||||
"Error calculating attester slashing reward"
|
||||
);
|
||||
BeaconChainError::BlockRewardError
|
||||
})?;
|
||||
@@ -78,9 +76,8 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
self.compute_beacon_block_attestation_reward_base(block, state)
|
||||
.map_err(|e| {
|
||||
error!(
|
||||
self.log,
|
||||
"Error calculating base block attestation reward";
|
||||
"error" => ?e
|
||||
error = ?e,
|
||||
"Error calculating base block attestation reward"
|
||||
);
|
||||
BeaconChainError::BlockRewardAttestationError
|
||||
})?
|
||||
@@ -88,9 +85,8 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
self.compute_beacon_block_attestation_reward_altair_deneb(block, state)
|
||||
.map_err(|e| {
|
||||
error!(
|
||||
self.log,
|
||||
"Error calculating altair block attestation reward";
|
||||
"error" => ?e
|
||||
error = ?e,
|
||||
"Error calculating altair block attestation reward"
|
||||
);
|
||||
BeaconChainError::BlockRewardAttestationError
|
||||
})?
|
||||
|
||||
Reference in New Issue
Block a user