From 375cda3cf59e63ff8173d54028862387f9514ba3 Mon Sep 17 00:00:00 2001 From: Michael Lorant Date: Sat, 18 May 2024 14:44:30 +1000 Subject: [PATCH] Refactor labels used in realtime package Previously, each metric had a static list of labels to be applied. By changing this to a variable, we can now define a default set of labels plus any extra labels. These changes are preparation work for introducing a feature allowing for the removal of the `datacenter` label. Signed-off-by: Michael Lorant --- pkg/realtime/metrics.go | 424 +++++++++++++++++----------------- pkg/realtime/process.go | 499 +++++++++++++++++++++------------------- 2 files changed, 482 insertions(+), 441 deletions(-) diff --git a/pkg/realtime/metrics.go b/pkg/realtime/metrics.go index 7bff49f..b1d0dc5 100644 --- a/pkg/realtime/metrics.go +++ b/pkg/realtime/metrics.go @@ -222,213 +222,219 @@ type Metrics struct { // NewMetrics returns a new set of metrics registered to the registerer. // Only metrics whose names pass the name filter are registered. func NewMetrics(namespace, subsystem string, nameFilter filter.Filter, r prometheus.Registerer) *Metrics { + labels := []string{ + "service_id", + "service_name", + "datacenter", + } + m := Metrics{ - AttackBlockedReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "attack_blocked_req_body_bytes_total", Help: "Total body bytes received from requests that triggered a WAF rule that was blocked."}, []string{"service_id", "service_name", "datacenter"}), - AttackBlockedReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "attack_blocked_req_header_bytes_total", Help: "Total header bytes received from requests that triggered a WAF rule that was blocked."}, []string{"service_id", "service_name", "datacenter"}), - AttackLoggedReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "attack_logged_req_body_bytes_total", Help: "Total body bytes received from requests that triggered a WAF rule that was logged."}, []string{"service_id", "service_name", "datacenter"}), - AttackLoggedReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "attack_logged_req_header_bytes_total", Help: "Total header bytes received from requests that triggered a WAF rule that was logged."}, []string{"service_id", "service_name", "datacenter"}), - AttackPassedReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "attack_passed_req_body_bytes_total", Help: "Total body bytes received from requests that triggered a WAF rule that was passed."}, []string{"service_id", "service_name", "datacenter"}), - AttackPassedReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "attack_passed_req_header_bytes_total", Help: "Total header bytes received from requests that triggered a WAF rule that was passed."}, []string{"service_id", "service_name", "datacenter"}), - AttackReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "attack_req_body_bytes_total", Help: "Total body bytes received from requests that triggered a WAF rule."}, []string{"service_id", "service_name", "datacenter"}), - AttackReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "attack_req_header_bytes_total", Help: "Total header bytes received from requests that triggered a WAF rule."}, []string{"service_id", "service_name", "datacenter"}), - AttackRespSynthBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "attack_resp_synth_bytes_total", Help: "Total bytes delivered for requests that triggered a WAF rule and returned a synthetic response."}, []string{"service_id", "service_name", "datacenter"}), - BackendReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bereq_body_bytes_total", Help: "Total body bytes sent to origin."}, []string{"service_id", "service_name", "datacenter"}), - BackendReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bereq_header_bytes_total", Help: "Total header bytes sent to origin."}, []string{"service_id", "service_name", "datacenter"}), - BlacklistedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "blacklist_total", Help: "TODO"}, []string{"service_id", "service_name", "datacenter"}), - BodySizeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "body_size_total", Help: "Total body bytes delivered (alias for resp_body_bytes)."}, []string{"service_id", "service_name", "datacenter"}), - BotChallengeCompleteTokensCheckedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenge_complete_tokens_checked_total", Help: "The number of challenge-complete tokens checked."}, []string{"service_id", "service_name", "datacenter"}), - BotChallengeCompleteTokensDisabledTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenge_complete_tokens_disabled_total", Help: "TThe number of challenge-complete tokens not checked because the feature was disabled."}, []string{"service_id", "service_name", "datacenter"}), - BotChallengeCompleteTokensFailedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenge_complete_tokens_failed_total", Help: "TThe number of challenge-complete tokens that failed validation."}, []string{"service_id", "service_name", "datacenter"}), - BotChallengeCompleteTokensIssuedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenge_complete_tokens_issued_total", Help: "The number of challenge-complete tokens issued. For example, issuing a challenge-complete token after a series of CAPTCHA challenges ending in success."}, []string{"service_id", "service_name", "datacenter"}), - BotChallengeCompleteTokensPassedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenge_complete_tokens_passed_total", Help: "The number of challenge-complete tokens that passed validation."}, []string{"service_id", "service_name", "datacenter"}), - BotChallengeStartsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenge_starts_total", Help: "The number of challenge-start tokens created."}, []string{"service_id", "service_name", "datacenter"}), - BotChallengesFailedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenges_failed_total", Help: "The number of failed challenge solutions processed. For example, an incorrect CAPTCHA solution."}, []string{"service_id", "service_name", "datacenter"}), - BotChallengesIssuedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenges_issued_total", Help: "The number of challenges issued. For example, the issuance of a CAPTCHA challenge."}, []string{"service_id", "service_name", "datacenter"}), - BotChallengesSucceededTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenges_succeeded_total", Help: "The number of successful challenge solutions processed. For example, a correct CAPTCHA solution."}, []string{"service_id", "service_name", "datacenter"}), - ComputeBackendReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_bereq_body_bytes_total", Help: "Total body bytes sent to backends (origins) by Compute@Edge."}, []string{"service_id", "service_name", "datacenter"}), - ComputeBackendReqErrorsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_bereq_errors_total", Help: "Number of backend request errors, including timeouts."}, []string{"service_id", "service_name", "datacenter"}), - ComputeBackendReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_bereq_header_bytes_total", Help: "Total header bytes sent to backends (origins) by Compute@Edge."}, []string{"service_id", "service_name", "datacenter"}), - ComputeBackendReqTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_bereq_total", Help: "Number of backend requests started."}, []string{"service_id", "service_name", "datacenter"}), - ComputeBackendRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_beresp_body_bytes_total", Help: "Total body bytes received from backends (origins) by Compute@Edge."}, []string{"service_id", "service_name", "datacenter"}), - ComputeBackendRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_beresp_header_bytes_total", Help: "Total header bytes received from backends (origins) by Compute@Edge."}, []string{"service_id", "service_name", "datacenter"}), - ComputeExecutionTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_execution_time_total", Help: "The amount of active CPU time used to process your requests (in seconds)."}, []string{"service_id", "service_name", "datacenter"}), - ComputeGlobalsLimitExceededTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_globals_limit_exceeded_total", Help: "Number of times a guest exceeded its globals limit."}, []string{"service_id", "service_name", "datacenter"}), - ComputeGuestErrorsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_guest_errors_total", Help: "Number of times a service experienced a guest code error."}, []string{"service_id", "service_name", "datacenter"}), - ComputeHeapLimitExceededTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_heap_limit_exceeded_total", Help: "Number of times a guest exceeded its heap limit."}, []string{"service_id", "service_name", "datacenter"}), - ComputeRAMUsedBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_ram_used_bytes_total", Help: "The amount of RAM used for your site by Fastly."}, []string{"service_id", "service_name", "datacenter"}), - ComputeReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_req_body_bytes_total", Help: "Total body bytes received by Compute@Edge."}, []string{"service_id", "service_name", "datacenter"}), - ComputeReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_req_header_bytes_total", Help: "Total header bytes received by Compute@Edge."}, []string{"service_id", "service_name", "datacenter"}), - ComputeRequestTimeBilledTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_request_time_billed_total", Help: "The total amount of request processing time you will be billed for, measured in 50 millisecond increments. (in seconds)"}, []string{"service_id", "service_name", "datacenter"}), - ComputeRequestTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_request_time_total", Help: "The total amount of time used to process your requests, including active CPU time (in seconds)."}, []string{"service_id", "service_name", "datacenter"}), - ComputeRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_requests_total", Help: "The total number of requests that were received for your site by Fastly."}, []string{"service_id", "service_name", "datacenter"}), - ComputeResourceLimitExceedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_resource_limit_exceeded_total", Help: "Number of times a guest exceeded its resource limit, includes heap, stack, globals, and code execution timeout."}, []string{"service_id", "service_name", "datacenter"}), - ComputeRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_resp_body_bytes_total", Help: "Total body bytes sent from Compute@Edge to end user."}, []string{"service_id", "service_name", "datacenter"}), - ComputeRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_resp_header_bytes_total", Help: "Total header bytes sent from Compute@Edge to end user."}, []string{"service_id", "service_name", "datacenter"}), - ComputeRespStatusTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_resp_status_total", Help: "Number of responses delivered delivered by Compute@Edge, by status code group."}, []string{"service_id", "service_name", "datacenter", "status_group"}), - ComputeRuntimeErrorsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_runtime_errors_total", Help: "Number of times a service experienced a guest runtime error."}, []string{"service_id", "service_name", "datacenter"}), - ComputeStackLimitExceededTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_stack_limit_exceeded_total", Help: "Number of times a guest exceeded its stack limit."}, []string{"service_id", "service_name", "datacenter"}), - DDOSActionBlackholeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "ddos_action_blackhole_total", Help: "The number of times the blackhole action was taken. The blackhole action quietly closes a TCP connection without sending a reset. The blackhole action quietly closes a TCP connection without notifying its peer (all TCP state is dropped)."}, []string{"service_id", "service_name", "datacenter"}), - DDOSActionCloseTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "ddos_action_close_total", Help: "The number of times the close action was taken. The close action aborts the connection as soon as possible. The close action takes effect either right after accept, right after the client hello, or right after the response was sent."}, []string{"service_id", "service_name", "datacenter"}), - DDOSActionDowngradeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "ddos_action_downgrade_total", Help: "The number of times the downgrade action was taken. The downgrade action restricts the client to http1."}, []string{"service_id", "service_name", "datacenter"}), - DDOSActionDowngradedConnectionsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "ddos_action_downgraded_connections_total", Help: "The number of connections the downgrade action was applied to. The downgrade action restricts the connection to http1."}, []string{"service_id", "service_name", "datacenter"}), - DDOSActionLimitStreamsConnectionsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "ddos_action_limit_streams_connections_total", Help: "For HTTP/2, the number of connections the limit-streams action was applied to. The limit-streams action caps the allowed number of concurrent streams in a connection."}, []string{"service_id", "service_name", "datacenter"}), - DDOSActionLimitStreamsRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "ddos_action_limit_streams_requests_total", Help: "For HTTP/2, the number of requests made on a connection for which the limit-streams action was taken. The limit-streams action caps the allowed number of concurrent streams in a connection."}, []string{"service_id", "service_name", "datacenter"}), - DDOSActionTarpitAcceptTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "ddos_action_tarpit_accept_total", Help: "The number of times the tarpit-accept action was taken. The tarpit-accept action adds a delay when accepting future connections."}, []string{"service_id", "service_name", "datacenter"}), - DDOSActionTarpitTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "ddos_action_tarpit_total", Help: "The number of times the tarpit action was taken. The tarpit action delays writing the response to the client."}, []string{"service_id", "service_name", "datacenter"}), - DeliverSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "deliver_sub_count_total", Help: "Number of executions of the 'deliver' Varnish subroutine."}, []string{"service_id", "service_name", "datacenter"}), - DeliverSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "deliver_sub_time_total", Help: "Time spent inside the 'deliver' Varnish subroutine (in seconds)."}, []string{"service_id", "service_name", "datacenter"}), - EdgeHitRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "edge_hit_requests_total", Help: "Number of requests sent by end users to Fastly that resulted in a hit at the edge."}, []string{"service_id", "service_name", "datacenter"}), - EdgeHitRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "edge_hit_resp_body_bytes_total", Help: "Body bytes delivered for edge hits."}, []string{"service_id", "service_name", "datacenter"}), - EdgeHitRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "edge_hit_resp_header_bytes_total", Help: "Header bytes delivered for edge hits."}, []string{"service_id", "service_name", "datacenter"}), - EdgeMissRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "edge_miss_requests_total", Help: "Number of requests sent by end users to Fastly that resulted in a miss at the edge."}, []string{"service_id", "service_name", "datacenter"}), - EdgeMissRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "edge_miss_resp_body_bytes_total", Help: "Body bytes delivered for edge misses."}, []string{"service_id", "service_name", "datacenter"}), - EdgeMissRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "edge_miss_resp_header_bytes_total", Help: "Header bytes delivered for edge misses."}, []string{"service_id", "service_name", "datacenter"}), - EdgeRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "edge_resp_body_bytes_total", Help: "Total body bytes delivered from Fastly to the end user."}, []string{"service_id", "service_name", "datacenter"}), - EdgeRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "edge_resp_header_bytes_total", Help: "Total header bytes delivered from Fastly to the end user."}, []string{"service_id", "service_name", "datacenter"}), - EdgeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "edge_total", Help: "Number of requests sent by end users to Fastly."}, []string{"service_id", "service_name", "datacenter"}), - ErrorSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "error_sub_count_total", Help: "Number of executions of the 'error' Varnish subroutine."}, []string{"service_id", "service_name", "datacenter"}), - ErrorSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "error_sub_time_total", Help: "Time spent inside the 'error' Varnish subroutine (in seconds)."}, []string{"service_id", "service_name", "datacenter"}), - ErrorsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "errors_total", Help: "Number of cache errors."}, []string{"service_id", "service_name", "datacenter"}), - FanoutBackendReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_bereq_body_bytes_total", Help: "Total body or message content bytes sent to backends over Fanout connections."}, []string{"service_id", "service_name", "datacenter"}), - FanoutBackendReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_bereq_header_bytes_total", Help: "Total header bytes sent to backends over Fanout connections."}, []string{"service_id", "service_name", "datacenter"}), - FanoutBackendRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_beresp_body_bytes_total", Help: "Total body or message content bytes received from backends over Fanout connections."}, []string{"service_id", "service_name", "datacenter"}), - FanoutBackendRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_beresp_header_bytes_total", Help: "Total header bytes received from backends over Fanout connections."}, []string{"service_id", "service_name", "datacenter"}), - FanoutConnTimeMsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_conn_time_ms_total", Help: "Total duration of Fanout connections with end users."}, []string{"service_id", "service_name", "datacenter"}), - FanoutRecvPublishesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_recv_publishes_total", Help: "Total published messages received from the publish API endpoint."}, []string{"service_id", "service_name", "datacenter"}), - FanoutReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_req_body_bytes_total", Help: "Total body or message content bytes received from end users over Fanout connections."}, []string{"service_id", "service_name", "datacenter"}), - FanoutReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_req_header_bytes_total", Help: "Total header bytes received from end users over Fanout connections."}, []string{"service_id", "service_name", "datacenter"}), - FanoutRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_resp_body_bytes_total", Help: "Total body or message content bytes sent to end users over Fanout connections, excluding published message content."}, []string{"service_id", "service_name", "datacenter"}), - FanoutRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_resp_header_bytes_total", Help: "Total header bytes sent to end users over Fanout connections."}, []string{"service_id", "service_name", "datacenter"}), - FanoutSendPublishesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_send_publishes_total", Help: "Total published messages sent to end users."}, []string{"service_id", "service_name", "datacenter"}), - FetchSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fetch_sub_count_total", Help: "Number of executions of the 'fetch' Varnish subroutine."}, []string{"service_id", "service_name", "datacenter"}), - FetchSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fetch_sub_time_total", Help: "Time spent inside the 'fetch' Varnish subroutine (in seconds)."}, []string{"service_id", "service_name", "datacenter"}), - HTTPTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "http_total", Help: "Number of requests received, by HTTP version."}, []string{"service_id", "service_name", "datacenter", "http_version"}), - HTTP2Total: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "http2_total", Help: "Number of requests received over HTTP2."}, []string{"service_id", "service_name", "datacenter"}), - HTTP3Total: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "http3_total", Help: "Number of requests received over HTTP3."}, []string{"service_id", "service_name", "datacenter"}), - HashSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "hash_sub_count_total", Help: "Number of executions of the 'hash' Varnish subroutine."}, []string{"service_id", "service_name", "datacenter"}), - HashSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "hash_sub_time_total", Help: "Time spent inside the 'hash' Varnish subroutine (in seconds)."}, []string{"service_id", "service_name", "datacenter"}), - HeaderSizeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "header_size_total", Help: "Total header bytes delivered (alias for resp_header_bytes)."}, []string{"service_id", "service_name", "datacenter"}), - HitRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "hit_resp_body_bytes_total", Help: "Total body bytes delivered for cache hits."}, []string{"service_id", "service_name", "datacenter"}), - HitSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "hit_sub_count_total", Help: "Number of executions of the 'hit' Varnish subroutine."}, []string{"service_id", "service_name", "datacenter"}), - HitSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "hit_sub_time_total", Help: "Time spent inside the 'hit' Varnish subroutine (in seconds)."}, []string{"service_id", "service_name", "datacenter"}), - HitsTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "hits_time_total", Help: "Total amount of time spent processing cache hits (in seconds)."}, []string{"service_id", "service_name", "datacenter"}), - HitsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "hits_total", Help: "Number of cache hits."}, []string{"service_id", "service_name", "datacenter"}), - IPv6Total: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "ipv6_total", Help: "Number of requests that were received over IPv6."}, []string{"service_id", "service_name", "datacenter"}), - ImgOptoRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgopto_resp_body_bytes_total", Help: "Total body bytes delivered from the Fastly Image Optimizer service."}, []string{"service_id", "service_name", "datacenter"}), - ImgOptoRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgopto_resp_header_bytes_total", Help: "Total header bytes delivered from the Fastly Image Optimizer service."}, []string{"service_id", "service_name", "datacenter"}), - ImgOptoShieldRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgopto_shield_resp_body_bytes_total", Help: "Total body bytes delivered via a shield from the Fastly Image Optimizer service."}, []string{"service_id", "service_name", "datacenter"}), - ImgOptoShieldRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgopto_shield_resp_header_bytes_total", Help: "Total header bytes delivered via a shield from the Fastly Image Optimizer service."}, []string{"service_id", "service_name", "datacenter"}), - ImgOptoShieldTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgopto_shield_total", Help: "Number of responses delivered via a shield from the Fastly Image Optimizer service."}, []string{"service_id", "service_name", "datacenter"}), - ImgOptoTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgopto_total", Help: "Number of responses that came from the Fastly Image Optimizer service."}, []string{"service_id", "service_name", "datacenter"}), - ImgOptoTransformRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgopto_transform_resp_body_bytes_total", Help: "Total body bytes of transforms delivered from the Fastly Image Optimizer service."}, []string{"service_id", "service_name", "datacenter"}), - ImgOptoTransformRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgopto_transform_resp_header_bytes_total", Help: "Total header bytes of transforms delivered from the Fastly Image Optimizer service."}, []string{"service_id", "service_name", "datacenter"}), - ImgOptoTransformTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgopto_transforms_total", Help: "Total transforms performed by the Fastly Image Optimizer service."}, []string{"service_id", "service_name", "datacenter"}), - ImgVideoFramesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgvideo_frames_total", Help: "Number of video frames that came from the Fastly Image Optimizer service."}, []string{"service_id", "service_name", "datacenter"}), - ImgVideoRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgvideo_resp_body_bytes_total", Help: "Total body bytes of video delivered from the Fastly Image Optimizer service."}, []string{"service_id", "service_name", "datacenter"}), - ImgVideoRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgvideo_resp_header_bytes_total", Help: "Total header bytes of video delivered from the Fastly Image Optimizer service."}, []string{"service_id", "service_name", "datacenter"}), - ImgVideoShieldFramesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgvideo_shield_frames_total", Help: "Number of video frames delivered via a shield from the Fastly Image Optimizer service."}, []string{"service_id", "service_name", "datacenter"}), - ImgVideoShieldRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgvideo_shield_resp_body_bytes_total", Help: "Total body bytes of video delivered via a shield from the Fastly Image Optimizer service."}, []string{"service_id", "service_name", "datacenter"}), - ImgVideoShieldRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgvideo_shield_resp_header_bytes_total", Help: "Total header bytes of video delivered via a shield from the Fastly Image Optimizer service."}, []string{"service_id", "service_name", "datacenter"}), - ImgVideoShieldTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgvideo_shield_total", Help: "Number of video responses that came via a shield from the Fastly Image Optimizer service."}, []string{"service_id", "service_name", "datacenter"}), - ImgVideoTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgvideo_total", Help: "Number of video responses that came via a shield from the Fastly Image Optimizer service."}, []string{"service_id", "service_name", "datacenter"}), - KVStoreClassAOperationsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "kv_store_class_a_operations_total", Help: "The total number of class a operations for the KV store."}, []string{"service_id", "service_name", "datacenter"}), - KVStoreClassBOperationsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "kv_store_class_b_operations_total", Help: "The total number of class b operations for the KV store."}, []string{"service_id", "service_name", "datacenter"}), - LogBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "log_bytes_total", Help: "Total log bytes sent."}, []string{"service_id", "service_name", "datacenter"}), - LoggingTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "logging_total", Help: "Number of log lines sent."}, []string{"service_id", "service_name", "datacenter"}), - MissDurationSeconds: prometheus.NewHistogramVec(prometheus.HistogramOpts{Namespace: namespace, Subsystem: subsystem, Name: "miss_duration_seconds", Help: "Histogram of time spent processing cache misses (in seconds).", Buckets: []float64{0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2, 4, 8, 16, 32, 60}}, []string{"service_id", "service_name", "datacenter"}), - MissRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "miss_resp_body_bytes_total", Help: "Total body bytes delivered for cache misses."}, []string{"service_id", "service_name", "datacenter"}), - MissSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "miss_sub_count_total", Help: "Number of executions of the 'miss' Varnish subroutine."}, []string{"service_id", "service_name", "datacenter"}), - MissSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "miss_sub_time_total", Help: "Time spent inside the 'miss' Varnish subroutine (in seconds)."}, []string{"service_id", "service_name", "datacenter"}), - MissTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "miss_time_total", Help: "Total amount of time spent processing cache misses (in seconds)."}, []string{"service_id", "service_name", "datacenter"}), - MissesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "miss_total", Help: "Number of cache misses."}, []string{"service_id", "service_name", "datacenter"}), - OTFPDeliverTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_total", Help: "Number of responses that came from the Fastly On-the-Fly Packager."}, []string{"service_id", "service_name", "datacenter"}), - OTFPManifestTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_deliver_time_total", Help: "Total amount of time spent delivering a response from the Fastly On-the-Fly Packager (in seconds)."}, []string{"service_id", "service_name", "datacenter"}), - OTFPRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_manifests_total", Help: "Number of responses that were manifest files from the Fastly On-the-Fly Packager."}, []string{"service_id", "service_name", "datacenter"}), - OTFPRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_resp_body_bytes_total", Help: "Total body bytes delivered from the Fastly On-the-Fly Packager."}, []string{"service_id", "service_name", "datacenter"}), - OTFPShieldRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_resp_header_bytes_total", Help: "Total header bytes delivered from the Fastly On-the-Fly Packager."}, []string{"service_id", "service_name", "datacenter"}), - OTFPShieldRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_shield_total", Help: "Number of responses delivered from the Fastly On-the-Fly Packager"}, []string{"service_id", "service_name", "datacenter"}), - OTFPShieldTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_shield_resp_body_bytes_total", Help: "Total body bytes delivered via a shield for the Fastly On-the-Fly Packager."}, []string{"service_id", "service_name", "datacenter"}), - OTFPShieldTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_shield_resp_header_bytes_total", Help: "Total header bytes delivered via a shield for the Fastly On-the-Fly Packager."}, []string{"service_id", "service_name", "datacenter"}), - OTFPTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_shield_time_total", Help: "Total amount of time spent delivering a response via a shield from the Fastly On-the-Fly Packager (in seconds)."}, []string{"service_id", "service_name", "datacenter"}), - OTFPTransformRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_transforms_total", Help: "Number of transforms performed by the Fastly On-the-Fly Packager."}, []string{"service_id", "service_name", "datacenter"}), - OTFPTransformRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_transform_resp_body_bytes_total", Help: "Total body bytes of transforms delivered from the Fastly On-the-Fly Packager."}, []string{"service_id", "service_name", "datacenter"}), - OTFPTransformTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_transform_resp_header_bytes_total", Help: "Total body bytes of transforms delivered from the Fastly On-the-Fly Packager."}, []string{"service_id", "service_name", "datacenter"}), - OTFPTransformTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_transform_time_total", Help: "Total amount of time spent performing transforms from the Fastly On-the-Fly Packager."}, []string{"service_id", "service_name", "datacenter"}), - ObjectSizeBytes: prometheus.NewHistogramVec(prometheus.HistogramOpts{Namespace: namespace, Subsystem: subsystem, Name: "object_size_bytes", Help: "Histogram of count of objects served, bucketed by object size range.", Buckets: []float64{1024, 10240, 102400, 1.024e+06, 1.024e+07, 1.024e+08, 1.024e+09}}, []string{"service_id", "service_name", "datacenter"}), - OriginCacheFetchRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "origin_cache_fetch_resp_body_bytes_total", Help: "Body bytes received from origin for cacheable content."}, []string{"service_id", "service_name", "datacenter"}), - OriginCacheFetchRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "origin_cache_fetch_resp_header_bytes_total", Help: "Header bytes received from an origin for cacheable content."}, []string{"service_id", "service_name", "datacenter"}), - OriginCacheFetchesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "origin_cache_fetches_total", Help: "The total number of completed requests made to backends (origins) that returned cacheable content."}, []string{"service_id", "service_name", "datacenter"}), - OriginFetchBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "origin_fetch_body_bytes_total", Help: "Total request body bytes sent to origin."}, []string{"service_id", "service_name", "datacenter"}), - OriginFetchHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "origin_fetch_header_bytes_total", Help: "Total request header bytes sent to origin."}, []string{"service_id", "service_name", "datacenter"}), - OriginFetchRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "origin_fetch_resp_body_bytes_total", Help: "Total body bytes received from origin."}, []string{"service_id", "service_name", "datacenter"}), - OriginFetchRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "origin_fetch_resp_header_bytes_total", Help: "Total header bytes received from origin."}, []string{"service_id", "service_name", "datacenter"}), - OriginFetchesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "origin_fetches_total", Help: "Number of requests sent to origin."}, []string{"service_id", "service_name", "datacenter"}), - OriginRevalidationsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "origin_revalidations_total", Help: "Number of responses received from origin with a 304 status code in response to an If-Modified-Since or If-None-Match request. Under regular scenarios, a revalidation will imply a cache hit. However, if using Fastly Image Optimizer or segmented caching this may result in a cache miss."}, []string{"service_id", "service_name", "datacenter"}), - PCITotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "pci_total", Help: "Number of responses with the PCI flag turned on."}, []string{"service_id", "service_name", "datacenter"}), - PassRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "pass_resp_body_bytes_total", Help: "Total body bytes delivered for cache passes."}, []string{"service_id", "service_name", "datacenter"}), - PassSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "pass_sub_count_total", Help: "Number of executions of the 'pass' Varnish subroutine."}, []string{"service_id", "service_name", "datacenter"}), - PassSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "pass_sub_time_total", Help: "Time spent inside the 'pass' Varnish subroutine (in seconds)."}, []string{"service_id", "service_name", "datacenter"}), - PassTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "pass_time_total", Help: "Total amount of time spent processing cache passes (in seconds)."}, []string{"service_id", "service_name", "datacenter"}), - PassesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "pass_total", Help: "Number of requests that passed through the CDN without being cached."}, []string{"service_id", "service_name", "datacenter"}), - Pipe: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "pipe", Help: "Pipe operations performed."}, []string{"service_id", "service_name", "datacenter"}), - PipeSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "pipe_sub_count_total", Help: "Number of executions of the 'pipe' Varnish subroutine."}, []string{"service_id", "service_name", "datacenter"}), - PipeSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "pipe_sub_time_total", Help: "Time spent inside the 'pipe' Varnish subroutine (in seconds)."}, []string{"service_id", "service_name", "datacenter"}), - PredeliverSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "predeliver_sub_count_total", Help: "Number of executions of the 'predeliver' Varnish subroutine."}, []string{"service_id", "service_name", "datacenter"}), - PredeliverSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "predeliver_sub_time_total", Help: "Time spent inside the 'predeliver' Varnish subroutine (in seconds)."}, []string{"service_id", "service_name", "datacenter"}), - PrehashSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "prehash_sub_count_total", Help: "Number of executions of the 'prehash' Varnish subroutine."}, []string{"service_id", "service_name", "datacenter"}), - PrehashSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "prehash_sub_time_total", Help: "Time spent inside the 'prehash' Varnish subroutine (in seconds)."}, []string{"service_id", "service_name", "datacenter"}), + AttackBlockedReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "attack_blocked_req_body_bytes_total", Help: "Total body bytes received from requests that triggered a WAF rule that was blocked."}, labels), + AttackBlockedReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "attack_blocked_req_header_bytes_total", Help: "Total header bytes received from requests that triggered a WAF rule that was blocked."}, labels), + AttackLoggedReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "attack_logged_req_body_bytes_total", Help: "Total body bytes received from requests that triggered a WAF rule that was logged."}, labels), + AttackLoggedReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "attack_logged_req_header_bytes_total", Help: "Total header bytes received from requests that triggered a WAF rule that was logged."}, labels), + AttackPassedReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "attack_passed_req_body_bytes_total", Help: "Total body bytes received from requests that triggered a WAF rule that was passed."}, labels), + AttackPassedReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "attack_passed_req_header_bytes_total", Help: "Total header bytes received from requests that triggered a WAF rule that was passed."}, labels), + AttackReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "attack_req_body_bytes_total", Help: "Total body bytes received from requests that triggered a WAF rule."}, labels), + AttackReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "attack_req_header_bytes_total", Help: "Total header bytes received from requests that triggered a WAF rule."}, labels), + AttackRespSynthBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "attack_resp_synth_bytes_total", Help: "Total bytes delivered for requests that triggered a WAF rule and returned a synthetic response."}, labels), + BackendReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bereq_body_bytes_total", Help: "Total body bytes sent to origin."}, labels), + BackendReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bereq_header_bytes_total", Help: "Total header bytes sent to origin."}, labels), + BlacklistedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "blacklist_total", Help: "TODO"}, labels), + BodySizeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "body_size_total", Help: "Total body bytes delivered (alias for resp_body_bytes)."}, labels), + BotChallengeCompleteTokensCheckedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenge_complete_tokens_checked_total", Help: "The number of challenge-complete tokens checked."}, labels), + BotChallengeCompleteTokensDisabledTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenge_complete_tokens_disabled_total", Help: "TThe number of challenge-complete tokens not checked because the feature was disabled."}, labels), + BotChallengeCompleteTokensFailedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenge_complete_tokens_failed_total", Help: "TThe number of challenge-complete tokens that failed validation."}, labels), + BotChallengeCompleteTokensIssuedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenge_complete_tokens_issued_total", Help: "The number of challenge-complete tokens issued. For example, issuing a challenge-complete token after a series of CAPTCHA challenges ending in success."}, labels), + BotChallengeCompleteTokensPassedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenge_complete_tokens_passed_total", Help: "The number of challenge-complete tokens that passed validation."}, labels), + BotChallengeStartsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenge_starts_total", Help: "The number of challenge-start tokens created."}, labels), + BotChallengesFailedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenges_failed_total", Help: "The number of failed challenge solutions processed. For example, an incorrect CAPTCHA solution."}, labels), + BotChallengesIssuedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenges_issued_total", Help: "The number of challenges issued. For example, the issuance of a CAPTCHA challenge."}, labels), + BotChallengesSucceededTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenges_succeeded_total", Help: "The number of successful challenge solutions processed. For example, a correct CAPTCHA solution."}, labels), + ComputeBackendReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_bereq_body_bytes_total", Help: "Total body bytes sent to backends (origins) by Compute@Edge."}, labels), + ComputeBackendReqErrorsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_bereq_errors_total", Help: "Number of backend request errors, including timeouts."}, labels), + ComputeBackendReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_bereq_header_bytes_total", Help: "Total header bytes sent to backends (origins) by Compute@Edge."}, labels), + ComputeBackendReqTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_bereq_total", Help: "Number of backend requests started."}, labels), + ComputeBackendRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_beresp_body_bytes_total", Help: "Total body bytes received from backends (origins) by Compute@Edge."}, labels), + ComputeBackendRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_beresp_header_bytes_total", Help: "Total header bytes received from backends (origins) by Compute@Edge."}, labels), + ComputeExecutionTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_execution_time_total", Help: "The amount of active CPU time used to process your requests (in seconds)."}, labels), + ComputeGlobalsLimitExceededTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_globals_limit_exceeded_total", Help: "Number of times a guest exceeded its globals limit."}, labels), + ComputeGuestErrorsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_guest_errors_total", Help: "Number of times a service experienced a guest code error."}, labels), + ComputeHeapLimitExceededTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_heap_limit_exceeded_total", Help: "Number of times a guest exceeded its heap limit."}, labels), + ComputeRAMUsedBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_ram_used_bytes_total", Help: "The amount of RAM used for your site by Fastly."}, labels), + ComputeReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_req_body_bytes_total", Help: "Total body bytes received by Compute@Edge."}, labels), + ComputeReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_req_header_bytes_total", Help: "Total header bytes received by Compute@Edge."}, labels), + ComputeRequestTimeBilledTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_request_time_billed_total", Help: "The total amount of request processing time you will be billed for, measured in 50 millisecond increments. (in seconds)"}, labels), + ComputeRequestTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_request_time_total", Help: "The total amount of time used to process your requests, including active CPU time (in seconds)."}, labels), + ComputeRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_requests_total", Help: "The total number of requests that were received for your site by Fastly."}, labels), + ComputeResourceLimitExceedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_resource_limit_exceeded_total", Help: "Number of times a guest exceeded its resource limit, includes heap, stack, globals, and code execution timeout."}, labels), + ComputeRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_resp_body_bytes_total", Help: "Total body bytes sent from Compute@Edge to end user."}, labels), + ComputeRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_resp_header_bytes_total", Help: "Total header bytes sent from Compute@Edge to end user."}, labels), + ComputeRespStatusTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_resp_status_total", Help: "Number of responses delivered delivered by Compute@Edge, by status code group."}, addLabels(labels, "status_group")), + ComputeRuntimeErrorsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_runtime_errors_total", Help: "Number of times a service experienced a guest runtime error."}, labels), + ComputeStackLimitExceededTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "compute_stack_limit_exceeded_total", Help: "Number of times a guest exceeded its stack limit."}, labels), + DDOSActionBlackholeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "ddos_action_blackhole_total", Help: "The number of times the blackhole action was taken. The blackhole action quietly closes a TCP connection without sending a reset. The blackhole action quietly closes a TCP connection without notifying its peer (all TCP state is dropped)."}, labels), + DDOSActionCloseTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "ddos_action_close_total", Help: "The number of times the close action was taken. The close action aborts the connection as soon as possible. The close action takes effect either right after accept, right after the client hello, or right after the response was sent."}, labels), + DDOSActionDowngradeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "ddos_action_downgrade_total", Help: "The number of times the downgrade action was taken. The downgrade action restricts the client to http1."}, labels), + DDOSActionDowngradedConnectionsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "ddos_action_downgraded_connections_total", Help: "The number of connections the downgrade action was applied to. The downgrade action restricts the connection to http1."}, labels), + DDOSActionLimitStreamsConnectionsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "ddos_action_limit_streams_connections_total", Help: "For HTTP/2, the number of connections the limit-streams action was applied to. The limit-streams action caps the allowed number of concurrent streams in a connection."}, labels), + DDOSActionLimitStreamsRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "ddos_action_limit_streams_requests_total", Help: "For HTTP/2, the number of requests made on a connection for which the limit-streams action was taken. The limit-streams action caps the allowed number of concurrent streams in a connection."}, labels), + DDOSActionTarpitAcceptTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "ddos_action_tarpit_accept_total", Help: "The number of times the tarpit-accept action was taken. The tarpit-accept action adds a delay when accepting future connections."}, labels), + DDOSActionTarpitTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "ddos_action_tarpit_total", Help: "The number of times the tarpit action was taken. The tarpit action delays writing the response to the client."}, labels), + DeliverSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "deliver_sub_count_total", Help: "Number of executions of the 'deliver' Varnish subroutine."}, labels), + DeliverSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "deliver_sub_time_total", Help: "Time spent inside the 'deliver' Varnish subroutine (in seconds)."}, labels), + EdgeHitRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "edge_hit_requests_total", Help: "Number of requests sent by end users to Fastly that resulted in a hit at the edge."}, labels), + EdgeHitRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "edge_hit_resp_body_bytes_total", Help: "Body bytes delivered for edge hits."}, labels), + EdgeHitRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "edge_hit_resp_header_bytes_total", Help: "Header bytes delivered for edge hits."}, labels), + EdgeMissRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "edge_miss_requests_total", Help: "Number of requests sent by end users to Fastly that resulted in a miss at the edge."}, labels), + EdgeMissRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "edge_miss_resp_body_bytes_total", Help: "Body bytes delivered for edge misses."}, labels), + EdgeMissRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "edge_miss_resp_header_bytes_total", Help: "Header bytes delivered for edge misses."}, labels), + EdgeRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "edge_resp_body_bytes_total", Help: "Total body bytes delivered from Fastly to the end user."}, labels), + EdgeRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "edge_resp_header_bytes_total", Help: "Total header bytes delivered from Fastly to the end user."}, labels), + EdgeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "edge_total", Help: "Number of requests sent by end users to Fastly."}, labels), + ErrorSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "error_sub_count_total", Help: "Number of executions of the 'error' Varnish subroutine."}, labels), + ErrorSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "error_sub_time_total", Help: "Time spent inside the 'error' Varnish subroutine (in seconds)."}, labels), + ErrorsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "errors_total", Help: "Number of cache errors."}, labels), + FanoutBackendReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_bereq_body_bytes_total", Help: "Total body or message content bytes sent to backends over Fanout connections."}, labels), + FanoutBackendReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_bereq_header_bytes_total", Help: "Total header bytes sent to backends over Fanout connections."}, labels), + FanoutBackendRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_beresp_body_bytes_total", Help: "Total body or message content bytes received from backends over Fanout connections."}, labels), + FanoutBackendRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_beresp_header_bytes_total", Help: "Total header bytes received from backends over Fanout connections."}, labels), + FanoutConnTimeMsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_conn_time_ms_total", Help: "Total duration of Fanout connections with end users."}, labels), + FanoutRecvPublishesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_recv_publishes_total", Help: "Total published messages received from the publish API endpoint."}, labels), + FanoutReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_req_body_bytes_total", Help: "Total body or message content bytes received from end users over Fanout connections."}, labels), + FanoutReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_req_header_bytes_total", Help: "Total header bytes received from end users over Fanout connections."}, labels), + FanoutRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_resp_body_bytes_total", Help: "Total body or message content bytes sent to end users over Fanout connections, excluding published message content."}, labels), + FanoutRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_resp_header_bytes_total", Help: "Total header bytes sent to end users over Fanout connections."}, labels), + FanoutSendPublishesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fanout_send_publishes_total", Help: "Total published messages sent to end users."}, labels), + FetchSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fetch_sub_count_total", Help: "Number of executions of the 'fetch' Varnish subroutine."}, labels), + FetchSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "fetch_sub_time_total", Help: "Time spent inside the 'fetch' Varnish subroutine (in seconds)."}, labels), + HTTPTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "http_total", Help: "Number of requests received, by HTTP version."}, addLabels(labels, "http_version")), + HTTP2Total: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "http2_total", Help: "Number of requests received over HTTP2."}, labels), + HTTP3Total: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "http3_total", Help: "Number of requests received over HTTP3."}, labels), + HashSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "hash_sub_count_total", Help: "Number of executions of the 'hash' Varnish subroutine."}, labels), + HashSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "hash_sub_time_total", Help: "Time spent inside the 'hash' Varnish subroutine (in seconds)."}, labels), + HeaderSizeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "header_size_total", Help: "Total header bytes delivered (alias for resp_header_bytes)."}, labels), + HitRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "hit_resp_body_bytes_total", Help: "Total body bytes delivered for cache hits."}, labels), + HitSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "hit_sub_count_total", Help: "Number of executions of the 'hit' Varnish subroutine."}, labels), + HitSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "hit_sub_time_total", Help: "Time spent inside the 'hit' Varnish subroutine (in seconds)."}, labels), + HitsTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "hits_time_total", Help: "Total amount of time spent processing cache hits (in seconds)."}, labels), + HitsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "hits_total", Help: "Number of cache hits."}, labels), + IPv6Total: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "ipv6_total", Help: "Number of requests that were received over IPv6."}, labels), + ImgOptoRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgopto_resp_body_bytes_total", Help: "Total body bytes delivered from the Fastly Image Optimizer service."}, labels), + ImgOptoRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgopto_resp_header_bytes_total", Help: "Total header bytes delivered from the Fastly Image Optimizer service."}, labels), + ImgOptoShieldRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgopto_shield_resp_body_bytes_total", Help: "Total body bytes delivered via a shield from the Fastly Image Optimizer service."}, labels), + ImgOptoShieldRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgopto_shield_resp_header_bytes_total", Help: "Total header bytes delivered via a shield from the Fastly Image Optimizer service."}, labels), + ImgOptoShieldTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgopto_shield_total", Help: "Number of responses delivered via a shield from the Fastly Image Optimizer service."}, labels), + ImgOptoTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgopto_total", Help: "Number of responses that came from the Fastly Image Optimizer service."}, labels), + ImgOptoTransformRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgopto_transform_resp_body_bytes_total", Help: "Total body bytes of transforms delivered from the Fastly Image Optimizer service."}, labels), + ImgOptoTransformRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgopto_transform_resp_header_bytes_total", Help: "Total header bytes of transforms delivered from the Fastly Image Optimizer service."}, labels), + ImgOptoTransformTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgopto_transforms_total", Help: "Total transforms performed by the Fastly Image Optimizer service."}, labels), + ImgVideoFramesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgvideo_frames_total", Help: "Number of video frames that came from the Fastly Image Optimizer service."}, labels), + ImgVideoRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgvideo_resp_body_bytes_total", Help: "Total body bytes of video delivered from the Fastly Image Optimizer service."}, labels), + ImgVideoRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgvideo_resp_header_bytes_total", Help: "Total header bytes of video delivered from the Fastly Image Optimizer service."}, labels), + ImgVideoShieldFramesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgvideo_shield_frames_total", Help: "Number of video frames delivered via a shield from the Fastly Image Optimizer service."}, labels), + ImgVideoShieldRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgvideo_shield_resp_body_bytes_total", Help: "Total body bytes of video delivered via a shield from the Fastly Image Optimizer service."}, labels), + ImgVideoShieldRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgvideo_shield_resp_header_bytes_total", Help: "Total header bytes of video delivered via a shield from the Fastly Image Optimizer service."}, labels), + ImgVideoShieldTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgvideo_shield_total", Help: "Number of video responses that came via a shield from the Fastly Image Optimizer service."}, labels), + ImgVideoTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "imgvideo_total", Help: "Number of video responses that came via a shield from the Fastly Image Optimizer service."}, labels), + KVStoreClassAOperationsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "kv_store_class_a_operations_total", Help: "The total number of class a operations for the KV store."}, labels), + KVStoreClassBOperationsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "kv_store_class_b_operations_total", Help: "The total number of class b operations for the KV store."}, labels), + LogBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "log_bytes_total", Help: "Total log bytes sent."}, labels), + LoggingTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "logging_total", Help: "Number of log lines sent."}, labels), + MissDurationSeconds: prometheus.NewHistogramVec(prometheus.HistogramOpts{Namespace: namespace, Subsystem: subsystem, Name: "miss_duration_seconds", Help: "Histogram of time spent processing cache misses (in seconds).", Buckets: []float64{0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2, 4, 8, 16, 32, 60}}, labels), + MissRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "miss_resp_body_bytes_total", Help: "Total body bytes delivered for cache misses."}, labels), + MissSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "miss_sub_count_total", Help: "Number of executions of the 'miss' Varnish subroutine."}, labels), + MissSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "miss_sub_time_total", Help: "Time spent inside the 'miss' Varnish subroutine (in seconds)."}, labels), + MissTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "miss_time_total", Help: "Total amount of time spent processing cache misses (in seconds)."}, labels), + MissesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "miss_total", Help: "Number of cache misses."}, labels), + OTFPDeliverTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_total", Help: "Number of responses that came from the Fastly On-the-Fly Packager."}, labels), + OTFPManifestTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_deliver_time_total", Help: "Total amount of time spent delivering a response from the Fastly On-the-Fly Packager (in seconds)."}, labels), + OTFPRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_manifests_total", Help: "Number of responses that were manifest files from the Fastly On-the-Fly Packager."}, labels), + OTFPRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_resp_body_bytes_total", Help: "Total body bytes delivered from the Fastly On-the-Fly Packager."}, labels), + OTFPShieldRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_resp_header_bytes_total", Help: "Total header bytes delivered from the Fastly On-the-Fly Packager."}, labels), + OTFPShieldRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_shield_total", Help: "Number of responses delivered from the Fastly On-the-Fly Packager"}, labels), + OTFPShieldTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_shield_resp_body_bytes_total", Help: "Total body bytes delivered via a shield for the Fastly On-the-Fly Packager."}, labels), + OTFPShieldTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_shield_resp_header_bytes_total", Help: "Total header bytes delivered via a shield for the Fastly On-the-Fly Packager."}, labels), + OTFPTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_shield_time_total", Help: "Total amount of time spent delivering a response via a shield from the Fastly On-the-Fly Packager (in seconds)."}, labels), + OTFPTransformRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_transforms_total", Help: "Number of transforms performed by the Fastly On-the-Fly Packager."}, labels), + OTFPTransformRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_transform_resp_body_bytes_total", Help: "Total body bytes of transforms delivered from the Fastly On-the-Fly Packager."}, labels), + OTFPTransformTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_transform_resp_header_bytes_total", Help: "Total body bytes of transforms delivered from the Fastly On-the-Fly Packager."}, labels), + OTFPTransformTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "otfp_transform_time_total", Help: "Total amount of time spent performing transforms from the Fastly On-the-Fly Packager."}, labels), + ObjectSizeBytes: prometheus.NewHistogramVec(prometheus.HistogramOpts{Namespace: namespace, Subsystem: subsystem, Name: "object_size_bytes", Help: "Histogram of count of objects served, bucketed by object size range.", Buckets: []float64{1024, 10240, 102400, 1.024e+06, 1.024e+07, 1.024e+08, 1.024e+09}}, labels), + OriginCacheFetchRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "origin_cache_fetch_resp_body_bytes_total", Help: "Body bytes received from origin for cacheable content."}, labels), + OriginCacheFetchRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "origin_cache_fetch_resp_header_bytes_total", Help: "Header bytes received from an origin for cacheable content."}, labels), + OriginCacheFetchesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "origin_cache_fetches_total", Help: "The total number of completed requests made to backends (origins) that returned cacheable content."}, labels), + OriginFetchBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "origin_fetch_body_bytes_total", Help: "Total request body bytes sent to origin."}, labels), + OriginFetchHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "origin_fetch_header_bytes_total", Help: "Total request header bytes sent to origin."}, labels), + OriginFetchRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "origin_fetch_resp_body_bytes_total", Help: "Total body bytes received from origin."}, labels), + OriginFetchRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "origin_fetch_resp_header_bytes_total", Help: "Total header bytes received from origin."}, labels), + OriginFetchesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "origin_fetches_total", Help: "Number of requests sent to origin."}, labels), + OriginRevalidationsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "origin_revalidations_total", Help: "Number of responses received from origin with a 304 status code in response to an If-Modified-Since or If-None-Match request. Under regular scenarios, a revalidation will imply a cache hit. However, if using Fastly Image Optimizer or segmented caching this may result in a cache miss."}, labels), + PCITotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "pci_total", Help: "Number of responses with the PCI flag turned on."}, labels), + PassRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "pass_resp_body_bytes_total", Help: "Total body bytes delivered for cache passes."}, labels), + PassSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "pass_sub_count_total", Help: "Number of executions of the 'pass' Varnish subroutine."}, labels), + PassSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "pass_sub_time_total", Help: "Time spent inside the 'pass' Varnish subroutine (in seconds)."}, labels), + PassTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "pass_time_total", Help: "Total amount of time spent processing cache passes (in seconds)."}, labels), + PassesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "pass_total", Help: "Number of requests that passed through the CDN without being cached."}, labels), + Pipe: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "pipe", Help: "Pipe operations performed."}, labels), + PipeSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "pipe_sub_count_total", Help: "Number of executions of the 'pipe' Varnish subroutine."}, labels), + PipeSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "pipe_sub_time_total", Help: "Time spent inside the 'pipe' Varnish subroutine (in seconds)."}, labels), + PredeliverSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "predeliver_sub_count_total", Help: "Number of executions of the 'predeliver' Varnish subroutine."}, labels), + PredeliverSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "predeliver_sub_time_total", Help: "Time spent inside the 'predeliver' Varnish subroutine (in seconds)."}, labels), + PrehashSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "prehash_sub_count_total", Help: "Number of executions of the 'prehash' Varnish subroutine."}, labels), + PrehashSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "prehash_sub_time_total", Help: "Time spent inside the 'prehash' Varnish subroutine (in seconds)."}, labels), RealtimeAPIRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "realtime_api_requests_total", Help: "Total requests made to the real-time stats API."}, []string{"service_id", "service_name", "result"}), - RecvSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "recv_sub_count_total", Help: "Number of executions of the 'recv' Varnish subroutine."}, []string{"service_id", "service_name", "datacenter"}), - RecvSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "recv_sub_time_total", Help: "Time spent inside the 'recv' Varnish subroutine (in seconds)."}, []string{"service_id", "service_name", "datacenter"}), - ReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "req_body_bytes_total", Help: "Total body bytes received."}, []string{"service_id", "service_name", "datacenter"}), - ReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "req_header_bytes_total", Help: "Total header bytes received."}, []string{"service_id", "service_name", "datacenter"}), - RequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "requests_total", Help: "Number of requests processed."}, []string{"service_id", "service_name", "datacenter"}), - RespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "resp_body_bytes_total", Help: "Total body bytes delivered."}, []string{"service_id", "service_name", "datacenter"}), - RespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "resp_header_bytes_total", Help: "Total header bytes delivered."}, []string{"service_id", "service_name", "datacenter"}), - RestartTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "restarts_total", Help: "Number of restarts performed."}, []string{"service_id", "service_name", "datacenter"}), - SegBlockOriginFetchesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "segblock_origin_fetches_total", Help: "Number of Range requests to origin for segments of resources when using segmented caching."}, []string{"service_id", "service_name", "datacenter"}), - SegBlockShieldFetchesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "segblock_shield_fetches_total", Help: "Number of Range requests to a shield for segments of resources when using segmented caching."}, []string{"service_id", "service_name", "datacenter"}), - ShieldCacheFetchesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_cache_fetches_total", Help: "The total number of completed requests made to shields that returned cacheable content."}, []string{"service_id", "service_name", "datacenter"}), - ShieldFetchBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_fetch_body_bytes_total", Help: "Total request body bytes sent to a shield."}, []string{"service_id", "service_name", "datacenter"}), - ShieldFetchHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_fetch_header_bytes_total", Help: "Total request header bytes sent to a shield."}, []string{"service_id", "service_name", "datacenter"}), - ShieldFetchRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_fetch_resp_body_bytes_total", Help: "Total response body bytes sent from a shield to the edge."}, []string{"service_id", "service_name", "datacenter"}), - ShieldFetchRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_fetch_resp_header_bytes_total", Help: "Total response header bytes sent from a shield to the edge."}, []string{"service_id", "service_name", "datacenter"}), - ShieldFetchesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_fetches_total", Help: "Number of requests made from one Fastly data center to another, as part of shielding."}, []string{"service_id", "service_name", "datacenter"}), - ShieldHitRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_hit_requests_total", Help: "Number of requests that resulted in a hit at a shield."}, []string{"service_id", "service_name", "datacenter"}), - ShieldHitRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_hit_resp_body_bytes_total", Help: "Body bytes delivered for shield hits."}, []string{"service_id", "service_name", "datacenter"}), - ShieldHitRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_hit_resp_header_bytes_total", Help: "Header bytes delivered for shield hits."}, []string{"service_id", "service_name", "datacenter"}), - ShieldMissRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_miss_requests_total", Help: "Number of requests that resulted in a miss at a shield."}, []string{"service_id", "service_name", "datacenter"}), - ShieldMissRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_miss_resp_body_bytes_total", Help: "Body bytes delivered for shield misses."}, []string{"service_id", "service_name", "datacenter"}), - ShieldMissRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_miss_resp_header_bytes_total", Help: "Header bytes delivered for shield misses."}, []string{"service_id", "service_name", "datacenter"}), - ShieldRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_resp_body_bytes_total", Help: "Total body bytes delivered via a shield."}, []string{"service_id", "service_name", "datacenter"}), - ShieldRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_resp_header_bytes_total", Help: "Total header bytes delivered via a shield."}, []string{"service_id", "service_name", "datacenter"}), - ShieldRevalidationsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_revalidations_total", Help: "Number of responses received from origin with a 304 status code, in response to an If-Modified-Since or If-None-Match request to a shield. Under regular scenarios, a revalidation will imply a cache hit. However, if using segmented caching this may result in a cache miss."}, []string{"service_id", "service_name", "datacenter"}), - ShieldTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_total", Help: "Number of requests from edge to the shield POP."}, []string{"service_id", "service_name", "datacenter"}), - StatusCodeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "status_code_total", Help: "Number of responses sent with status code 500 (Internal Server Error)."}, []string{"service_id", "service_name", "datacenter", "status_code"}), - StatusGroupTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "status_group_total", Help: "Number of 'Client Error' category status codes delivered."}, []string{"service_id", "service_name", "datacenter", "status_group"}), - SynthsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "synth_total", Help: "TODO"}, []string{"service_id", "service_name", "datacenter"}), - TLSTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "tls_total", Help: "Number of requests that were received over TLS."}, []string{"service_id", "service_name", "datacenter", "tls_version"}), - UncacheableTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "uncacheable_total", Help: "Number of requests that were designated uncachable."}, []string{"service_id", "service_name", "datacenter"}), - VclOnComputeHitRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "vcl_on_compute_hit_requests_total", Help: "Number of cache hits for a VCL service running on Compute."}, []string{"service_id", "service_name", "datacenter"}), - VclOnComputeMissRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "vcl_on_compute_miss_requests_total", Help: "Number of cache misses for a VCL service running on Compute."}, []string{"service_id", "service_name", "datacenter"}), - VclOnComputePassRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "vcl_on_compute_pass_requests_total", Help: "Number of requests that passed through the CDN without being cached for a VCL service running on Compute."}, []string{"service_id", "service_name", "datacenter"}), - VclOnComputeErrorRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "vcl_on_compute_error_requests_total", Help: "Number of cache errors for a VCL service running on Compute."}, []string{"service_id", "service_name", "datacenter"}), - VclOnComputeSynthRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "vcl_on_compute_synth_requests_total", Help: "Number of requests that returned a synthetic response (i.e., response objects created with the synthetic VCL statement) for a VCL service running on Compute."}, []string{"service_id", "service_name", "datacenter"}), - VclOnComputeEdgeHitRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "vcl_on_compute_edge_hit_requests_total", Help: "Number of requests sent by end users to Fastly that resulted in a hit at the edge for a VCL service running on Compute."}, []string{"service_id", "service_name", "datacenter"}), - VclOnComputeEdgeMissRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "vcl_on_compute_edge_miss_requests_total", Help: "Number of requests sent by end users to Fastly that resulted in a miss at the edge for a VCL service running on Compute."}, []string{"service_id", "service_name", "datacenter"}), - VideoTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "video_total", Help: "Number of responses with the video segment or video manifest MIME type (i.e., application/x-mpegurl, application/vnd.apple.mpegurl, application/f4m, application/dash+xml, application/vnd.ms-sstr+xml, ideo/mp2t, audio/aac, video/f4f, video/x-flv, video/mp4, audio/mp4)."}, []string{"service_id", "service_name", "datacenter"}), - WAFBlockedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "waf_blocked_total", Help: "Number of requests that triggered a WAF rule and were blocked."}, []string{"service_id", "service_name", "datacenter"}), - WAFLoggedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "waf_logged_total", Help: "Number of requests that triggered a WAF rule and were logged."}, []string{"service_id", "service_name", "datacenter"}), - WAFPassedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "waf_passed_total", Help: "Number of requests that triggered a WAF rule and were passed."}, []string{"service_id", "service_name", "datacenter"}), - WebsocketBackendReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "websocket_bereq_body_bytes_total", Help: "Total message content bytes sent to backends over passthrough WebSocket connections."}, []string{"service_id", "service_name", "datacenter"}), - WebsocketBackendReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "websocket_bereq_header_bytes_total", Help: "Total header bytes sent to backends over passthrough WebSocket connections."}, []string{"service_id", "service_name", "datacenter"}), - WebsocketBackendRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "websocket_beresp_body_bytes_total", Help: "Total message content bytes received from backends over passthrough WebSocket connections."}, []string{"service_id", "service_name", "datacenter"}), - WebsocketBackendRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "websocket_beresp_header_bytes_total", Help: "Total header bytes received from backends over passthrough WebSocket connections."}, []string{"service_id", "service_name", "datacenter"}), - WebsocketConnTimeMsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "websocket_conn_time_ms_total", Help: "Total duration of passthrough WebSocket connections with end users."}, []string{"service_id", "service_name", "datacenter"}), - WebsocketReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "websocket_req_body_bytes_total", Help: "Total message content bytes received from end users over passthrough WebSocket connections."}, []string{"service_id", "service_name", "datacenter"}), - WebsocketReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "websocket_req_header_bytes_total", Help: "Total header bytes received from end users over passthrough WebSocket connections."}, []string{"service_id", "service_name", "datacenter"}), - WebsocketRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "websocket_resp_body_bytes_total", Help: "Total message content bytes sent to end users over passthrough WebSocket connections."}, []string{"service_id", "service_name", "datacenter"}), - WebsocketRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "websocket_resp_header_bytes_total", Help: "Total header bytes sent to end users over passthrough WebSocket connections."}, []string{"service_id", "service_name", "datacenter"}), + RecvSubCountTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "recv_sub_count_total", Help: "Number of executions of the 'recv' Varnish subroutine."}, labels), + RecvSubTimeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "recv_sub_time_total", Help: "Time spent inside the 'recv' Varnish subroutine (in seconds)."}, labels), + ReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "req_body_bytes_total", Help: "Total body bytes received."}, labels), + ReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "req_header_bytes_total", Help: "Total header bytes received."}, labels), + RequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "requests_total", Help: "Number of requests processed."}, labels), + RespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "resp_body_bytes_total", Help: "Total body bytes delivered."}, labels), + RespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "resp_header_bytes_total", Help: "Total header bytes delivered."}, labels), + RestartTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "restarts_total", Help: "Number of restarts performed."}, labels), + SegBlockOriginFetchesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "segblock_origin_fetches_total", Help: "Number of Range requests to origin for segments of resources when using segmented caching."}, labels), + SegBlockShieldFetchesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "segblock_shield_fetches_total", Help: "Number of Range requests to a shield for segments of resources when using segmented caching."}, labels), + ShieldCacheFetchesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_cache_fetches_total", Help: "The total number of completed requests made to shields that returned cacheable content."}, labels), + ShieldFetchBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_fetch_body_bytes_total", Help: "Total request body bytes sent to a shield."}, labels), + ShieldFetchHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_fetch_header_bytes_total", Help: "Total request header bytes sent to a shield."}, labels), + ShieldFetchRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_fetch_resp_body_bytes_total", Help: "Total response body bytes sent from a shield to the edge."}, labels), + ShieldFetchRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_fetch_resp_header_bytes_total", Help: "Total response header bytes sent from a shield to the edge."}, labels), + ShieldFetchesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_fetches_total", Help: "Number of requests made from one Fastly data center to another, as part of shielding."}, labels), + ShieldHitRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_hit_requests_total", Help: "Number of requests that resulted in a hit at a shield."}, labels), + ShieldHitRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_hit_resp_body_bytes_total", Help: "Body bytes delivered for shield hits."}, labels), + ShieldHitRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_hit_resp_header_bytes_total", Help: "Header bytes delivered for shield hits."}, labels), + ShieldMissRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_miss_requests_total", Help: "Number of requests that resulted in a miss at a shield."}, labels), + ShieldMissRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_miss_resp_body_bytes_total", Help: "Body bytes delivered for shield misses."}, labels), + ShieldMissRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_miss_resp_header_bytes_total", Help: "Header bytes delivered for shield misses."}, labels), + ShieldRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_resp_body_bytes_total", Help: "Total body bytes delivered via a shield."}, labels), + ShieldRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_resp_header_bytes_total", Help: "Total header bytes delivered via a shield."}, labels), + ShieldRevalidationsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_revalidations_total", Help: "Number of responses received from origin with a 304 status code, in response to an If-Modified-Since or If-None-Match request to a shield. Under regular scenarios, a revalidation will imply a cache hit. However, if using segmented caching this may result in a cache miss."}, labels), + ShieldTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "shield_total", Help: "Number of requests from edge to the shield POP."}, labels), + StatusCodeTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "status_code_total", Help: "Number of responses sent with status code 500 (Internal Server Error)."}, addLabels(labels, "status_code")), + StatusGroupTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "status_group_total", Help: "Number of 'Client Error' category status codes delivered."}, addLabels(labels, "status_group")), + SynthsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "synth_total", Help: "TODO"}, labels), + TLSTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "tls_total", Help: "Number of requests that were received over TLS."}, addLabels(labels, "tls_version")), + UncacheableTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "uncacheable_total", Help: "Number of requests that were designated uncachable."}, labels), + VclOnComputeHitRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "vcl_on_compute_hit_requests_total", Help: "Number of cache hits for a VCL service running on Compute."}, labels), + VclOnComputeMissRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "vcl_on_compute_miss_requests_total", Help: "Number of cache misses for a VCL service running on Compute."}, labels), + VclOnComputePassRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "vcl_on_compute_pass_requests_total", Help: "Number of requests that passed through the CDN without being cached for a VCL service running on Compute."}, labels), + VclOnComputeErrorRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "vcl_on_compute_error_requests_total", Help: "Number of cache errors for a VCL service running on Compute."}, labels), + VclOnComputeSynthRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "vcl_on_compute_synth_requests_total", Help: "Number of requests that returned a synthetic response (i.e., response objects created with the synthetic VCL statement) for a VCL service running on Compute."}, labels), + VclOnComputeEdgeHitRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "vcl_on_compute_edge_hit_requests_total", Help: "Number of requests sent by end users to Fastly that resulted in a hit at the edge for a VCL service running on Compute."}, labels), + VclOnComputeEdgeMissRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "vcl_on_compute_edge_miss_requests_total", Help: "Number of requests sent by end users to Fastly that resulted in a miss at the edge for a VCL service running on Compute."}, labels), + VideoTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "video_total", Help: "Number of responses with the video segment or video manifest MIME type (i.e., application/x-mpegurl, application/vnd.apple.mpegurl, application/f4m, application/dash+xml, application/vnd.ms-sstr+xml, ideo/mp2t, audio/aac, video/f4f, video/x-flv, video/mp4, audio/mp4)."}, labels), + WAFBlockedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "waf_blocked_total", Help: "Number of requests that triggered a WAF rule and were blocked."}, labels), + WAFLoggedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "waf_logged_total", Help: "Number of requests that triggered a WAF rule and were logged."}, labels), + WAFPassedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "waf_passed_total", Help: "Number of requests that triggered a WAF rule and were passed."}, labels), + WebsocketBackendReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "websocket_bereq_body_bytes_total", Help: "Total message content bytes sent to backends over passthrough WebSocket connections."}, labels), + WebsocketBackendReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "websocket_bereq_header_bytes_total", Help: "Total header bytes sent to backends over passthrough WebSocket connections."}, labels), + WebsocketBackendRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "websocket_beresp_body_bytes_total", Help: "Total message content bytes received from backends over passthrough WebSocket connections."}, labels), + WebsocketBackendRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "websocket_beresp_header_bytes_total", Help: "Total header bytes received from backends over passthrough WebSocket connections."}, labels), + WebsocketConnTimeMsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "websocket_conn_time_ms_total", Help: "Total duration of passthrough WebSocket connections with end users."}, labels), + WebsocketReqBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "websocket_req_body_bytes_total", Help: "Total message content bytes received from end users over passthrough WebSocket connections."}, labels), + WebsocketReqHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "websocket_req_header_bytes_total", Help: "Total header bytes received from end users over passthrough WebSocket connections."}, labels), + WebsocketRespBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "websocket_resp_body_bytes_total", Help: "Total message content bytes sent to end users over passthrough WebSocket connections."}, labels), + WebsocketRespHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "websocket_resp_header_bytes_total", Help: "Total header bytes sent to end users over passthrough WebSocket connections."}, labels), } for i, v := 0, reflect.ValueOf(m); i < v.NumField(); i++ { @@ -459,3 +465,11 @@ func getName(c prometheus.Collector) string { } return "" } + +func addLabels(ls []string, l ...string) []string { + labels := make([]string, len(ls), len(ls)+len(l)) + + copy(labels, ls) + + return append(labels, l...) +} diff --git a/pkg/realtime/process.go b/pkg/realtime/process.go index 394576d..4f6645e 100644 --- a/pkg/realtime/process.go +++ b/pkg/realtime/process.go @@ -8,248 +8,263 @@ import ( // Process updates the metrics with data from the API response. func Process(response *Response, serviceID, serviceName, serviceVersion string, m *Metrics) { + sl := prometheus.Labels{ + "service_id": serviceID, + "service_name": serviceName, + } + for _, d := range response.Data { for datacenter, stats := range d.Datacenter { - m.AttackBlockedReqBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.AttackBlockedReqBodyBytes)) - m.AttackBlockedReqHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.AttackBlockedReqHeaderBytes)) - m.AttackLoggedReqBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.AttackLoggedReqBodyBytes)) - m.AttackLoggedReqHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.AttackLoggedReqHeaderBytes)) - m.AttackPassedReqBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.AttackPassedReqBodyBytes)) - m.AttackPassedReqHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.AttackPassedReqHeaderBytes)) - m.AttackReqBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.AttackReqBodyBytes)) - m.AttackReqHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.AttackReqHeaderBytes)) - m.AttackRespSynthBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.AttackRespSynthBytes)) - m.BackendReqBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BackendReqBodyBytes)) - m.BackendReqHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BackendReqHeaderBytes)) - m.BlacklistedTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.Blacklisted)) - m.BodySizeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BodySize)) - m.BotChallengeCompleteTokensCheckedTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengeCompleteTokensChecked)) - m.BotChallengeCompleteTokensDisabledTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengeCompleteTokensDisabled)) - m.BotChallengeCompleteTokensFailedTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengeCompleteTokensFailed)) - m.BotChallengeCompleteTokensIssuedTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengeCompleteTokensIssued)) - m.BotChallengeCompleteTokensPassedTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengeCompleteTokensPassed)) - m.BotChallengeStartsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengeStarts)) - m.BotChallengesFailedTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengesFailed)) - m.BotChallengesIssuedTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengesIssued)) - m.BotChallengesSucceededTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengesSucceeded)) - m.ComputeBackendReqBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeBackendReqBodyBytesTotal)) - m.ComputeBackendReqErrorsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeBackendReqErrorsTotal)) - m.ComputeBackendReqHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeBackendReqHeaderBytesTotal)) - m.ComputeBackendReqTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeBackendReqTotal)) - m.ComputeBackendRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeBackendRespBodyBytesTotal)) - m.ComputeBackendRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeBackendRespHeaderBytesTotal)) - m.ComputeExecutionTimeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeExecutionTimeMilliseconds) / 10000.0) - m.ComputeGlobalsLimitExceededTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeGlobalsLimitExceededTotal)) - m.ComputeGuestErrorsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeGuestErrorsTotal)) - m.ComputeHeapLimitExceededTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeHeapLimitExceededTotal)) - m.ComputeRAMUsedBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeRAMUsed)) - m.ComputeReqBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeReqBodyBytesTotal)) - m.ComputeReqHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeReqHeaderBytesTotal)) - m.ComputeRequestTimeBilledTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeRequestTimeBilledMilliseconds) / 10000.0) - m.ComputeRequestTimeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeRequestTimeMilliseconds) / 10000.0) - m.ComputeRequestsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeRequests)) - m.ComputeResourceLimitExceedTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeResourceLimitExceedTotal)) - m.ComputeRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeRespBodyBytesTotal)) - m.ComputeRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeRespHeaderBytesTotal)) - m.ComputeRespStatusTotal.WithLabelValues(serviceID, serviceName, datacenter, "1xx").Add(float64(stats.ComputeRespStatus1xx)) - m.ComputeRespStatusTotal.WithLabelValues(serviceID, serviceName, datacenter, "2xx").Add(float64(stats.ComputeRespStatus2xx)) - m.ComputeRespStatusTotal.WithLabelValues(serviceID, serviceName, datacenter, "3xx").Add(float64(stats.ComputeRespStatus3xx)) - m.ComputeRespStatusTotal.WithLabelValues(serviceID, serviceName, datacenter, "4xx").Add(float64(stats.ComputeRespStatus4xx)) - m.ComputeRespStatusTotal.WithLabelValues(serviceID, serviceName, datacenter, "5xx").Add(float64(stats.ComputeRespStatus5xx)) - m.ComputeRuntimeErrorsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeRuntimeErrorsTotal)) - m.ComputeStackLimitExceededTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeStackLimitExceededTotal)) - m.DDOSActionBlackholeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.DDOSActionBlackhole)) - m.DDOSActionCloseTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.DDOSActionClose)) - m.DDOSActionDowngradeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.DDOSActionDowngrade)) - m.DDOSActionDowngradedConnectionsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.DDOSActionDowngradedConnections)) - m.DDOSActionLimitStreamsConnectionsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.DDOSActionLimitStreamsConnections)) - m.DDOSActionLimitStreamsRequestsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.DDOSActionLimitStreamsRequests)) - m.DDOSActionTarpitAcceptTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.DDOSActionTarpitAccept)) - m.DDOSActionTarpitTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.DDOSActionTarpit)) - m.DeliverSubCountTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.DeliverSubCount)) - m.DeliverSubTimeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.DeliverSubTime)) - m.EdgeHitRequestsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.EdgeHitRequests)) - m.EdgeHitRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.EdgeHitRespBodyBytes)) - m.EdgeHitRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.EdgeHitRespHeaderBytes)) - m.EdgeMissRequestsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.EdgeMissRequests)) - m.EdgeMissRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.EdgeMissRespBodyBytes)) - m.EdgeMissRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.EdgeMissRespHeaderBytes)) - m.EdgeRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.EdgeRespBodyBytes)) - m.EdgeRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.EdgeRespHeaderBytes)) - m.EdgeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.Edge)) - m.ErrorSubCountTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ErrorSubCount)) - m.ErrorSubTimeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ErrorSubTime)) - m.ErrorsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.Errors)) - m.FanoutBackendReqBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.FanoutBackendReqBodyBytes)) - m.FanoutBackendReqHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.FanoutBackendReqHeaderBytes)) - m.FanoutBackendRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.FanoutBackendRespBodyBytes)) - m.FanoutBackendRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.FanoutBackendRespHeaderBytes)) - m.FanoutConnTimeMsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.FanoutConnTimeMs)) - m.FanoutRecvPublishesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.FanoutRecvPublishes)) - m.FanoutReqBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.FanoutReqBodyBytes)) - m.FanoutReqHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.FanoutReqHeaderBytes)) - m.FanoutRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.FanoutRespBodyBytes)) - m.FanoutRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.FanoutRespHeaderBytes)) - m.FanoutSendPublishesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.FanoutSendPublishes)) - m.FetchSubCountTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.FetchSubCount)) - m.FetchSubTimeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.FetchSubTime)) - m.HTTPTotal.WithLabelValues(serviceID, serviceName, datacenter, "1").Add(float64(stats.Requests - (stats.HTTP2 + stats.HTTP3))) - m.HTTPTotal.WithLabelValues(serviceID, serviceName, datacenter, "2").Add(float64(stats.HTTP2)) - m.HTTPTotal.WithLabelValues(serviceID, serviceName, datacenter, "3").Add(float64(stats.HTTP3)) - m.HTTP2Total.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.HTTP2)) - m.HTTP3Total.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.HTTP3)) - m.HashSubCountTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.HashSubCount)) - m.HashSubTimeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.HashSubTime)) - m.HeaderSizeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.HeaderSize)) - m.HitRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.HitRespBodyBytes)) - m.HitSubCountTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.HitSubCount)) - m.HitSubTimeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.HitSubTime)) - m.HitsTimeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.HitsTime)) - m.HitsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.Hits)) - m.IPv6Total.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.IPv6)) - m.ImgOptoRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ImgOptoRespBodyBytes)) - m.ImgOptoRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ImgOptoRespHeaderBytes)) - m.ImgOptoShieldRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ImgOptoShieldRespBodyBytes)) - m.ImgOptoShieldRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ImgOptoShieldRespHeaderBytes)) - m.ImgOptoShieldTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ImgOptoShield)) - m.ImgOptoTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ImgOpto)) - m.ImgOptoTransformRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ImgOptoTransformRespBodyBytes)) - m.ImgOptoTransformRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ImgOptoTransformRespHeaderBytes)) - m.ImgOptoTransformTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ImgOptoTransform)) - m.ImgVideoFramesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ImgVideoFrames)) - m.ImgVideoRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ImgVideoRespBodyBytes)) - m.ImgVideoRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ImgVideoRespHeaderBytes)) - m.ImgVideoShieldFramesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ImgVideoShieldFrames)) - m.ImgVideoShieldRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ImgVideoShieldRespBodyBytes)) - m.ImgVideoShieldRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ImgVideoShieldRespHeaderBytes)) - m.ImgVideoShieldTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ImgVideoShield)) - m.ImgVideoTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ImgVideo)) - m.KVStoreClassAOperationsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.KVStoreClassAOperations)) - m.KVStoreClassBOperationsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.KVStoreClassBOperations)) - m.LogBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.LogBytes)) - m.LoggingTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.Logging)) - m.MissRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.MissRespBodyBytes)) - m.MissSubCountTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.MissSubCount)) - m.MissSubTimeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.MissSubTime)) - m.MissTimeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.MissTime)) - m.MissesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.Misses)) - m.OTFPDeliverTimeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OTFPDeliverTime)) - m.OTFPManifestTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OTFPManifest)) - m.OTFPRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OTFPRespBodyBytes)) - m.OTFPRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OTFPRespHeaderBytes)) - m.OTFPShieldRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OTFPShieldRespBodyBytes)) - m.OTFPShieldRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OTFPShieldRespHeaderBytes)) - m.OTFPShieldTimeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OTFPShieldTime)) - m.OTFPShieldTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OTFPShield)) - m.OTFPTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OTFP)) - m.OTFPTransformRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OTFPTransformRespBodyBytes)) - m.OTFPTransformRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OTFPTransformRespHeaderBytes)) - m.OTFPTransformTimeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OTFPTransformTime)) - m.OTFPTransformTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OTFPTransform)) - m.OriginCacheFetchRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OriginCacheFetchRespBodyBytes)) - m.OriginCacheFetchRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OriginCacheFetchRespHeaderBytes)) - m.OriginCacheFetchesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OriginCacheFetches)) - m.OriginFetchBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OriginFetchBodyBytes)) - m.OriginFetchHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OriginFetchHeaderBytes)) - m.OriginFetchRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OriginFetchRespBodyBytes)) - m.OriginFetchRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OriginFetchRespHeaderBytes)) - m.OriginFetchesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OriginFetches)) - m.OriginRevalidationsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.OriginRevalidations)) - m.PCITotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.PCI)) - m.PassRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.PassRespBodyBytes)) - m.PassSubCountTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.PassSubCount)) - m.PassSubTimeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.PassSubTime)) - m.PassTimeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.PassTime)) - m.PassesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.Passes)) - m.Pipe.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.Pipe)) - m.PipeSubCountTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.PipeSubCount)) - m.PipeSubTimeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.PipeSubTime)) - m.PredeliverSubCountTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.PredeliverSubCount)) - m.PredeliverSubTimeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.PredeliverSubTime)) - m.PrehashSubCountTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.PrehashSubCount)) - m.PrehashSubTimeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.PrehashSubTime)) - m.RecvSubCountTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.RecvSubCount)) - m.RecvSubTimeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.RecvSubTime)) - m.ReqBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ReqBodyBytes)) - m.ReqHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ReqHeaderBytes)) - m.RequestsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.Requests)) - m.RespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.RespBodyBytes)) - m.RespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.RespHeaderBytes)) - m.RestartTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.Restart)) - m.SegBlockOriginFetchesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.SegBlockOriginFetches)) - m.SegBlockShieldFetchesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.SegBlockShieldFetches)) - m.ShieldCacheFetchesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ShieldCacheFetches)) - m.ShieldFetchBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ShieldFetchBodyBytes)) - m.ShieldFetchHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ShieldFetchHeaderBytes)) - m.ShieldFetchRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ShieldFetchRespBodyBytes)) - m.ShieldFetchRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ShieldFetchRespHeaderBytes)) - m.ShieldFetchesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ShieldFetches)) - m.ShieldHitRequestsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ShieldHitRequests)) - m.ShieldHitRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ShieldHitRespBodyBytes)) - m.ShieldHitRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ShieldHitRespHeaderBytes)) - m.ShieldMissRequestsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ShieldMissRequests)) - m.ShieldMissRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ShieldMissRespBodyBytes)) - m.ShieldMissRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ShieldMissRespHeaderBytes)) - m.ShieldRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ShieldRespBodyBytes)) - m.ShieldRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ShieldRespHeaderBytes)) - m.ShieldRevalidationsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ShieldRevalidations)) - m.ShieldTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.Shield)) - m.StatusCodeTotal.WithLabelValues(serviceID, serviceName, datacenter, "200").Add(float64(stats.Status200)) - m.StatusCodeTotal.WithLabelValues(serviceID, serviceName, datacenter, "204").Add(float64(stats.Status204)) - m.StatusCodeTotal.WithLabelValues(serviceID, serviceName, datacenter, "206").Add(float64(stats.Status206)) - m.StatusCodeTotal.WithLabelValues(serviceID, serviceName, datacenter, "301").Add(float64(stats.Status301)) - m.StatusCodeTotal.WithLabelValues(serviceID, serviceName, datacenter, "302").Add(float64(stats.Status302)) - m.StatusCodeTotal.WithLabelValues(serviceID, serviceName, datacenter, "304").Add(float64(stats.Status304)) - m.StatusCodeTotal.WithLabelValues(serviceID, serviceName, datacenter, "400").Add(float64(stats.Status400)) - m.StatusCodeTotal.WithLabelValues(serviceID, serviceName, datacenter, "401").Add(float64(stats.Status401)) - m.StatusCodeTotal.WithLabelValues(serviceID, serviceName, datacenter, "403").Add(float64(stats.Status403)) - m.StatusCodeTotal.WithLabelValues(serviceID, serviceName, datacenter, "404").Add(float64(stats.Status404)) - m.StatusCodeTotal.WithLabelValues(serviceID, serviceName, datacenter, "406").Add(float64(stats.Status406)) - m.StatusCodeTotal.WithLabelValues(serviceID, serviceName, datacenter, "416").Add(float64(stats.Status416)) - m.StatusCodeTotal.WithLabelValues(serviceID, serviceName, datacenter, "429").Add(float64(stats.Status429)) - m.StatusCodeTotal.WithLabelValues(serviceID, serviceName, datacenter, "500").Add(float64(stats.Status500)) - m.StatusCodeTotal.WithLabelValues(serviceID, serviceName, datacenter, "501").Add(float64(stats.Status501)) - m.StatusCodeTotal.WithLabelValues(serviceID, serviceName, datacenter, "502").Add(float64(stats.Status502)) - m.StatusCodeTotal.WithLabelValues(serviceID, serviceName, datacenter, "503").Add(float64(stats.Status503)) - m.StatusCodeTotal.WithLabelValues(serviceID, serviceName, datacenter, "504").Add(float64(stats.Status504)) - m.StatusCodeTotal.WithLabelValues(serviceID, serviceName, datacenter, "505").Add(float64(stats.Status505)) - m.StatusGroupTotal.WithLabelValues(serviceID, serviceName, datacenter, "1xx").Add(float64(stats.Status1xx)) - m.StatusGroupTotal.WithLabelValues(serviceID, serviceName, datacenter, "2xx").Add(float64(stats.Status2xx)) - m.StatusGroupTotal.WithLabelValues(serviceID, serviceName, datacenter, "3xx").Add(float64(stats.Status3xx)) - m.StatusGroupTotal.WithLabelValues(serviceID, serviceName, datacenter, "4xx").Add(float64(stats.Status4xx)) - m.StatusGroupTotal.WithLabelValues(serviceID, serviceName, datacenter, "5xx").Add(float64(stats.Status5xx)) - m.SynthsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.Synths)) - m.TLSTotal.WithLabelValues(serviceID, serviceName, datacenter, "1.0").Add(float64(stats.TLSv10)) - m.TLSTotal.WithLabelValues(serviceID, serviceName, datacenter, "1.1").Add(float64(stats.TLSv11)) - m.TLSTotal.WithLabelValues(serviceID, serviceName, datacenter, "1.2").Add(float64(stats.TLSv12)) - m.TLSTotal.WithLabelValues(serviceID, serviceName, datacenter, "1.3").Add(float64(stats.TLSv13)) - m.UncacheableTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.Uncacheable)) - m.VclOnComputeHitRequestsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.VclOnComputeHitRequests)) - m.VclOnComputeMissRequestsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.VclOnComputeMissRequests)) - m.VclOnComputePassRequestsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.VclOnComputePassRequests)) - m.VclOnComputeErrorRequestsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.VclOnComputeErrorRequests)) - m.VclOnComputeSynthRequestsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.VclOnComputeSynthRequests)) - m.VclOnComputeEdgeHitRequestsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.VclOnComputeEdgeHitRequests)) - m.VclOnComputeEdgeMissRequestsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.VclOnComputeEdgeMissRequests)) - m.VideoTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.Video)) - m.WAFBlockedTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.WAFBlocked)) - m.WAFLoggedTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.WAFLogged)) - m.WAFPassedTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.WAFPassed)) - m.WebsocketBackendReqBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.WebsocketBackendReqBodyBytes)) - m.WebsocketBackendReqHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.WebsocketBackendReqHeaderBytes)) - m.WebsocketBackendRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.WebsocketBackendRespBodyBytes)) - m.WebsocketBackendRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.WebsocketBackendRespHeaderBytes)) - m.WebsocketConnTimeMsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.WebsocketConnTimeMs)) - m.WebsocketReqBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.WebsocketReqBodyBytes)) - m.WebsocketReqHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.WebsocketReqHeaderBytes)) - m.WebsocketRespBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.WebsocketRespBodyBytes)) - m.WebsocketRespHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.WebsocketRespHeaderBytes)) - processHistogram(stats.MissHistogram, m.MissDurationSeconds.WithLabelValues(serviceID, serviceName, datacenter)) - processObjectSizes(stats.ObjectSize1k, stats.ObjectSize10k, stats.ObjectSize100k, stats.ObjectSize1m, stats.ObjectSize10m, stats.ObjectSize100m, stats.ObjectSize1g, m.ObjectSizeBytes.WithLabelValues(serviceID, serviceName, datacenter)) + dcl := prometheus.Labels{ + "datacenter": datacenter, + } + + labels := mergeLabels(sl, dcl) + + process(labels, stats, m) } } } +func process(labels prometheus.Labels, stats Datacenter, m *Metrics) { + m.AttackBlockedReqBodyBytesTotal.With(labels).Add(float64(stats.AttackBlockedReqBodyBytes)) + m.AttackBlockedReqHeaderBytesTotal.With(labels).Add(float64(stats.AttackBlockedReqHeaderBytes)) + m.AttackLoggedReqBodyBytesTotal.With(labels).Add(float64(stats.AttackLoggedReqBodyBytes)) + m.AttackLoggedReqHeaderBytesTotal.With(labels).Add(float64(stats.AttackLoggedReqHeaderBytes)) + m.AttackPassedReqBodyBytesTotal.With(labels).Add(float64(stats.AttackPassedReqBodyBytes)) + m.AttackPassedReqHeaderBytesTotal.With(labels).Add(float64(stats.AttackPassedReqHeaderBytes)) + m.AttackReqBodyBytesTotal.With(labels).Add(float64(stats.AttackReqBodyBytes)) + m.AttackReqHeaderBytesTotal.With(labels).Add(float64(stats.AttackReqHeaderBytes)) + m.AttackRespSynthBytesTotal.With(labels).Add(float64(stats.AttackRespSynthBytes)) + m.BackendReqBodyBytesTotal.With(labels).Add(float64(stats.BackendReqBodyBytes)) + m.BackendReqHeaderBytesTotal.With(labels).Add(float64(stats.BackendReqHeaderBytes)) + m.BlacklistedTotal.With(labels).Add(float64(stats.Blacklisted)) + m.BodySizeTotal.With(labels).Add(float64(stats.BodySize)) + m.BotChallengeCompleteTokensCheckedTotal.With(labels).Add(float64(stats.BotChallengeCompleteTokensChecked)) + m.BotChallengeCompleteTokensDisabledTotal.With(labels).Add(float64(stats.BotChallengeCompleteTokensDisabled)) + m.BotChallengeCompleteTokensFailedTotal.With(labels).Add(float64(stats.BotChallengeCompleteTokensFailed)) + m.BotChallengeCompleteTokensIssuedTotal.With(labels).Add(float64(stats.BotChallengeCompleteTokensIssued)) + m.BotChallengeCompleteTokensPassedTotal.With(labels).Add(float64(stats.BotChallengeCompleteTokensPassed)) + m.BotChallengeStartsTotal.With(labels).Add(float64(stats.BotChallengeStarts)) + m.BotChallengesFailedTotal.With(labels).Add(float64(stats.BotChallengesFailed)) + m.BotChallengesIssuedTotal.With(labels).Add(float64(stats.BotChallengesIssued)) + m.BotChallengesSucceededTotal.With(labels).Add(float64(stats.BotChallengesSucceeded)) + m.ComputeBackendReqBodyBytesTotal.With(labels).Add(float64(stats.ComputeBackendReqBodyBytesTotal)) + m.ComputeBackendReqErrorsTotal.With(labels).Add(float64(stats.ComputeBackendReqErrorsTotal)) + m.ComputeBackendReqHeaderBytesTotal.With(labels).Add(float64(stats.ComputeBackendReqHeaderBytesTotal)) + m.ComputeBackendReqTotal.With(labels).Add(float64(stats.ComputeBackendReqTotal)) + m.ComputeBackendRespBodyBytesTotal.With(labels).Add(float64(stats.ComputeBackendRespBodyBytesTotal)) + m.ComputeBackendRespHeaderBytesTotal.With(labels).Add(float64(stats.ComputeBackendRespHeaderBytesTotal)) + m.ComputeExecutionTimeTotal.With(labels).Add(float64(stats.ComputeExecutionTimeMilliseconds) / 10000.0) + m.ComputeGlobalsLimitExceededTotal.With(labels).Add(float64(stats.ComputeGlobalsLimitExceededTotal)) + m.ComputeGuestErrorsTotal.With(labels).Add(float64(stats.ComputeGuestErrorsTotal)) + m.ComputeHeapLimitExceededTotal.With(labels).Add(float64(stats.ComputeHeapLimitExceededTotal)) + m.ComputeRAMUsedBytesTotal.With(labels).Add(float64(stats.ComputeRAMUsed)) + m.ComputeReqBodyBytesTotal.With(labels).Add(float64(stats.ComputeReqBodyBytesTotal)) + m.ComputeReqHeaderBytesTotal.With(labels).Add(float64(stats.ComputeReqHeaderBytesTotal)) + m.ComputeRequestTimeBilledTotal.With(labels).Add(float64(stats.ComputeRequestTimeBilledMilliseconds) / 10000.0) + m.ComputeRequestTimeTotal.With(labels).Add(float64(stats.ComputeRequestTimeMilliseconds) / 10000.0) + m.ComputeRequestsTotal.With(labels).Add(float64(stats.ComputeRequests)) + m.ComputeResourceLimitExceedTotal.With(labels).Add(float64(stats.ComputeResourceLimitExceedTotal)) + m.ComputeRespBodyBytesTotal.With(labels).Add(float64(stats.ComputeRespBodyBytesTotal)) + m.ComputeRespHeaderBytesTotal.With(labels).Add(float64(stats.ComputeRespHeaderBytesTotal)) + m.ComputeRespStatusTotal.With(mergeLabels(labels, prometheus.Labels{"status_group": "1xx"})).Add(float64(stats.ComputeRespStatus1xx)) + m.ComputeRespStatusTotal.With(mergeLabels(labels, prometheus.Labels{"status_group": "2xx"})).Add(float64(stats.ComputeRespStatus2xx)) + m.ComputeRespStatusTotal.With(mergeLabels(labels, prometheus.Labels{"status_group": "3xx"})).Add(float64(stats.ComputeRespStatus3xx)) + m.ComputeRespStatusTotal.With(mergeLabels(labels, prometheus.Labels{"status_group": "4xx"})).Add(float64(stats.ComputeRespStatus4xx)) + m.ComputeRespStatusTotal.With(mergeLabels(labels, prometheus.Labels{"status_group": "5xx"})).Add(float64(stats.ComputeRespStatus5xx)) + m.ComputeRuntimeErrorsTotal.With(labels).Add(float64(stats.ComputeRuntimeErrorsTotal)) + m.ComputeStackLimitExceededTotal.With(labels).Add(float64(stats.ComputeStackLimitExceededTotal)) + m.DDOSActionBlackholeTotal.With(labels).Add(float64(stats.DDOSActionBlackhole)) + m.DDOSActionCloseTotal.With(labels).Add(float64(stats.DDOSActionClose)) + m.DDOSActionDowngradeTotal.With(labels).Add(float64(stats.DDOSActionDowngrade)) + m.DDOSActionDowngradedConnectionsTotal.With(labels).Add(float64(stats.DDOSActionDowngradedConnections)) + m.DDOSActionLimitStreamsConnectionsTotal.With(labels).Add(float64(stats.DDOSActionLimitStreamsConnections)) + m.DDOSActionLimitStreamsRequestsTotal.With(labels).Add(float64(stats.DDOSActionLimitStreamsRequests)) + m.DDOSActionTarpitAcceptTotal.With(labels).Add(float64(stats.DDOSActionTarpitAccept)) + m.DDOSActionTarpitTotal.With(labels).Add(float64(stats.DDOSActionTarpit)) + m.DeliverSubCountTotal.With(labels).Add(float64(stats.DeliverSubCount)) + m.DeliverSubTimeTotal.With(labels).Add(float64(stats.DeliverSubTime)) + m.EdgeHitRequestsTotal.With(labels).Add(float64(stats.EdgeHitRequests)) + m.EdgeHitRespBodyBytesTotal.With(labels).Add(float64(stats.EdgeHitRespBodyBytes)) + m.EdgeHitRespHeaderBytesTotal.With(labels).Add(float64(stats.EdgeHitRespHeaderBytes)) + m.EdgeMissRequestsTotal.With(labels).Add(float64(stats.EdgeMissRequests)) + m.EdgeMissRespBodyBytesTotal.With(labels).Add(float64(stats.EdgeMissRespBodyBytes)) + m.EdgeMissRespHeaderBytesTotal.With(labels).Add(float64(stats.EdgeMissRespHeaderBytes)) + m.EdgeRespBodyBytesTotal.With(labels).Add(float64(stats.EdgeRespBodyBytes)) + m.EdgeRespHeaderBytesTotal.With(labels).Add(float64(stats.EdgeRespHeaderBytes)) + m.EdgeTotal.With(labels).Add(float64(stats.Edge)) + m.ErrorSubCountTotal.With(labels).Add(float64(stats.ErrorSubCount)) + m.ErrorSubTimeTotal.With(labels).Add(float64(stats.ErrorSubTime)) + m.ErrorsTotal.With(labels).Add(float64(stats.Errors)) + m.FanoutBackendReqBodyBytesTotal.With(labels).Add(float64(stats.FanoutBackendReqBodyBytes)) + m.FanoutBackendReqHeaderBytesTotal.With(labels).Add(float64(stats.FanoutBackendReqHeaderBytes)) + m.FanoutBackendRespBodyBytesTotal.With(labels).Add(float64(stats.FanoutBackendRespBodyBytes)) + m.FanoutBackendRespHeaderBytesTotal.With(labels).Add(float64(stats.FanoutBackendRespHeaderBytes)) + m.FanoutConnTimeMsTotal.With(labels).Add(float64(stats.FanoutConnTimeMs)) + m.FanoutRecvPublishesTotal.With(labels).Add(float64(stats.FanoutRecvPublishes)) + m.FanoutReqBodyBytesTotal.With(labels).Add(float64(stats.FanoutReqBodyBytes)) + m.FanoutReqHeaderBytesTotal.With(labels).Add(float64(stats.FanoutReqHeaderBytes)) + m.FanoutRespBodyBytesTotal.With(labels).Add(float64(stats.FanoutRespBodyBytes)) + m.FanoutRespHeaderBytesTotal.With(labels).Add(float64(stats.FanoutRespHeaderBytes)) + m.FanoutSendPublishesTotal.With(labels).Add(float64(stats.FanoutSendPublishes)) + m.FetchSubCountTotal.With(labels).Add(float64(stats.FetchSubCount)) + m.FetchSubTimeTotal.With(labels).Add(float64(stats.FetchSubTime)) + m.HTTPTotal.With(mergeLabels(labels, prometheus.Labels{"http_version": "1"})).Add(float64(stats.Requests - (stats.HTTP2 + stats.HTTP3))) + m.HTTPTotal.With(mergeLabels(labels, prometheus.Labels{"http_version": "2"})).Add(float64(stats.HTTP2)) + m.HTTPTotal.With(mergeLabels(labels, prometheus.Labels{"http_version": "3"})).Add(float64(stats.HTTP3)) + m.HTTP2Total.With(labels).Add(float64(stats.HTTP2)) + m.HTTP3Total.With(labels).Add(float64(stats.HTTP3)) + m.HashSubCountTotal.With(labels).Add(float64(stats.HashSubCount)) + m.HashSubTimeTotal.With(labels).Add(float64(stats.HashSubTime)) + m.HeaderSizeTotal.With(labels).Add(float64(stats.HeaderSize)) + m.HitRespBodyBytesTotal.With(labels).Add(float64(stats.HitRespBodyBytes)) + m.HitSubCountTotal.With(labels).Add(float64(stats.HitSubCount)) + m.HitSubTimeTotal.With(labels).Add(float64(stats.HitSubTime)) + m.HitsTimeTotal.With(labels).Add(float64(stats.HitsTime)) + m.HitsTotal.With(labels).Add(float64(stats.Hits)) + m.IPv6Total.With(labels).Add(float64(stats.IPv6)) + m.ImgOptoRespBodyBytesTotal.With(labels).Add(float64(stats.ImgOptoRespBodyBytes)) + m.ImgOptoRespHeaderBytesTotal.With(labels).Add(float64(stats.ImgOptoRespHeaderBytes)) + m.ImgOptoShieldRespBodyBytesTotal.With(labels).Add(float64(stats.ImgOptoShieldRespBodyBytes)) + m.ImgOptoShieldRespHeaderBytesTotal.With(labels).Add(float64(stats.ImgOptoShieldRespHeaderBytes)) + m.ImgOptoShieldTotal.With(labels).Add(float64(stats.ImgOptoShield)) + m.ImgOptoTotal.With(labels).Add(float64(stats.ImgOpto)) + m.ImgOptoTransformRespBodyBytesTotal.With(labels).Add(float64(stats.ImgOptoTransformRespBodyBytes)) + m.ImgOptoTransformRespHeaderBytesTotal.With(labels).Add(float64(stats.ImgOptoTransformRespHeaderBytes)) + m.ImgOptoTransformTotal.With(labels).Add(float64(stats.ImgOptoTransform)) + m.ImgVideoFramesTotal.With(labels).Add(float64(stats.ImgVideoFrames)) + m.ImgVideoRespBodyBytesTotal.With(labels).Add(float64(stats.ImgVideoRespBodyBytes)) + m.ImgVideoRespHeaderBytesTotal.With(labels).Add(float64(stats.ImgVideoRespHeaderBytes)) + m.ImgVideoShieldFramesTotal.With(labels).Add(float64(stats.ImgVideoShieldFrames)) + m.ImgVideoShieldRespBodyBytesTotal.With(labels).Add(float64(stats.ImgVideoShieldRespBodyBytes)) + m.ImgVideoShieldRespHeaderBytesTotal.With(labels).Add(float64(stats.ImgVideoShieldRespHeaderBytes)) + m.ImgVideoShieldTotal.With(labels).Add(float64(stats.ImgVideoShield)) + m.ImgVideoTotal.With(labels).Add(float64(stats.ImgVideo)) + m.KVStoreClassAOperationsTotal.With(labels).Add(float64(stats.KVStoreClassAOperations)) + m.KVStoreClassBOperationsTotal.With(labels).Add(float64(stats.KVStoreClassBOperations)) + m.LogBytesTotal.With(labels).Add(float64(stats.LogBytes)) + m.LoggingTotal.With(labels).Add(float64(stats.Logging)) + m.MissRespBodyBytesTotal.With(labels).Add(float64(stats.MissRespBodyBytes)) + m.MissSubCountTotal.With(labels).Add(float64(stats.MissSubCount)) + m.MissSubTimeTotal.With(labels).Add(float64(stats.MissSubTime)) + m.MissTimeTotal.With(labels).Add(float64(stats.MissTime)) + m.MissesTotal.With(labels).Add(float64(stats.Misses)) + m.OTFPDeliverTimeTotal.With(labels).Add(float64(stats.OTFPDeliverTime)) + m.OTFPManifestTotal.With(labels).Add(float64(stats.OTFPManifest)) + m.OTFPRespBodyBytesTotal.With(labels).Add(float64(stats.OTFPRespBodyBytes)) + m.OTFPRespHeaderBytesTotal.With(labels).Add(float64(stats.OTFPRespHeaderBytes)) + m.OTFPShieldRespBodyBytesTotal.With(labels).Add(float64(stats.OTFPShieldRespBodyBytes)) + m.OTFPShieldRespHeaderBytesTotal.With(labels).Add(float64(stats.OTFPShieldRespHeaderBytes)) + m.OTFPShieldTimeTotal.With(labels).Add(float64(stats.OTFPShieldTime)) + m.OTFPShieldTotal.With(labels).Add(float64(stats.OTFPShield)) + m.OTFPTotal.With(labels).Add(float64(stats.OTFP)) + m.OTFPTransformRespBodyBytesTotal.With(labels).Add(float64(stats.OTFPTransformRespBodyBytes)) + m.OTFPTransformRespHeaderBytesTotal.With(labels).Add(float64(stats.OTFPTransformRespHeaderBytes)) + m.OTFPTransformTimeTotal.With(labels).Add(float64(stats.OTFPTransformTime)) + m.OTFPTransformTotal.With(labels).Add(float64(stats.OTFPTransform)) + m.OriginCacheFetchRespBodyBytesTotal.With(labels).Add(float64(stats.OriginCacheFetchRespBodyBytes)) + m.OriginCacheFetchRespHeaderBytesTotal.With(labels).Add(float64(stats.OriginCacheFetchRespHeaderBytes)) + m.OriginCacheFetchesTotal.With(labels).Add(float64(stats.OriginCacheFetches)) + m.OriginFetchBodyBytesTotal.With(labels).Add(float64(stats.OriginFetchBodyBytes)) + m.OriginFetchHeaderBytesTotal.With(labels).Add(float64(stats.OriginFetchHeaderBytes)) + m.OriginFetchRespBodyBytesTotal.With(labels).Add(float64(stats.OriginFetchRespBodyBytes)) + m.OriginFetchRespHeaderBytesTotal.With(labels).Add(float64(stats.OriginFetchRespHeaderBytes)) + m.OriginFetchesTotal.With(labels).Add(float64(stats.OriginFetches)) + m.OriginRevalidationsTotal.With(labels).Add(float64(stats.OriginRevalidations)) + m.PCITotal.With(labels).Add(float64(stats.PCI)) + m.PassRespBodyBytesTotal.With(labels).Add(float64(stats.PassRespBodyBytes)) + m.PassSubCountTotal.With(labels).Add(float64(stats.PassSubCount)) + m.PassSubTimeTotal.With(labels).Add(float64(stats.PassSubTime)) + m.PassTimeTotal.With(labels).Add(float64(stats.PassTime)) + m.PassesTotal.With(labels).Add(float64(stats.Passes)) + m.Pipe.With(labels).Add(float64(stats.Pipe)) + m.PipeSubCountTotal.With(labels).Add(float64(stats.PipeSubCount)) + m.PipeSubTimeTotal.With(labels).Add(float64(stats.PipeSubTime)) + m.PredeliverSubCountTotal.With(labels).Add(float64(stats.PredeliverSubCount)) + m.PredeliverSubTimeTotal.With(labels).Add(float64(stats.PredeliverSubTime)) + m.PrehashSubCountTotal.With(labels).Add(float64(stats.PrehashSubCount)) + m.PrehashSubTimeTotal.With(labels).Add(float64(stats.PrehashSubTime)) + m.RecvSubCountTotal.With(labels).Add(float64(stats.RecvSubCount)) + m.RecvSubTimeTotal.With(labels).Add(float64(stats.RecvSubTime)) + m.ReqBodyBytesTotal.With(labels).Add(float64(stats.ReqBodyBytes)) + m.ReqHeaderBytesTotal.With(labels).Add(float64(stats.ReqHeaderBytes)) + m.RequestsTotal.With(labels).Add(float64(stats.Requests)) + m.RespBodyBytesTotal.With(labels).Add(float64(stats.RespBodyBytes)) + m.RespHeaderBytesTotal.With(labels).Add(float64(stats.RespHeaderBytes)) + m.RestartTotal.With(labels).Add(float64(stats.Restart)) + m.SegBlockOriginFetchesTotal.With(labels).Add(float64(stats.SegBlockOriginFetches)) + m.SegBlockShieldFetchesTotal.With(labels).Add(float64(stats.SegBlockShieldFetches)) + m.ShieldCacheFetchesTotal.With(labels).Add(float64(stats.ShieldCacheFetches)) + m.ShieldFetchBodyBytesTotal.With(labels).Add(float64(stats.ShieldFetchBodyBytes)) + m.ShieldFetchHeaderBytesTotal.With(labels).Add(float64(stats.ShieldFetchHeaderBytes)) + m.ShieldFetchRespBodyBytesTotal.With(labels).Add(float64(stats.ShieldFetchRespBodyBytes)) + m.ShieldFetchRespHeaderBytesTotal.With(labels).Add(float64(stats.ShieldFetchRespHeaderBytes)) + m.ShieldFetchesTotal.With(labels).Add(float64(stats.ShieldFetches)) + m.ShieldHitRequestsTotal.With(labels).Add(float64(stats.ShieldHitRequests)) + m.ShieldHitRespBodyBytesTotal.With(labels).Add(float64(stats.ShieldHitRespBodyBytes)) + m.ShieldHitRespHeaderBytesTotal.With(labels).Add(float64(stats.ShieldHitRespHeaderBytes)) + m.ShieldMissRequestsTotal.With(labels).Add(float64(stats.ShieldMissRequests)) + m.ShieldMissRespBodyBytesTotal.With(labels).Add(float64(stats.ShieldMissRespBodyBytes)) + m.ShieldMissRespHeaderBytesTotal.With(labels).Add(float64(stats.ShieldMissRespHeaderBytes)) + m.ShieldRespBodyBytesTotal.With(labels).Add(float64(stats.ShieldRespBodyBytes)) + m.ShieldRespHeaderBytesTotal.With(labels).Add(float64(stats.ShieldRespHeaderBytes)) + m.ShieldRevalidationsTotal.With(labels).Add(float64(stats.ShieldRevalidations)) + m.ShieldTotal.With(labels).Add(float64(stats.Shield)) + m.StatusCodeTotal.With(mergeLabels(labels, prometheus.Labels{"status_code": "200"})).Add(float64(stats.Status200)) + m.StatusCodeTotal.With(mergeLabels(labels, prometheus.Labels{"status_code": "204"})).Add(float64(stats.Status204)) + m.StatusCodeTotal.With(mergeLabels(labels, prometheus.Labels{"status_code": "206"})).Add(float64(stats.Status206)) + m.StatusCodeTotal.With(mergeLabels(labels, prometheus.Labels{"status_code": "301"})).Add(float64(stats.Status301)) + m.StatusCodeTotal.With(mergeLabels(labels, prometheus.Labels{"status_code": "302"})).Add(float64(stats.Status302)) + m.StatusCodeTotal.With(mergeLabels(labels, prometheus.Labels{"status_code": "304"})).Add(float64(stats.Status304)) + m.StatusCodeTotal.With(mergeLabels(labels, prometheus.Labels{"status_code": "400"})).Add(float64(stats.Status400)) + m.StatusCodeTotal.With(mergeLabels(labels, prometheus.Labels{"status_code": "401"})).Add(float64(stats.Status401)) + m.StatusCodeTotal.With(mergeLabels(labels, prometheus.Labels{"status_code": "403"})).Add(float64(stats.Status403)) + m.StatusCodeTotal.With(mergeLabels(labels, prometheus.Labels{"status_code": "404"})).Add(float64(stats.Status404)) + m.StatusCodeTotal.With(mergeLabels(labels, prometheus.Labels{"status_code": "406"})).Add(float64(stats.Status406)) + m.StatusCodeTotal.With(mergeLabels(labels, prometheus.Labels{"status_code": "416"})).Add(float64(stats.Status416)) + m.StatusCodeTotal.With(mergeLabels(labels, prometheus.Labels{"status_code": "429"})).Add(float64(stats.Status429)) + m.StatusCodeTotal.With(mergeLabels(labels, prometheus.Labels{"status_code": "500"})).Add(float64(stats.Status500)) + m.StatusCodeTotal.With(mergeLabels(labels, prometheus.Labels{"status_code": "501"})).Add(float64(stats.Status501)) + m.StatusCodeTotal.With(mergeLabels(labels, prometheus.Labels{"status_code": "502"})).Add(float64(stats.Status502)) + m.StatusCodeTotal.With(mergeLabels(labels, prometheus.Labels{"status_code": "503"})).Add(float64(stats.Status503)) + m.StatusCodeTotal.With(mergeLabels(labels, prometheus.Labels{"status_code": "504"})).Add(float64(stats.Status504)) + m.StatusCodeTotal.With(mergeLabels(labels, prometheus.Labels{"status_code": "505"})).Add(float64(stats.Status505)) + m.StatusGroupTotal.With(mergeLabels(labels, prometheus.Labels{"status_group": "1xx"})).Add(float64(stats.Status1xx)) + m.StatusGroupTotal.With(mergeLabels(labels, prometheus.Labels{"status_group": "2xx"})).Add(float64(stats.Status2xx)) + m.StatusGroupTotal.With(mergeLabels(labels, prometheus.Labels{"status_group": "3xx"})).Add(float64(stats.Status3xx)) + m.StatusGroupTotal.With(mergeLabels(labels, prometheus.Labels{"status_group": "4xx"})).Add(float64(stats.Status4xx)) + m.StatusGroupTotal.With(mergeLabels(labels, prometheus.Labels{"status_group": "5xx"})).Add(float64(stats.Status5xx)) + m.SynthsTotal.With(labels).Add(float64(stats.Synths)) + m.TLSTotal.With(mergeLabels(labels, prometheus.Labels{"tls_version": "1.0"})).Add(float64(stats.TLSv10)) + m.TLSTotal.With(mergeLabels(labels, prometheus.Labels{"tls_version": "1.1"})).Add(float64(stats.TLSv11)) + m.TLSTotal.With(mergeLabels(labels, prometheus.Labels{"tls_version": "1.2"})).Add(float64(stats.TLSv12)) + m.TLSTotal.With(mergeLabels(labels, prometheus.Labels{"tls_version": "1.3"})).Add(float64(stats.TLSv13)) + m.UncacheableTotal.With(labels).Add(float64(stats.Uncacheable)) + m.VclOnComputeHitRequestsTotal.With(labels).Add(float64(stats.VclOnComputeHitRequests)) + m.VclOnComputeMissRequestsTotal.With(labels).Add(float64(stats.VclOnComputeMissRequests)) + m.VclOnComputePassRequestsTotal.With(labels).Add(float64(stats.VclOnComputePassRequests)) + m.VclOnComputeErrorRequestsTotal.With(labels).Add(float64(stats.VclOnComputeErrorRequests)) + m.VclOnComputeSynthRequestsTotal.With(labels).Add(float64(stats.VclOnComputeSynthRequests)) + m.VclOnComputeEdgeHitRequestsTotal.With(labels).Add(float64(stats.VclOnComputeEdgeHitRequests)) + m.VclOnComputeEdgeMissRequestsTotal.With(labels).Add(float64(stats.VclOnComputeEdgeMissRequests)) + m.VideoTotal.With(labels).Add(float64(stats.Video)) + m.WAFBlockedTotal.With(labels).Add(float64(stats.WAFBlocked)) + m.WAFLoggedTotal.With(labels).Add(float64(stats.WAFLogged)) + m.WAFPassedTotal.With(labels).Add(float64(stats.WAFPassed)) + m.WebsocketBackendReqBodyBytesTotal.With(labels).Add(float64(stats.WebsocketBackendReqBodyBytes)) + m.WebsocketBackendReqHeaderBytesTotal.With(labels).Add(float64(stats.WebsocketBackendReqHeaderBytes)) + m.WebsocketBackendRespBodyBytesTotal.With(labels).Add(float64(stats.WebsocketBackendRespBodyBytes)) + m.WebsocketBackendRespHeaderBytesTotal.With(labels).Add(float64(stats.WebsocketBackendRespHeaderBytes)) + m.WebsocketConnTimeMsTotal.With(labels).Add(float64(stats.WebsocketConnTimeMs)) + m.WebsocketReqBodyBytesTotal.With(labels).Add(float64(stats.WebsocketReqBodyBytes)) + m.WebsocketReqHeaderBytesTotal.With(labels).Add(float64(stats.WebsocketReqHeaderBytes)) + m.WebsocketRespBodyBytesTotal.With(labels).Add(float64(stats.WebsocketRespBodyBytes)) + m.WebsocketRespHeaderBytesTotal.With(labels).Add(float64(stats.WebsocketRespHeaderBytes)) + processHistogram(stats.MissHistogram, m.MissDurationSeconds.With(labels)) + processObjectSizes(stats.ObjectSize1k, stats.ObjectSize10k, stats.ObjectSize100k, stats.ObjectSize1m, stats.ObjectSize10m, stats.ObjectSize100m, stats.ObjectSize1g, m.ObjectSizeBytes.With(labels)) +} + func processHistogram(src map[string]uint64, obs prometheus.Observer) { for str, count := range src { ms, err := strconv.Atoi(str) @@ -278,3 +293,15 @@ func processObjectSizes(n1k, n10k, n100k, n1m, n10m, n100m, n1g uint64, obs prom } } } + +func mergeLabels(ls ...prometheus.Labels) prometheus.Labels { + labels := make(map[string]string) + + for _, l := range ls { + for k, v := range l { + labels[k] = v + } + } + + return labels +}