Skip to content

Commit

Permalink
contrib: Only count index report creation latency for successful
Browse files Browse the repository at this point in the history
requests

Right now the metrics are being thrown off by the fact that 500s will
return very fast. This will ensure only latency for successful requests
is considered.

Signed-off-by: crozzy <joseph.crosland@gmail.com>
  • Loading branch information
crozzy committed Jun 29, 2022
1 parent 17862ae commit 6b60eef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -2497,7 +2497,7 @@ data:
"targets": [
{
"exemplar": true,
"expr": "sum(increase(clair_http_indexerv1_request_duration_seconds_bucket{method=\"post\", handler=\"/indexer/api/v1/index_report\"} [5m])) by (le)",
"expr": "sum(increase(clair_http_indexerv1_request_duration_seconds_bucket{method=\"post\", handler=\"/indexer/api/v1/index_report\", code=\"201\"} [5m])) by (le)",
"format": "heatmap",
"instant": false,
"interval": "1",
Expand Down
2 changes: 1 addition & 1 deletion local-dev/grafana/provisioning/dashboards/dashboard.json
Expand Up @@ -2484,7 +2484,7 @@
"targets": [
{
"exemplar": true,
"expr": "sum(increase(clair_http_indexerv1_request_duration_seconds_bucket{method=\"post\", handler=\"/indexer/api/v1/index_report\"} [5m])) by (le)",
"expr": "sum(increase(clair_http_indexerv1_request_duration_seconds_bucket{method=\"post\", handler=\"/indexer/api/v1/index_report\", code=\"201\"} [5m])) by (le)",
"format": "heatmap",
"instant": false,
"interval": "1",
Expand Down

0 comments on commit 6b60eef

Please sign in to comment.