-
Notifications
You must be signed in to change notification settings - Fork 748
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
Add additional PeerDAS metrics (#6018) #6248
base: das
Are you sure you want to change the base?
Conversation
Renamed |
@@ -1160,6 +1160,40 @@ impl<E: EthSpec> Network<E> { | |||
peer_id: PeerId, | |||
response: Response<E>, | |||
) -> Option<NetworkEvent<E>> { | |||
match &response { | |||
Response::Status(_) => { | |||
metrics::inc_counter_vec(&metrics::TOTAL_RPC_RESPONSES_RECEIVED, &["status"]) |
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.
You can derive IntoStaticStr
for Response
and just do a single
metrics::inc_counter_vec(&metrics::TOTAL_RPC_RESPONSES_RECEIVED, &[response.into()])
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.
done
}; | ||
|
||
custody_subnet_count.saturating_mul(spec.data_columns_per_subnet()) | ||
} |
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.
import_all_data_columns
isn't available here, but I've added this function in another PR, feel free to copy it over if you'd like to test this:
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.
done
StatusMessage::from_ssz_bytes(decoded_buffer)?, | ||
))), | ||
SupportedProtocol::StatusV1 => { | ||
metrics::inc_counter_vec_by(&metrics::TOTAL_RPC_REQUESTS_BYTES_RECEIVED, &["status"], decoded_buffer.len() as u64); |
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.
if this is the right spot for this metric, I will add another ones here: by_range
, by_root
, etc.
@jxs could you please review the libp2p metrics we've discussed? |
Added Req/Resp metrics:
|
Please update to point at
|
net::IpAddr, | ||
task::{Context, Poll}, | ||
time::Duration, | ||
cmp::{max, Ordering}, collections::{BTreeSet, HashMap, HashSet, VecDeque}, fmt, io::Read, net::IpAddr, task::{Context, Poll}, time::Duration |
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.
you might want to run make cargo-fmt
locally to format these with cargo fmt
pub static CUSTODY_COLUMNS_COUNT: LazyLock<Result<IntGauge>> = LazyLock::new(|| { | ||
try_create_int_gauge( | ||
"beacon_custody_columns_count_total", | ||
"Total count of columns in custody", |
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.
It might be worth clarifying whether this number refers to the number of columns in custody (up to 128), or the total number of columns in custody within the data availability boundary. I'm guessing this means the latter?
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.
It would be the second, it would seesaw as new columns come into custody and old ones are pruned.
Issue Addressed
This PR addresses issue #6018, the list of the additional PeerDAS metrics.
Proposed Changes
Added the following metrics:
Custody:
Gossipsub:
Libp2p: