Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to ignore request in metrics #6177

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/serving/services/service-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Requests endpoint.
!!! note
The `revision_queue_depth` metric will be exported only if the revision concurrency hard limit is set to a value greater than 1.

!!! note
To exclude request from metrics (e.g. health check requests), set the `K-Ignore-Metrics` header to non-empty value.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the security implications of this header? I'm concerned that someone could use this header to sneak in a DDoS attack that wouldn't show up on monitoring.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, would it be better to have possibility to specify additional label for metrics?


## Exposing Queue proxy metrics

Queue proxy exports metrics for the requests endpoint on port 9091. The metrics can be scraped by Prometheus when `metrics.request-metrics-backend-destination` is set to `prometheus` (default) in the configmap `observability`. The backend can be changed to `opencensus` which uses a push model and requires a destination
Expand Down