Skip to content

Commit

Permalink
metrics: rename backend_response to threescale_backend_response
Browse files Browse the repository at this point in the history
So it's not confused with the upstream API
  • Loading branch information
davidor committed Oct 1, 2018
1 parent 48f7ead commit 0941654
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion gateway/src/apicast/metrics/3scale_backend_status.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local _M = {}

local backend_response_metric = prometheus(
'counter',
'backend_response',
'threescale_backend_response',
"Response status codes from 3scale's backend",
{ 'status' }
)
Expand Down
14 changes: 7 additions & 7 deletions t/prometheus-metrics.t
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ that does not include the nginx metrics (tested in the previous test).
--- response_body eval
[ "yay, api backend\x{0a}", "yay, api backend\x{0a}", "Authentication failed", "Authentication failed",
<<'METRICS_OUTPUT'
# HELP backend_response Response status codes from 3scale's backend
# TYPE backend_response counter
backend_response{status="2xx"} 2
backend_response{status="4xx"} 2
# HELP nginx_metric_errors_total Number of nginx-lua-prometheus errors
# TYPE nginx_metric_errors_total counter
nginx_metric_errors_total 0
# HELP threescale_backend_response Response status codes from 3scale's backend
# TYPE threescale_backend_response counter
threescale_backend_response{status="2xx"} 2
threescale_backend_response{status="4xx"} 2
METRICS_OUTPUT
]
--- no_error_log
Expand Down Expand Up @@ -174,9 +174,6 @@ We use and env file without the nginx metrics to simplify the output of the
--- response_body eval
[ "yay, api backend\x{0a}", "yay, api backend\x{0a}", "yay, api backend\x{0a}",
<<'METRICS_OUTPUT'
# HELP backend_response Response status codes from 3scale's backend
# TYPE backend_response counter
backend_response{status="2xx"} 1
# HELP batching_policy_auths_cache_hits Hits in the auths cache of the 3scale batching policy
# TYPE batching_policy_auths_cache_hits counter
batching_policy_auths_cache_hits 2
Expand All @@ -186,6 +183,9 @@ batching_policy_auths_cache_misses 1
# HELP nginx_metric_errors_total Number of nginx-lua-prometheus errors
# TYPE nginx_metric_errors_total counter
nginx_metric_errors_total 0
# HELP threescale_backend_response Response status codes from 3scale's backend
# TYPE threescale_backend_response counter
threescale_backend_response{status="2xx"} 1
METRICS_OUTPUT
]
--- no_error_log
Expand Down

0 comments on commit 0941654

Please sign in to comment.