letsencrypt / boulder

An ACME-based certificate authority, written in Go.
Mozilla Public License 2.0
5.16k stars 605 forks source link

Add signature count and error metrics to crlImpl #7533

Closed aarongable closed 3 months ago

aarongable commented 3 months ago

Add the "signatureCount" and "signErrorCount" metrics, which are already incremented by the certificateAuthorityImpl and ocspImpl after all signing operations, to the crlImpl.

Note that in the process of writing this PR I discovered that the method for determining whether to increment the signErrorCount metric is broken. Rather than diverge the crlImpl's version of that code from the identical code in the other two files, I have duplicated the broken code and will fix it in all three places in a follow-up.

Fixes https://github.com/letsencrypt/boulder/issues/7532

aarongable commented 3 months ago

We could use signatureCount.CurryWith(prometheus.Labels{"purpose": "crl"} in main.go (and equivalent for the CA component).

Ooh I really like that idea. But I think the consolidation in https://github.com/letsencrypt/boulder/pull/7534 is even more worthwhile, and somewhat removes the chance to do such currying.