Summary:
Allow custom metrics to be flexibly reported to 3scale as a post action in the policy chain.
Use case:
Given an endpoint “cats” with a method (in 3scale) “cats”, and metrics “cats_200”, “cats_4XX” increment usage as follows (in addition to the existing increments on the “cats” methods and Hits:
200 upstream response (exact match): cats_200 (defined by concatenating method_name and “_” and status.code) value 1
404 upstream response (defined as regex or wildcard 4**): cats_4XX (defined by concatenating method_name and string “_4XX” value 0 (allowing value to explicity set)
Given an endpoint “invoice” with a 3scale method “invoice”, and metric “invoice_records”, and the upstream returns a header with the response “invoice_records: XX” increment usage:
“invoice_ records” (defined as header name/key) value XX (defined as value of the header)
- relates to
-
THREESCALE-1726 If the backend API returns an error, the request should not be counted for billing
- Closed