Skip to content

Better result reporting for metrics used in the validator store #242

@dknopik

Description

@dknopik

Currently, we only record successful signatures in the validator store metrics. E.g.:

        let signature = self
            .timeout_within_slot(
                slot,
                delay,
                self.collect_signature(
                    PartialSignatureKind::SelectionProofPartialSig,
                    Role::Aggregator,
                    None,
                    self.validator(validator_pubkey)?,
                    signing_root,
                    slot,
                ),
            )
            .await?;

        validator_metrics::inc_counter_vec(
            &validator_metrics::SIGNED_SELECTION_PROOFS_TOTAL,
            &[validator_metrics::SUCCESS],
        );

        Ok(signature.into())

If we return early via ? due to an error (e.g. timeout), we do not record that.

Add some function that we can pass a metric name and result to that adds an accurate metric value for that result.

Metadata

Metadata

Assignees

Labels

metricsv0.1.0First Testnet-only release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions