paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.network/
1.78k stars 646 forks source link

Add Statement Distribution V2/V3 Metrics #4334

Open Overkillus opened 4 months ago

Overkillus commented 4 months ago

Statement Distribution has those metrics registered:

        statements_distributed: prometheus::Counter<prometheus::U64>,
    sent_requests: prometheus::Counter<prometheus::U64>,
    received_responses: prometheus::CounterVec<prometheus::U64>,
    active_leaves_update: prometheus::Histogram,
    share: prometheus::Histogram,
    network_bridge_update: prometheus::HistogramVec,
    statements_unexpected: prometheus::CounterVec<prometheus::U64>,
    created_message_size: prometheus::Gauge<prometheus::U64>,

After the switch to V2 the metrics were not properly updated and they are not used in V2/V3. Only active_leaves_update and share are being reported in the V2/V3 protocol. Other metrics are only reported when using the legacy V1.

TODOs:

Note: PR #3444 Adds 2 more metrics not mentioned here relevant to v2 that tracks requests dropped due to peer limiting and the number of times we reach max parallel requests limit.

AndreiEres commented 4 months ago

I'm going to take this one because I may need more metrics for statemant-distribution benchmarks.