Autogenerate ProfileEvents and CurrentMetrics descriptions#5749
Merged
Autogenerate ProfileEvents and CurrentMetrics descriptions#5749
Conversation
The system.events documentation page was missing a list of all individual ProfileEvents. The system.metrics page had a manually maintained table that could become outdated. This adds autogeneration for both: - New SQL file for ProfileEvents that uses system_events_show_zero_values=1 to include ALL events, not just those with non-zero counters - New SQL file for CurrentMetrics descriptions - Updated autogenerate-settings.sh to run these queries and inject the results into events.md and metrics.md (adding section tags automatically if they don't exist, and replacing any existing hardcoded table) - Made insert_content_between_tags() support custom tag names Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
4 Skipped Deployments
|
Member
Author
|
Formatting is broken. |
- Switch SQL output from Markdown tables to heading-based format (### MetricName + description paragraph) to properly support Markdown in embedded descriptions - Add autogeneration for asynchronous_metrics and histogram_metrics, replacing their hardcoded description sections too - Refactor repeated code into generate_descriptions_list() helper - The function handles all cases: replacing existing hardcoded sections, inserting before **See Also**, or appending at end of file Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
Author
|
Remove "The following events are available in ClickHouse OSS:" from the system.events page. |
Member
Author
|
It is in the main ClickHouse repo, so ok to merge this first. |
Blargian
approved these changes
Mar 16, 2026
Member
Blargian
left a comment
There was a problem hiding this comment.
LGTM, thanks for pointing out system_events_show_zero_values = 1. That simplifies things greatly.
Blargian
added a commit
to ClickHouse/ClickHouse
that referenced
this pull request
Mar 16, 2026
Remove hardcoded table in favour of autogenerated one introduced in ClickHouse/clickhouse-docs#5749
1 task
ivanmantova
pushed a commit
to ivanmantova/ClickHouse
that referenced
this pull request
Mar 18, 2026
Remove hardcoded table in favour of autogenerated one introduced in ClickHouse/clickhouse-docs#5749
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.
Summary
system.eventsdocs page was missing a list of all individual ProfileEvents entirelysystem.metricspage had a manually maintained table (~185 metrics) that could become outdatedsystem.asynchronous_metricspage had a large manually maintained descriptions sectionsystem.histogram_metricspage had a small manually maintained descriptions sectionsystem.events, ClickHouse hides events with zero counters by default (system_events_show_zero_values=0), so any query-based generation would miss unfired events### MetricName+ description paragraph) rather than Markdown tables, to preserve formattingThis PR replaces all hardcoded description lists with autogeneration:
generate-events-list.sql— queriessystem.eventswithSET system_events_show_zero_values = 1to include ALL ProfileEventsgenerate-metrics-list.sql— queriessystem.metricsfor all CurrentMetricsgenerate-asynchronous-metrics-list.sql— queriessystem.asynchronous_metricsgenerate-histogram-metrics-list.sql— queriessystem.histogram_metricsautogenerate-settings.sh— newgenerate_descriptions_list()helper that:AUTOGENERATED_DESCRIPTIONStags to doc pages (no changes needed in the ClickHouse repo)insert_content_between_tags()now supports custom tag names via optional parameters (backward compatible)Test plan
yarn autogenerate-settingsand verify all 4 doc pages get complete descriptions:docs/operations/system-tables/events.md— all ProfileEvents including zero-valued onesdocs/operations/system-tables/metrics.md— all CurrentMetricsdocs/operations/system-tables/asynchronous_metrics.md— all async metricsdocs/operations/system-tables/histogram_metrics.md— all histogram metrics🤖 Generated with Claude Code