Skip to content

Commit

Permalink
remove Billed* metrics (#135)
Browse files Browse the repository at this point in the history
These metrics are not accurate for billing and should not be used
  • Loading branch information
leklund authored Jun 26, 2023
1 parent 3820552 commit 865bbc0
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 104 deletions.
6 changes: 0 additions & 6 deletions pkg/realtime/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ type Metrics struct {
AttackRespSynthBytesTotal *prometheus.CounterVec
BackendReqBodyBytesTotal *prometheus.CounterVec
BackendReqHeaderBytesTotal *prometheus.CounterVec
BilledBodyBytesTotal *prometheus.CounterVec
BilledHeaderBytesTotal *prometheus.CounterVec
BilledTotal *prometheus.CounterVec
BlacklistedTotal *prometheus.CounterVec
BodySizeTotal *prometheus.CounterVec
ComputeBackendReqBodyBytesTotal *prometheus.CounterVec
Expand Down Expand Up @@ -220,9 +217,6 @@ func NewMetrics(namespace, subsystem string, nameFilter filter.Filter, r prometh
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"}),
BilledBodyBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "billed_body_bytes_total", Help: "TODO"}, []string{"service_id", "service_name", "datacenter"}),
BilledHeaderBytesTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "billed_header_bytes_total", Help: "TODO"}, []string{"service_id", "service_name", "datacenter"}),
BilledTotal: prometheus.NewCounterVec(prometheus.CounterOpts{Namespace: namespace, Subsystem: subsystem, Name: "billed_total", Help: "TODO"}, []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"}),
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"}),
Expand Down
3 changes: 0 additions & 3 deletions pkg/realtime/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ func Process(response *Response, serviceID, serviceName, serviceVersion string,
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.BilledBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BilledBodyBytes))
m.BilledHeaderBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BilledHeaderBytes))
m.BilledTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.Billed))
m.BlacklistedTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.Blacklisted))
m.BodySizeTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.BodySize))
m.ComputeBackendReqBodyBytesTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.ComputeBackendReqBodyBytesTotal))
Expand Down
3 changes: 0 additions & 3 deletions pkg/realtime/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ type Datacenter struct {
AttackRespSynthBytes uint64 `json:"attack_resp_synth_bytes"`
BackendReqBodyBytes uint64 `json:"bereq_body_bytes"`
BackendReqHeaderBytes uint64 `json:"bereq_header_bytes"`
Billed uint64 `json:"billed"`
BilledBodyBytes uint64 `json:"billed_body_bytes"`
BilledHeaderBytes uint64 `json:"billed_header_bytes"`
Blacklisted uint64 `json:"blacklist"`
BodySize uint64 `json:"body_size"`
ComputeBackendReqBodyBytesTotal uint64 `json:"compute_bereq_body_bytes"`
Expand Down
Loading

0 comments on commit 865bbc0

Please sign in to comment.