Skip to content

Document plugin-provided metrics at the standard /metrics endpoint#9038

Open
Combs7th wants to merge 3 commits into
v11.8-documentationfrom
claude/issue-9034-20260613-0122
Open

Document plugin-provided metrics at the standard /metrics endpoint#9038
Combs7th wants to merge 3 commits into
v11.8-documentationfrom
claude/issue-9034-20260613-0122

Conversation

@Combs7th

Copy link
Copy Markdown
Contributor

Documents that, from Mattermost v11.8.0, plugin-provided Prometheus metrics can be exposed through the standard /metrics endpoint when the AggregatePluginMetrics feature flag is enabled. Aggregated metrics carry a plugin_id label.

Resolves #9034

Generated with Claude Code

lieut-data and others added 2 commits June 12, 2026 12:04
…9029)

* Remove CJK search feature flag mention now that it defaults to true

* Clarify CJK search defaults to true on v11.9, flag-gated on v11.5-v11.8

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Add documentation for the AggregatePluginMetrics feature flag (v11.8.0),
which exposes plugin-provided Prometheus metrics through the standard
Mattermost /metrics endpoint with a plugin_id label.

Co-authored-by: Combs7th <Combs7th@users.noreply.github.com>
@Combs7th Combs7th changed the base branch from master to v11.8-documentation June 13, 2026 01:58
@Combs7th Combs7th requested a review from cpoile June 13, 2026 02:01
@Combs7th Combs7th added 1: Dev Review Requires review by a core commiter 2: Editor Review Requires review by an editor labels Jun 13, 2026
@Combs7th Combs7th added this to the v11.8.0 milestone Jun 13, 2026
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This documentation update explains how system administrators can collect plugin-provided Prometheus metrics through Mattermost's standard /metrics endpoint when the AggregatePluginMetrics feature flag is enabled in v11.8.0 and later, including the use of the plugin_id label for filtering metrics by plugin.

Changes

Plugin Metrics Feature Documentation

Layer / File(s) Summary
Plugin metrics endpoint and filtering documentation
source/administration-guide/scale/deploy-prometheus-grafana-for-performance-monitoring.rst, source/administration-guide/scale/performance-monitoring-metrics.rst
Updated observability documentation to clarify that plugin-provided metrics are exposed via the standard /metrics endpoint when AggregatePluginMetrics is enabled (Mattermost v11.8.0+), can be filtered using the plugin_id label, and that the feature flag is disabled by default.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly summarizes the main purpose of the changeset: documenting plugin-provided metrics at the standard /metrics endpoint, which aligns with the PR objectives.
Description check ✅ Passed The description accurately explains the documentation changes regarding plugin metrics exposure through the /metrics endpoint in Mattermost v11.8.0, with feature flag and labelling details.
Linked Issues check ✅ Passed The PR addresses all key requirements from issue #9034: documenting plugin metrics availability via /metrics endpoint, covering the AggregatePluginMetrics feature flag, and the plugin_id label for metric identification.
Out of Scope Changes check ✅ Passed All changes are scoped to updating existing observability documentation with operator-relevant information about plugin metrics exposure; no out-of-scope modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-9034-20260613-0122

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
source/administration-guide/scale/deploy-prometheus-grafana-for-performance-monitoring.rst (1)

125-125: 💤 Low value

Consider adding version information for consistency and clarity.

While this segment accurately describes the feature flag and aggregation behavior, it does not mention the Mattermost version (v11.8.0). The parallel documentation in performance-monitoring-metrics.rst (line 179) explicitly states "From Mattermost v11.8.0," which helps admins identify feature availability. Adding the version here would improve consistency across the documentation and align with the PR objectives to use versioned wording.

Optional improvement (not required):

-When the ``AggregatePluginMetrics`` feature flag is enabled, plugin-provided metrics are included in the same ``/metrics`` scrape target and can be filtered by the ``plugin_id`` label.
+From Mattermost v11.8.0, when the ``AggregatePluginMetrics`` feature flag is enabled, plugin-provided metrics are included in the same ``/metrics`` scrape target and can be filtered by the ``plugin_id`` label.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@source/administration-guide/scale/deploy-prometheus-grafana-for-performance-monitoring.rst`
at line 125, The sentence about the AggregatePluginMetrics feature flag should
include the version it was introduced in for consistency: update the line
mentioning "AggregatePluginMetrics", "/metrics" and the "plugin_id" label to
begin with "From Mattermost v11.8.0," (or otherwise append the version phrase)
so it reads similarly to the parallel note in performance-monitoring-metrics.rst
and clearly communicates feature availability.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@source/administration-guide/scale/performance-monitoring-metrics.rst`:
- Around line 181-182: Replace the existing ``.. note::`` admonition with ``..
important::`` for the line that states "``AggregatePluginMetrics`` is disabled
by default and must be enabled before plugin-provided metrics are included in
the ``/metrics`` response" so the prerequisite constraint
(AggregatePluginMetrics) is elevated to an important admonition; locate the text
mentioning AggregatePluginMetrics in performance-monitoring-metrics.rst and
change the directive from ``.. note::`` to ``.. important::`` while keeping the
quoted message content unchanged.

---

Nitpick comments:
In
`@source/administration-guide/scale/deploy-prometheus-grafana-for-performance-monitoring.rst`:
- Line 125: The sentence about the AggregatePluginMetrics feature flag should
include the version it was introduced in for consistency: update the line
mentioning "AggregatePluginMetrics", "/metrics" and the "plugin_id" label to
begin with "From Mattermost v11.8.0," (or otherwise append the version phrase)
so it reads similarly to the parallel note in performance-monitoring-metrics.rst
and clearly communicates feature availability.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 98b74263-7a48-42c2-ab3c-236486c169d4

📥 Commits

Reviewing files that changed from the base of the PR and between ea7ca0d and 1f33365.

📒 Files selected for processing (2)
  • source/administration-guide/scale/deploy-prometheus-grafana-for-performance-monitoring.rst
  • source/administration-guide/scale/performance-monitoring-metrics.rst

@github-actions

Copy link
Copy Markdown
Contributor

Newest code from mattermost has been published to preview environment for Git SHA 1f33365

@Combs7th

Copy link
Copy Markdown
Contributor Author

@cpoile - Would you say the above doc updates would suffice?

@github-actions

Copy link
Copy Markdown
Contributor

Newest code from mattermost has been published to preview environment for Git SHA 0f574e2

@Combs7th Combs7th requested a review from wiersgallak June 13, 2026 02:15
@Combs7th

Copy link
Copy Markdown
Contributor Author

@wiersgallak - This one will need editor review as well after dev review is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1: Dev Review Requires review by a core commiter 2: Editor Review Requires review by an editor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document plugin metrics at the standard /metrics endpoint

2 participants