Skip to content

fix: remove invalid label field from non-pipeline component config examples#381

Merged
mfernest merged 2 commits intomainfrom
fix/doc-1978-metrics-label-field
Mar 13, 2026
Merged

fix: remove invalid label field from non-pipeline component config examples#381
mfernest merged 2 commits intomainfrom
fix/doc-1978-metrics-label-field

Conversation

@mfernest
Copy link
Copy Markdown
Contributor

@mfernest mfernest commented Mar 4, 2026

Summary

The `label` field is only valid for `inputs`, `outputs`, and `processors`. A bug in the doc-tools generator (docs-extensions-and-macros#176) causes it to be unconditionally added to the example YAML for all component types.

This PR removes the invalid `label: ""` from all affected component type examples:

Type Files fixed
`metrics` 10 (5 common + 5 advanced)
`caches` 38 (19 common + 19 advanced)
`buffers` 6 (3 common + 3 advanced)
`tracers` 8 (4 common + 4 advanced)
`rate-limits` 4 (2 common + 2 advanced)
`scanners` 16 (8 common + 8 advanced)
Total 76 files

The `metrics` fix was originally reported by a community member via Slack. See DOC-1978.

Also fixes the `prometheus` Common tab example to use `prometheus: {}` (empty map) instead of bare `prometheus:` (empty scalar).

Test plan

  • Verify metrics, caches, buffers, tracers, rate-limits, and scanner pages no longer show `label: ""` in their config examples
  • Verify the prometheus Common tab shows `prometheus: {}`
  • Confirm inputs, outputs, and processors examples still show `label: ""` (valid for those types)

🤖 Generated with Claude Code

Page previews

The label field is not valid under metrics configuration. It was erroneously
included in auto-generated example YAML files for all metric types. Also fixes
the prometheus common example to use `prometheus: {}` (empty map) instead of
bare `prometheus:` (empty scalar).

Fixes DOC-1978.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mfernest mfernest requested a review from a team as a code owner March 4, 2026 18:29
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 4, 2026

Deploy Preview for redpanda-connect ready!

Name Link
🔨 Latest commit 73addc1
🔍 Latest deploy log https://app.netlify.com/projects/redpanda-connect/deploys/69a87d656f2ea9000883be15
😎 Deploy Preview https://deploy-preview-381--redpanda-connect.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 4, 2026

📝 Walkthrough

Walkthrough

This pull request removes empty label fields from metrics configuration examples across ten YAML files. The affected files span two directories (advanced and common) and cover five metrics types: AWS CloudWatch, InfluxDB, Logger, Prometheus, and StatsD. Additionally, the prometheus.yaml file in the common metrics directory changes the prometheus configuration value from an implicit empty value to an explicit empty object.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately summarizes the main change: removing invalid label fields from non-pipeline component configuration examples.
Description check ✅ Passed The pull request description clearly explains the purpose: removing invalid label fields from metrics and other component examples due to a doc-tools generator bug.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/doc-1978-metrics-label-field

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.

Extends the metrics fix to all component types that don't support label:
buffers, caches, rate-limits, scanners, and tracers (66 files total).

The label field is only valid for inputs, outputs, and processors.
The root cause is tracked in docs-extensions-and-macros#176.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mfernest mfernest changed the title fix(metrics): remove invalid label field from metrics config examples fix: remove invalid label field from non-pipeline component config examples Mar 4, 2026
@Feediver1 Feediver1 requested a review from prakhargarg105 March 4, 2026 18:53
@mfernest mfernest requested a review from Feediver1 March 4, 2026 19:25
@Feediver1
Copy link
Copy Markdown
Contributor

@mfernest Who is the eng SME for this one? All PRs that add or change technical content require at least one SME approval.

Copy link
Copy Markdown
Contributor

@prakhargarg105 prakhargarg105 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Copy Markdown
Contributor

@Feediver1 Feediver1 left a comment

Choose a reason for hiding this comment

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

lgtm

@mfernest mfernest merged commit 6cd1ec8 into main Mar 13, 2026
5 checks passed
@mfernest mfernest deleted the fix/doc-1978-metrics-label-field branch March 13, 2026 18:21
mfernest added a commit that referenced this pull request Mar 13, 2026
…amples (#381)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
mfernest added a commit that referenced this pull request Mar 13, 2026
…amples (#381)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
mfernest added a commit that referenced this pull request Mar 13, 2026
…amples (#381)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
mfernest added a commit that referenced this pull request Mar 13, 2026
…amples (#381)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai coderabbitai bot mentioned this pull request Apr 2, 2026
4 tasks
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.

3 participants