| 80 | } |
| 81 | |
| 82 | pub(crate) fn render_prometheus(&self) -> String { |
| 83 | let attestation_requests_total = self.attestation_requests_total.load(Ordering::Relaxed); |
| 84 | let attestation_failures_total = self.attestation_failures_total.load(Ordering::Relaxed); |
| 85 | |
| 86 | format!( |
| 87 | "# HELP dstack_kms_attestation_requests_total Total number of KMS attestation requests.\n\ |
| 88 | # TYPE dstack_kms_attestation_requests_total counter\n\ |
| 89 | dstack_kms_attestation_requests_total {attestation_requests_total}\n\ |
| 90 | # HELP dstack_kms_attestation_failures_total Total number of failed KMS attestation requests.\n\ |
| 91 | # TYPE dstack_kms_attestation_failures_total counter\n\ |
| 92 | dstack_kms_attestation_failures_total {attestation_failures_total}\n" |
| 93 | ) |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | impl KmsState { |