Skip to content

Commit

Permalink
Merge pull request #917 from 3scale/rename-backend-response-metric
Browse files Browse the repository at this point in the history
metrics: rename backend_response to threescale_backend_response
  • Loading branch information
davidor authored Oct 2, 2018
2 parents ab4ce9d + f4c754b commit 849a489
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Support for path in the upstream URL [PR #905](https://github.com/3scale/apicast/pull/905)
- OIDC Authentication policy (only useable directly by the configuration file) [PR #904](https://github.com/3scale/apicast/pull/904)

### Changed

- Renamed the `backend_response` Prometheus metric to `threescale_backend_response` to avoid confusion with the upstream response [PR #917](https://github.com/3scale/apicast/pull/917)

## [3.3.0-cr2] - 2018-09-25

### Fixed
Expand Down
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 849a489

Please sign in to comment.