Skip to content

chore(docs): document prometheus path label configuration options#2564

Open
kalEl2001 wants to merge 1 commit into
ory:masterfrom
kalEl2001:master
Open

chore(docs): document prometheus path label configuration options#2564
kalEl2001 wants to merge 1 commit into
ory:masterfrom
kalEl2001:master

Conversation

@kalEl2001
Copy link
Copy Markdown

Document the collapse_request_paths_depth configuration option for Oathkeeper's
Prometheus 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, and
the new collapse_request_paths_depth) with a comparison table and a config example.

Related Issue or Design Document

ory/oathkeeper#1212

Checklist

  • I have read the contributing guidelines and signed the CLA.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • I have read the security policy.
  • I confirm that this pull request does not address a security vulnerability.
    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.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added the necessary documentation within the code base (if appropriate).

Further comments

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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, and collapse_request_paths_depth with 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. |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants