Skip to content

docs(config): add yaml-example doc-generator output and document V2 config blocks#5151

Merged
simonswine merged 1 commit into
grafana:mainfrom
simonswine:20260513_example-config
May 15, 2026
Merged

docs(config): add yaml-example doc-generator output and document V2 config blocks#5151
simonswine merged 1 commit into
grafana:mainfrom
simonswine:20260513_example-config

Conversation

@simonswine
Copy link
Copy Markdown
Contributor

@simonswine simonswine commented May 13, 2026

Summary

Picks up the work from @alliasgher in #5106:

  • Adds a -format=yaml-example mode to the doc-generator and wires it into the Makefile so cmd/pyroscope/pyroscope.yaml is regenerated automatically.
  • Registers the V2 root blocks (segment_writer, metastore, compaction_worker, query_backend, adaptive_placement, symbolizer, overrides_exporter) and removes the doc:"hidden" tags hiding them, so they appear in both the generated reference docs and the example config.

Credit: @alliasgher (original PR: #5106).

Test plan

  • make generate produces no diff on a clean tree
  • cmd/pyroscope/pyroscope.yaml reflects the V2 blocks
  • docs/sources/configure-server/reference-configuration-parameters/index.md renders the new blocks

Note

Low Risk
Low risk: changes are confined to documentation generation and example config output, with no impact to runtime behavior besides exposing previously hidden config fields in generated docs.

Overview
Adds a new -format yaml-example mode to tools/doc-generator (with -skip-blocks) to emit a commented YAML config example using default values and only basic fields.

Wires this into make generate to auto-regenerate cmd/pyroscope/pyroscope.yaml, and updates the generated reference docs to include previously hidden V2 top-level blocks (metastore, segment_writer, compaction_worker, query_backend, adaptive_placement, symbolizer, overrides_exporter) plus category annotations like (advanced)/(experimental).

Reviewed by Cursor Bugbot for commit 4a83641. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit 5af55f2. Configure here.

Comment thread tools/doc-generator/writer.go
…onfig blocks

Adds a -format=yaml-example mode to the doc-generator and wires it into
the Makefile so cmd/pyroscope/pyroscope.yaml is regenerated automatically.
Registers the V2 root blocks (segment_writer, metastore, compaction_worker,
query_backend, adaptive_placement, symbolizer, overrides_exporter) and
removes the doc:"hidden" tags hiding them, so they appear in both the
generated reference docs and the example config.
@simonswine simonswine force-pushed the 20260513_example-config branch from 5af55f2 to 4a83641 Compare May 13, 2026 16:39
Comment thread cmd/pyroscope/pyroscope.yaml
Copy link
Copy Markdown
Contributor

@alsoba13 alsoba13 left a comment

Choose a reason for hiding this comment

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

LGTM

@simonswine simonswine merged commit 8cc8803 into grafana:main May 15, 2026
33 checks passed
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