| #ifndef THIRD_PARTY_MILOTIC_INTERNAL_CC_PROXY_CPER_METRICS_H_ |
| #define THIRD_PARTY_MILOTIC_INTERNAL_CC_PROXY_CPER_METRICS_H_ |
| |
| #include "absl/base/no_destructor.h" |
| #include "absl/strings/string_view.h" |
| #include "monitoring.h" |
| |
| namespace milotic { |
| // Metrics specific for Eiger, based on the metric definitions in monitoring.h. |
| // Provides a unified view into all the metrics which can be exposed through a |
| // debug API to get a current system state. |
| struct CperMetrics { |
| metrics::Latency<absl::string_view, absl::string_view> cper_request_latency{ |
| "cper/request_latency", |
| {"verb", "uri"}, |
| {.description = "Request latency of cper specific Plugin APIs"}}; |
| |
| metrics::EventCounter<absl::string_view, int> cper_response_code{ |
| "cper/response_code", |
| {"request_type", "code"}, |
| {.description = "Response code of cper specific Plugin APIs"}}; |
| |
| static CperMetrics& Get() { |
| static absl::NoDestructor<CperMetrics> common_metrics; |
| return *common_metrics; |
| } |
| }; |
| } // namespace milotic |
| |
| #endif // THIRD_PARTY_MILOTIC_INTERNAL_CC_PROXY_CPER_METRICS_H_ |