Skip to content

Commit 4a35371

Browse files
authored
feat: track oppool insert outcome for api attestation separately (#7550)
1 parent 15c0e8b commit 4a35371

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

packages/beacon-node/src/api/impl/beacon/pool/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export function getBeaconPoolApi({
125125
committeeValidatorIndex,
126126
committeeSize
127127
);
128-
metrics?.opPool.attestationPoolInsertOutcome.inc({insertOutcome});
128+
metrics?.opPool.attestationPoolApiInsertOutcome.inc({insertOutcome});
129129
}
130130

131131
if (isForkPostElectra(fork)) {

packages/beacon-node/src/metrics/metrics/lodestar.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -865,9 +865,14 @@ export function createLodestarMetrics(
865865
name: "lodestar_oppool_attestation_pool_size",
866866
help: "Current size of the AttestationPool = total attestations unique by data and slot",
867867
}),
868-
attestationPoolInsertOutcome: register.counter<{insertOutcome: InsertOutcome}>({
868+
attestationPoolGossipInsertOutcome: register.counter<{insertOutcome: InsertOutcome}>({
869869
name: "lodestar_attestation_pool_insert_outcome_total",
870-
help: "Total number of InsertOutcome as a result of adding an attestation in a pool",
870+
help: "Total number of InsertOutcome as a result of adding a gossip attestation in a pool",
871+
labelNames: ["insertOutcome"],
872+
}),
873+
attestationPoolApiInsertOutcome: register.counter<{insertOutcome: InsertOutcome}>({
874+
name: "lodestar_attestation_pool_api_insert_outcome_total",
875+
help: "Total number of InsertOutcome as a result of adding an attestation from api in a pool",
871876
labelNames: ["insertOutcome"],
872877
}),
873878
attesterSlashingPoolSize: register.gauge({

packages/beacon-node/src/network/processor/gossipHandlers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ function getBatchHandlers(modules: ValidatorFnsModules, options: GossipHandlerOp
658658
committeeValidatorIndex,
659659
committeeSize
660660
);
661-
metrics?.opPool.attestationPoolInsertOutcome.inc({insertOutcome});
661+
metrics?.opPool.attestationPoolGossipInsertOutcome.inc({insertOutcome});
662662
}
663663
} catch (e) {
664664
logger.error("Error adding unaggregated attestation to pool", {subnet}, e as Error);

0 commit comments

Comments
 (0)