-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[THREESCALE-2150][Metrics] Add services on metrics.
This commits adds support to have additional information on some metrics[0], this commit enables users to know the service in the metric. Due to this can be a problematic for Prometheus[1], to enable this, a new ENV variable(`APICAST_EXTENDED_METRICS`) is defined. Users that have a few services can run the extended metrics without affecting Prometheus stability, if the APICast instance has thousands of services the recommendation is to have this option disabled. In case of the extended_metrics is disabled, all the service labels will use "all" value and Prometheus performance will not be affected. The new metrics list looks like this: ``` bash-4.2$ curl http://localhost:9421/metrics -s | grep service total_response_time_seconds_bucket{service="all",le="00.100"} 91 total_response_time_seconds_bucket{service="all",le="00.200"} 189 total_response_time_seconds_bucket{service="all",le="00.300"} 220 total_response_time_seconds_bucket{service="all",le="00.400"} 220 total_response_time_seconds_bucket{service="all",le="00.500"} 222 total_response_time_seconds_bucket{service="all",le="00.750"} 223 total_response_time_seconds_bucket{service="all",le="01.000"} 223 total_response_time_seconds_bucket{service="all",le="01.500"} 224 total_response_time_seconds_bucket{service="all",le="02.000"} 224 total_response_time_seconds_bucket{service="all",le="03.000"} 224 total_response_time_seconds_bucket{service="all",le="04.000"} 224 total_response_time_seconds_bucket{service="all",le="05.000"} 224 total_response_time_seconds_bucket{service="all",le="10.000"} 224 total_response_time_seconds_bucket{service="all",le="+Inf"} 224 total_response_time_seconds_count{service="all"} 224 total_response_time_seconds_sum{service="all"} 33.616 upstream_response_time_seconds_bucket{service="all",le="00.100"} 93 upstream_response_time_seconds_bucket{service="all",le="00.200"} 190 upstream_response_time_seconds_bucket{service="all",le="00.300"} 220 upstream_response_time_seconds_bucket{service="all",le="00.400"} 220 upstream_response_time_seconds_bucket{service="all",le="00.500"} 223 upstream_response_time_seconds_bucket{service="all",le="00.750"} 224 upstream_response_time_seconds_bucket{service="all",le="01.000"} 224 upstream_response_time_seconds_bucket{service="all",le="01.500"} 224 upstream_response_time_seconds_bucket{service="all",le="02.000"} 224 upstream_response_time_seconds_bucket{service="all",le="03.000"} 224 upstream_response_time_seconds_bucket{service="all",le="04.000"} 224 upstream_response_time_seconds_bucket{service="all",le="05.000"} 224 upstream_response_time_seconds_bucket{service="all",le="10.000"} 224 upstream_response_time_seconds_bucket{service="all",le="+Inf"} 224 upstream_response_time_seconds_count{service="all"} 224 upstream_response_time_seconds_sum{service="all"} 32.226 upstream_status{status="200",service="all"} 224 ``` [0] List of affected metrics: total_response_time_seconds upstream_response_time_seconds upstream_status [1] https://prometheus.io/docs/practices/naming/#labels Signed-off-by: Eloy Coto <eloy.coto@gmail.com>
- Loading branch information
Showing
6 changed files
with
54 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters