Repository navigation
Conversation
aarongable
reviewed
Nov 24, 2026
aarongable
reviewed
Nov 30, 2026
aarongable
reviewed
Dec 2, 2026
Comment on lines
+99
to
+109
| // A consistent "issuer" label makes every MTCA metric more ergonomic | ||
| // versus, for example, a deployment instance ID. | ||
| issueAttempts := issuerIssueAttempts.MustCurryWith(prometheus.Labels{"issuer": CAIDString}) | ||
| lastSeqSuccessTimestamp := issuerLastSeqSuccessTimestamp.MustCurryWith(prometheus.Labels{"issuer": CAIDString}) | ||
| pendingEntryPoolSize := issuerPendingEntryPoolSize.MustCurryWith(prometheus.Labels{"issuer": CAIDString}) | ||
| sequenceBatchSize := issuerSequenceBatchSize.MustCurryWith(prometheus.Labels{"issuer": CAIDString}) | ||
| sequenceDuration := issuerSequenceDuration.MustCurryWith(prometheus.Labels{"issuer": CAIDString}) | ||
| sequenceTxDuration := issuerSequenceTxDuration.MustCurryWith(prometheus.Labels{"issuer": CAIDString}) | ||
| signatureDurations := issuerSignatureDurations.MustCurryWith(prometheus.Labels{"issuer": CAIDString}) | ||
| tileStoreDurations := issuerTileStoreDurations.MustCurryWith(prometheus.Labels{"issuer": CAIDString}) | ||
| treeSize := issuerTreeSize.MustCurryWith(prometheus.Labels{"issuer": CAIDString}) |
Contributor
There was a problem hiding this comment.
Rather than declaring a second set of local variables, I would either:
- Inline these above (so
issueAttempts := promauto.With(register).NewCounterVec(...).MustCurryWith(...)); or at least - Reuse the same variables (so
issueAttempts = issueAttempts.MustCurryWith(...))
|
|
||
| // pendingEntry represents a pending entry in the pool, along with a channel to | ||
| // notify a pending RPC. Each pendingEntry carries an RA-generated eventID. | ||
| // notify a pending RPC. Each pendingEntry carries an RA-generated eventID |
Contributor
There was a problem hiding this comment.
Not sure why this comment lost its trailing period.
| @@ -375,8 +462,10 @@ func (m *mtca) Issue(ctx context.Context, req *mtcapb.IssueRequest) (*mtcapb.Iss | |||
| return nil, ctx.Err() | |||
Contributor
There was a problem hiding this comment.
I think you want a m.metrics.issueAttempts.With({"result": "timed out"}).Inc() here. In fact there are quite a few error cases within this function that don't have corresponding metric increments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the first of at least three PRs to add metrics to the MTCA, MTCB, and MTPublisher.