mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 05:11:09 +00:00
[jaeger] unify all used tags, introduce builder pattern, additional… (#2473)
* feat/jaeger: unify all used tags, introduce builder pattern, additional candidate annotations * chores * fixes, incomplete fn rename * another fix * more fixes * silly doctests
This commit is contained in:
committed by
GitHub
parent
fb0106a00e
commit
85489ceb36
@@ -302,7 +302,9 @@ async fn make_pov_available(
|
||||
};
|
||||
|
||||
{
|
||||
let _span = span.as_ref().map(|s| s.child("erasure-coding"));
|
||||
let _span = span.as_ref().map(|s| {
|
||||
s.child_with_candidate("erasure-coding", &candidate_hash)
|
||||
});
|
||||
|
||||
let chunks = erasure_coding::obtain_chunks_v1(
|
||||
n_validators,
|
||||
@@ -318,7 +320,10 @@ async fn make_pov_available(
|
||||
}
|
||||
|
||||
{
|
||||
let _span = span.as_ref().map(|s| s.child("store-data"));
|
||||
let _span = span.as_ref().map(|s|
|
||||
s.child_with_candidate("store-data", &candidate_hash)
|
||||
);
|
||||
|
||||
store_available_data(
|
||||
tx_from,
|
||||
validator_index,
|
||||
@@ -895,9 +900,7 @@ impl CandidateBackingJob {
|
||||
if !self.backed.contains(&hash) {
|
||||
// only add if we don't consider this backed.
|
||||
let span = self.unbacked_candidates.entry(hash).or_insert_with(|| {
|
||||
let mut span = parent_span.child("unbacked-candidate");
|
||||
span.add_string_tag("candidate-hash", &format!("{:?}", hash.0));
|
||||
span
|
||||
parent_span.child_with_candidate("unbacked-candidate", &hash)
|
||||
});
|
||||
Some(span)
|
||||
} else {
|
||||
@@ -906,7 +909,7 @@ impl CandidateBackingJob {
|
||||
}
|
||||
|
||||
fn get_unbacked_validation_child(&mut self, parent_span: &JaegerSpan, hash: CandidateHash) -> Option<JaegerSpan> {
|
||||
self.insert_or_get_unbacked_span(parent_span, hash).map(|span| span.child("validation"))
|
||||
self.insert_or_get_unbacked_span(parent_span, hash).map(|span| span.child_with_candidate("validation", &hash))
|
||||
}
|
||||
|
||||
fn get_unbacked_statement_child(
|
||||
@@ -916,9 +919,10 @@ impl CandidateBackingJob {
|
||||
validator: ValidatorIndex,
|
||||
) -> Option<JaegerSpan> {
|
||||
self.insert_or_get_unbacked_span(parent_span, hash).map(|span| {
|
||||
let mut span = span.child("import-statement");
|
||||
span.add_string_tag("validator-index", &format!("{}", validator));
|
||||
span
|
||||
span.child_builder("import-statement")
|
||||
.with_candidate(&hash)
|
||||
.with_validator_index(validator)
|
||||
.build()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user