-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adjust log levels and remove tracing::trace!() #879
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,7 +146,7 @@ impl Indexer { | |
block_height: BlockHeight, | ||
gcp: &GcpService, | ||
) -> Result<(), DatastoreStorageError> { | ||
tracing::trace!(block_height, "update_block_height"); | ||
tracing::debug!(block_height, "update_block_height"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like this and many other logs do not have a span. Do we want to add it everywhere and in the indexer in particular? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's going to have a target in the log to filter on. We don't use span at all. |
||
*self.last_updated_timestamp.write().await = Instant::now(); | ||
self.latest_block_height | ||
.write() | ||
|
@@ -170,11 +170,11 @@ async fn handle_block( | |
mut block: near_lake_primitives::block::Block, | ||
ctx: &Context, | ||
) -> anyhow::Result<()> { | ||
tracing::trace!(block_height = block.block_height(), "handle_block"); | ||
tracing::debug!(block_height = block.block_height(), "handle_block"); | ||
let mut pending_requests = Vec::new(); | ||
for action in block.actions().cloned().collect::<Vec<_>>() { | ||
if action.receiver_id() == ctx.mpc_contract_id { | ||
tracing::trace!("got action targeting {}", ctx.mpc_contract_id); | ||
tracing::debug!("got action targeting {}", ctx.mpc_contract_id); | ||
let Some(receipt) = block.receipt_by_id(&action.receipt_id()) else { | ||
let err = format!( | ||
"indexer unable to find block for receipt_id={}", | ||
|
@@ -190,7 +190,7 @@ async fn handle_block( | |
continue; | ||
}; | ||
if function_call.method_name() == "sign" { | ||
tracing::trace!("found `sign` function call"); | ||
tracing::debug!("found `sign` function call"); | ||
let arguments = | ||
match serde_json::from_slice::<'_, SignArguments>(function_call.args()) { | ||
Ok(arguments) => arguments, | ||
|
@@ -369,7 +369,7 @@ pub fn run( | |
let outcome = rt.block_on(async { | ||
if i > 0 { | ||
// give it some time to catch up | ||
tracing::trace!("giving indexer some time to catch up"); | ||
tracing::debug!("giving indexer some time to catch up"); | ||
backoff(i, 10, 300); | ||
} | ||
// while running, we will keep the task spinning, and check every so often if | ||
|
@@ -383,7 +383,7 @@ pub fn run( | |
|
||
// Abort the indexer task if it's still running. | ||
if !join_handle.is_finished() { | ||
tracing::trace!("aborting indexer task"); | ||
tracing::debug!("aborting indexer task"); | ||
join_handle.abort(); | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -226,20 +226,20 @@ impl MpcSignProtocol { | |
|
||
loop { | ||
let protocol_time = Instant::now(); | ||
tracing::trace!("trying to advance chain signatures protocol"); | ||
tracing::debug!("trying to advance chain signatures protocol"); | ||
loop { | ||
let msg_result = self.receiver.try_recv(); | ||
match msg_result { | ||
Ok(msg) => { | ||
tracing::trace!("received a new message"); | ||
tracing::debug!("received a new message"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I vote to get rid of this log actually. Does not add much value because we're supposed to always be receiving messages. And this is going to show per protocol message which can be in the millions There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nah. Actually when things get stuck, we start "no new message received". And it helps to know if it's the node not receiving anything or it not doing anything |
||
queue.push(msg); | ||
} | ||
Err(TryRecvError::Empty) => { | ||
tracing::trace!("no new messages received"); | ||
tracing::debug!("no new messages received"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same with this one. If anything we should have a message that shows how many messages we received in this loop There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same with above There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so this is for every triple/presignature/signature message, so it's better just to keep tally of how many messages we received instead of just printing the same message on every message. We'd still be able to understand that the node is receiving messages |
||
break; | ||
} | ||
Err(TryRecvError::Disconnected) => { | ||
tracing::debug!("communication was disconnected, no more messages will be received, spinning down"); | ||
tracing::warn!("communication was disconnected, no more messages will be received, spinning down"); | ||
return Ok(()); | ||
} | ||
} | ||
|
@@ -296,7 +296,7 @@ impl MpcSignProtocol { | |
let crypto_time = Instant::now(); | ||
let mut state = match state.progress(&mut self).await { | ||
Ok(state) => { | ||
tracing::trace!("progress ok: {state}"); | ||
tracing::debug!("progress ok: {state}"); | ||
state | ||
} | ||
Err(err) => { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come this is now info? Do you think it's important to surface this info? This is going to spam a lot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this helps to know if messages were successfully sent, what spams is "sending encrypted", this one is much better