Skip to content

Commit 623f3e2

Browse files
authored
fix: sequencer negative histogram recodings (#10490)
Fix for these two otel warnings ``` negative value provided to histogram aztec.sequencer.state_transition_buffer.duration: INT value type cannot accept a floating-point value for aztec.sequencer.state_transition_buffer.duration, ignoring the fractional digits. ```
1 parent 85c0676 commit 623f3e2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

yarn-project/sequencer-client/src/sequencer/sequencer.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -385,14 +385,16 @@ export class Sequencer {
385385
}
386386

387387
const bufferSeconds = this.timeTable[proposedState] - secondsIntoSlot;
388-
this.metrics.recordStateTransitionBufferMs(bufferSeconds * 1000, proposedState);
389388

390389
if (bufferSeconds < 0) {
391390
this.log.warn(
392391
`Too far into slot to transition to ${proposedState}. max allowed: ${this.timeTable[proposedState]}s, time into slot: ${secondsIntoSlot}s`,
393392
);
394393
return false;
395394
}
395+
396+
this.metrics.recordStateTransitionBufferMs(Math.floor(bufferSeconds * 1000), proposedState);
397+
396398
this.log.debug(
397399
`Enough time to transition to ${proposedState}, max allowed: ${this.timeTable[proposedState]}s, time into slot: ${secondsIntoSlot}s`,
398400
);

0 commit comments

Comments
 (0)