Skip to content

Commit b7796f5

Browse files
committed
fix acronym Api to API
1 parent 37f70cb commit b7796f5

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

pkg/realtime/metrics.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ type Metrics struct {
3333
BotChallengesIssuedTotal *prometheus.CounterVec
3434
BotChallengesSucceededTotal *prometheus.CounterVec
3535
BotChallengeStartsTotal *prometheus.CounterVec
36-
BotChallengesVerificationApiDuplicateCount *prometheus.CounterVec
37-
BotChallengesVerificationApiExpiredCount *prometheus.CounterVec
38-
BotChallengesVerificationApiFailureCount *prometheus.CounterVec
39-
BotChallengesVerificationApiSuccessCount *prometheus.CounterVec
36+
BotChallengesVerificationAPIDuplicateCount *prometheus.CounterVec
37+
BotChallengesVerificationAPIExpiredCount *prometheus.CounterVec
38+
BotChallengesVerificationAPIFailureCount *prometheus.CounterVec
39+
BotChallengesVerificationAPISuccessCount *prometheus.CounterVec
4040
ComputeBackendReqBodyBytesTotal *prometheus.CounterVec
4141
ComputeBackendReqErrorsTotal *prometheus.CounterVec
4242
ComputeBackendReqHeaderBytesTotal *prometheus.CounterVec
@@ -248,10 +248,10 @@ func NewMetrics(namespace, subsystem string, nameFilter filter.Filter, r prometh
248248
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"}),
249249
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"}),
250250
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"}),
251-
BotChallengesVerificationApiDuplicateCount: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenges_verification_api_duplicate_count", Help: ""}, []string{"service_id", "service_name", "datacenter"}),
252-
BotChallengesVerificationApiExpiredCount: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenges_verification_api_expired_count", Help: ""}, []string{"service_id", "service_name", "datacenter"}),
253-
BotChallengesVerificationApiFailureCount: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenges_verification_api_failure_count", Help: ""}, []string{"service_id", "service_name", "datacenter"}),
254-
BotChallengesVerificationApiSuccessCount: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenges_verification_api_success_count", Help: ""}, []string{"service_id", "service_name", "datacenter"}),
251+
BotChallengesVerificationAPIDuplicateCount: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenges_verification_api_duplicate_count", Help: ""}, []string{"service_id", "service_name", "datacenter"}),
252+
BotChallengesVerificationAPIExpiredCount: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenges_verification_api_expired_count", Help: ""}, []string{"service_id", "service_name", "datacenter"}),
253+
BotChallengesVerificationAPIFailureCount: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenges_verification_api_failure_count", Help: ""}, []string{"service_id", "service_name", "datacenter"}),
254+
BotChallengesVerificationAPISuccessCount: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "bot_challenges_verification_api_success_count", Help: ""}, []string{"service_id", "service_name", "datacenter"}),
255255
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"}),
256256
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"}),
257257
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"}),

pkg/realtime/process.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ func process(serviceID, serviceName, datacenter string, stats Datacenter, m *Met
4646
m.BotChallengesIssuedTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengesIssued))
4747
m.BotChallengesSucceededTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengesSucceeded))
4848
m.BotChallengeStartsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengeStarts))
49-
m.BotChallengesVerificationApiDuplicateCount.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengesVerificationApiDuplicateCount))
50-
m.BotChallengesVerificationApiExpiredCount.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengesVerificationApiExpiredCount))
51-
m.BotChallengesVerificationApiFailureCount.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengesVerificationApiFailureCount))
52-
m.BotChallengesVerificationApiSuccessCount.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengesVerificationApiSuccessCount))
49+
m.BotChallengesVerificationAPIDuplicateCount.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengesVerificationAPIDuplicateCount))
50+
m.BotChallengesVerificationAPIExpiredCount.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengesVerificationAPIExpiredCount))
51+
m.BotChallengesVerificationAPIFailureCount.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengesVerificationAPIFailureCount))
52+
m.BotChallengesVerificationAPISuccessCount.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BotChallengesVerificationAPISuccessCount))
5353
m.ComputeBackendReqBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeBackendReqBodyBytesTotal))
5454
m.ComputeBackendReqErrorsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeBackendReqErrorsTotal))
5555
m.ComputeBackendReqHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeBackendReqHeaderBytesTotal))

pkg/realtime/response.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ type Datacenter struct {
3838
BotChallengesIssued uint64 `json:"bot_challenges_issued"`
3939
BotChallengesSucceeded uint64 `json:"bot_challenges_succeeded"`
4040
BotChallengeStarts uint64 `json:"bot_challenge_starts"`
41-
BotChallengesVerificationApiDuplicateCount uint64 `json:"bot_challenges_verification_api_duplicate_count"`
42-
BotChallengesVerificationApiExpiredCount uint64 `json:"bot_challenges_verification_api_expired_count"`
43-
BotChallengesVerificationApiFailureCount uint64 `json:"bot_challenges_verification_api_failure_count"`
44-
BotChallengesVerificationApiSuccessCount uint64 `json:"bot_challenges_verification_api_success_count"`
41+
BotChallengesVerificationAPIDuplicateCount uint64 `json:"bot_challenges_verification_api_duplicate_count"`
42+
BotChallengesVerificationAPIExpiredCount uint64 `json:"bot_challenges_verification_api_expired_count"`
43+
BotChallengesVerificationAPIFailureCount uint64 `json:"bot_challenges_verification_api_failure_count"`
44+
BotChallengesVerificationAPISuccessCount uint64 `json:"bot_challenges_verification_api_success_count"`
4545
ComputeBackendReqBodyBytesTotal uint64 `json:"compute_bereq_body_bytes"`
4646
ComputeBackendReqErrorsTotal uint64 `json:"compute_bereq_errors"`
4747
ComputeBackendReqHeaderBytesTotal uint64 `json:"compute_bereq_header_bytes"`

0 commit comments

Comments
 (0)