chore(docs): document prometheus path label configuration options#2564
Open
kalEl2001 wants to merge 1 commit into
Open
chore(docs): document prometheus path label configuration options#2564kalEl2001 wants to merge 1 commit into
kalEl2001 wants to merge 1 commit into
Conversation
7 tasks
There was a problem hiding this comment.
Pull request overview
Adds documentation for Oathkeeper Prometheus request-path label cardinality controls, covering the newly introduced collapse_request_paths_depth option and how it relates to existing path-label settings.
Changes:
- Adds a new “Controlling request path labels” subsection under Monitoring.
- Documents
hide_request_paths,collapse_request_paths, andcollapse_request_paths_depthwith a comparison table. - Provides an example configuration and an illustrative path-collapsing example.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+381
to
+389
| By default, Oathkeeper includes the full request path as a label on Prometheus metrics. For high-cardinality APIs this can | ||
| produce an unbounded number of label values, which increases Prometheus memory usage. Three configuration options let you | ||
| control this behavior: | ||
|
|
||
| | Option | Type | Default | Description | | ||
| |---|---|---|---| | ||
| | `hide_request_paths` | bool | `false` | When `true`, the request path label is omitted entirely. | | ||
| | `collapse_request_paths` | bool | `true` | When `true`, the path is truncated to the first N segments (controlled by `collapse_request_paths_depth`). | | ||
| | `collapse_request_paths_depth` | int | `1` | Number of path segments to keep when `collapse_request_paths` is enabled. | |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Document the
collapse_request_paths_depthconfiguration option for Oathkeeper'sPrometheus metrics, introduced in ory/oathkeeper#.
The existing monitoring section only covered basic Prometheus setup (port, host,
metrics_path). This adds a "Controlling request path labels" subsection explaining
all three path label options (
hide_request_paths,collapse_request_paths, andthe new
collapse_request_paths_depth) with a comparison table and a config example.Related Issue or Design Document
ory/oathkeeper#1212
Checklist
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact security@ory.com) from the maintainers to push the changes.
Further comments