mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 15:11:03 +00:00
observability: tracing gum, automatically cross ref traceID (#5079)
* add some gum * bump expander * gum * fix all remaining issues * last fixup * Update node/gum/proc-macro/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * change * netowrk * fixins * chore * allow optional fmt str + args, prep for expr as kv field * tracing -> gum rename fallout * restrict further * allow multiple levels of field accesses * another round of docs and a slip of the pen * update ADR * fixup lock fiel * use target: instead of target= * minors * fix * chore * Update node/gum/README.md Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
fa359fd1f7
commit
d631f1dea8
@@ -265,7 +265,7 @@ impl ProvisionerJob {
|
||||
)
|
||||
.await
|
||||
{
|
||||
tracing::warn!(target: LOG_TARGET, err = ?err, "failed to assemble or send inherent data");
|
||||
gum::warn!(target: LOG_TARGET, err = ?err, "failed to assemble or send inherent data");
|
||||
self.metrics.on_inherent_data_request(Err(()));
|
||||
} else {
|
||||
self.metrics.on_inherent_data_request(Ok(()));
|
||||
@@ -451,7 +451,7 @@ async fn select_candidates(
|
||||
descriptor.persisted_validation_data_hash == computed_validation_data_hash
|
||||
}) {
|
||||
let candidate_hash = candidate.hash();
|
||||
tracing::trace!(
|
||||
gum::trace!(
|
||||
target: LOG_TARGET,
|
||||
"Selecting candidate {}. para_id={} core={}",
|
||||
candidate_hash,
|
||||
@@ -509,7 +509,7 @@ async fn select_candidates(
|
||||
true
|
||||
});
|
||||
|
||||
tracing::debug!(
|
||||
gum::debug!(
|
||||
target: LOG_TARGET,
|
||||
n_candidates = candidates.len(),
|
||||
n_cores = availability_cores.len(),
|
||||
@@ -557,7 +557,7 @@ fn bitfields_indicate_availability(
|
||||
// in principle, this function might return a `Result<bool, Error>` so that we can more clearly express this error condition
|
||||
// however, in practice, that would just push off an error-handling routine which would look a whole lot like this one.
|
||||
// simpler to just handle the error internally here.
|
||||
tracing::warn!(
|
||||
gum::warn!(
|
||||
target: LOG_TARGET,
|
||||
validator_idx = %validator_idx,
|
||||
availability_len = %availability_len,
|
||||
@@ -598,7 +598,7 @@ async fn request_disputes(
|
||||
let recent_disputes = match rx.await {
|
||||
Ok(r) => r,
|
||||
Err(oneshot::Canceled) => {
|
||||
tracing::warn!(target: LOG_TARGET, "Unable to gather {:?} disputes", active_or_recent);
|
||||
gum::warn!(target: LOG_TARGET, "Unable to gather {:?} disputes", active_or_recent);
|
||||
Vec::new()
|
||||
},
|
||||
};
|
||||
@@ -618,7 +618,7 @@ async fn request_votes(
|
||||
match rx.await {
|
||||
Ok(v) => v,
|
||||
Err(oneshot::Canceled) => {
|
||||
tracing::warn!(target: LOG_TARGET, "Unable to query candidate votes");
|
||||
gum::warn!(target: LOG_TARGET, "Unable to query candidate votes");
|
||||
Vec::new()
|
||||
},
|
||||
}
|
||||
@@ -666,7 +666,7 @@ async fn select_disputes(
|
||||
// If the active ones are already exceeding the bounds, randomly select a subset.
|
||||
let recent = request_disputes(sender, RequestType::Recent).await;
|
||||
let disputes = if recent.len() > MAX_DISPUTES_FORWARDED_TO_RUNTIME {
|
||||
tracing::warn!(
|
||||
gum::warn!(
|
||||
target: LOG_TARGET,
|
||||
"Recent disputes are excessive ({} > {}), reduce to active ones, and selected",
|
||||
recent.len(),
|
||||
|
||||
Reference in New Issue
Block a user