-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TrustStore: Add metrics #3628
TrustStore: Add metrics #3628
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 37 of 37 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @oncilla)
go/lib/infra/modules/trust/verifier.go, line 98 at r1 (raw file):
if err != nil { metrics.Verifier.Verify(l.WithResult(metrics.ErrParse)).Inc() return err
does this error also need ErrValidation
wrap?
go/lib/infra/modules/trust/internal/metrics/handler.go, line 55 at r1 (raw file):
func newHandler() handler { return handler{ requests: *prom.NewCounterVecWithLabels(Namespace, "", "received_requests_total",
I think it's better to leave the name as is, if it already is used somewhere this will only break it, if we don't change it, stuff will not break and it is also not wrong.
17cdcc0
to
eb83fbe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @lukedirtwalker)
go/lib/infra/modules/trust/verifier.go, line 98 at r1 (raw file):
Previously, lukedirtwalker (Lukas Vogel) wrote…
does this error also need
ErrValidation
wrap?
Done.
go/lib/infra/modules/trust/internal/metrics/handler.go, line 55 at r1 (raw file):
Previously, lukedirtwalker (Lukas Vogel) wrote…
I think it's better to leave the name as is, if it already is used somewhere this will only break it, if we don't change it, stuff will not break and it is also not wrong.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 13 of 13 files at r2.
Reviewable status: complete! all files reviewed, all discussions resolved
This pull request adds the following metrics to the trust store: ``` # HELP truststore_created_signatures_total Number of signatures created with a signer backed by the trust store # TYPE truststore_created_signatures_total counter truststore_created_signatures_total{result="ok_success"} 531 # HELP truststore_db_queries_total Total queries to the database # TYPE truststore_db_queries_total counter truststore_db_queries_total{driver="sqlite",operation="chain_exists",result="ok_success"} 7 truststore_db_queries_total{driver="sqlite",operation="get_issuing_key_info",result="ok_success"} 734 # HELP truststore_generated_signers_total Number of generated signers backed by the trust store # TYPE truststore_generated_signers_total counter truststore_generated_signers_total{result="ok_success"} 5 # HELP truststore_insertions_total Number of trust material insertions handled by the trust store # TYPE truststore_insertions_total counter truststore_insertions_total{result="ok_exists",type="chain"} 1 truststore_insertions_total{result="ok_exists",type="trc"} 2 truststore_insertions_total{result="ok_inserted",type="chain"} 6 # HELP truststore_lookups_total Number of trust material lookups handled by the trust store # TYPE truststore_lookups_total counter truststore_lookups_total{result="ok_success",trigger="application",type="chain"} 5 truststore_lookups_total{result="ok_success",trigger="application",type="trc"} 5 truststore_lookups_total{result="ok_success",trigger="chain_request",type="chain"} 20 truststore_lookups_total{result="ok_success",trigger="signature_verification",type="as_key"} 362 # HELP truststore_received_rpcs_total Number of RPCs served by the trust store # TYPE truststore_received_rpcs_total counter truststore_received_rpcs_total{client="as_local",req_type="chain_request",result="ok_success"} 6 truststore_received_rpcs_total{client="isd_local",req_type="chain_request",result="ok_success"} 9 truststore_received_rpcs_total{client="isd_remote",req_type="chain_request",result="ok_success"} 5 # HELP truststore_sent_rpcs_total Number of crypto fetches started by the trust store # TYPE truststore_sent_rpcs_total counter truststore_sent_rpcs_total{peer="isd_local",result="ok_success",trigger="signature_verification",type="chain_request"} 3 truststore_sent_rpcs_total{peer="isd_remote",result="ok_success",trigger="signature_verification",type="chain_request"} 3 # HELP truststore_trc_inspections_total Number of TRC inspections handled by the trust store # TYPE truststore_trc_inspections_total counter truststore_trc_inspections_total{result="ok_success",type="by_attributes"} 1 truststore_trc_inspections_total{result="ok_success",type="has_attributes"} 80 # HELP truststore_verified_signatures_total Number of signatures verifications backed by the trust store # TYPE truststore_verified_signatures_total counter truststore_verified_signatures_total{result="ok_success"} 362 ``` fixes scionproto#3488
eb83fbe
to
57d974a
Compare
This pull request adds the following metrics to the trust store:
fixes #3488
This change is