Skip to content

[DBM] ClickHouse: document query errors, explain plans, query tagging, parts & merges, schema collection, CPU time#37409

Open
sangeetashivaji wants to merge 16 commits into
masterfrom
sangeeta.shivajirao/clickhouse-new-features
Open

[DBM] ClickHouse: document query errors, explain plans, query tagging, parts & merges, schema collection, CPU time#37409
sangeetashivaji wants to merge 16 commits into
masterfrom
sangeeta.shivajirao/clickhouse-new-features

Conversation

@sangeetashivaji

@sangeetashivaji sangeetashivaji commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Query errors (Agent 7.79+): documents query_errors config, error event contents (exception message, error code, stack trace), enabled by default
  • Explain plans (Agent 7.79+): documents automatic EXPLAIN json=1 collection for SELECT/WITH queries with rate-limit config options
  • Query tagging (Agent 7.79+): documents manual tag injection via sqlcommenter/marginalia SQL comment formats; tags surface as Propagated Tags on samples, completions, and explain plans; links to the tag_database_statements guide. Also adds ClickHouse to the supported databases list in that guide.
  • Parts and merges (Agent 7.80+): documents all 17 gauge metrics, full parts_and_merges config reference, explains storage health timeline view
  • Schema collection (Agent 7.81+): documents collect_schemas and schema_metrics config, required grants (system.tables, system.columns, system.view_refreshes)
  • CPU time per query (Agent 7.82+): documents cpu_virtual_time_us/cpu_wait_us fields on completions and aggregated total_* fields on query metrics
  • Coming soon callout: async insert observability placeholder

Both selfhosted.md and cloud.md updated identically. "Before you begin" now has a per-feature Agent version matrix.

Files changed

  • content/en/database_monitoring/setup_clickhouse/selfhosted.md
  • content/en/database_monitoring/setup_clickhouse/cloud.md
  • content/en/database_monitoring/guide/tag_database_statements.md — added ClickHouse (Agent 7.79+) to supported databases list

Test plan

  • Preview both ClickHouse pages in the docs preview environment
  • Verify config key names match conf.yaml.example in integrations-core
  • Confirm Agent version numbers with engineering before publish

🤖 Generated with Claude Code

…query tagging, parts and merges, schema collection, CPU time per query

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sangeetashivaji sangeetashivaji requested review from a team as code owners June 10, 2026 14:28
…n framing (sqlcommenter/marginalia)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added the Guide Content impacting a guide label Jun 10, 2026

@domalessi domalessi 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.

Thanks for the PR! A handful of editorial fixes inline.

Also, one higher-level note for discussion:
The Data collected section is now quite dense, and it has a framing issue introduced by the new entries. The existing lead-in ("Database Monitoring collects the following data from ClickHouse:") sets up a flat list, but the entries aren't all the same kind of thing:

  • Query observability (Instance metadata through Query tagging): query execution data
  • Parts and merges: storage health metrics with no query involvement
  • Schema collection: catalog metadata

As a result, it's unclear whether Parts and merges is part of the "data" in that intro sentence, or something separate (and if separate, what exactly it is).

Suggest restructuring Data collected with H3 subheadings:

## Data collected

### Query observability
[Instance metadata through Query tagging]

### Storage health metrics (Agent 7.80+)
[Parts and merges]

### Schema (Agent 7.81+)
[Schema collection] 

Two secondary wins from this:

  • The (Agent 7.80+) / (Agent 7.81+) inline version callouts in the definition list can move into the subheadings instead, where they're more visible
  • The 17-row metrics table in Parts and merges fits better in the Configuration reference section under the parts_and_merges config table -- that's where a reader configuring the feature will look for it, and removing it from Data collected makes the overview section much lighter

Comment thread content/en/database_monitoring/setup_clickhouse/cloud.md Outdated
Comment thread content/en/database_monitoring/setup_clickhouse/cloud.md Outdated

Tags appear on the Sample Details page under **Propagated Tags** and can be used to filter the Explain Plans and Query Samples views. See [Tagging SQL Statements][tag-statements] for full details.

[sqlcommenter]: https://google.github.io/sqlcommenter

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.

Move these three reference definitions to the bottom of the file with the other link refs, and convert to numbered style ([1], [2], [3]) instead of named identifiers.

Comment thread content/en/database_monitoring/setup_clickhouse/cloud.md Outdated
Comment thread content/en/database_monitoring/setup_clickhouse/cloud.md Outdated
Comment thread content/en/database_monitoring/setup_clickhouse/selfhosted.md Outdated
Comment thread content/en/database_monitoring/setup_clickhouse/selfhosted.md Outdated
| `schema_metrics.enabled` | boolean | `false` | Enable per-table size and per-view refresh gauges. Requires `dbm: true`. |
| `schema_metrics.collection_interval` | number | `60` | Collection interval in seconds. |

## Coming soon

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.

Remove this heading and the <div class="alert alert-info"> block that follows — forward-looking placeholder content gets stale once the feature ships.

Comment thread content/en/database_monitoring/setup_clickhouse/cloud.md Outdated
Comment thread content/en/database_monitoring/setup_clickhouse/selfhosted.md Outdated
sangeetashivaji and others added 14 commits June 10, 2026 12:35
Co-authored-by: domalessi <111786334+domalessi@users.noreply.github.com>
Co-authored-by: domalessi <111786334+domalessi@users.noreply.github.com>
Co-authored-by: domalessi <111786334+domalessi@users.noreply.github.com>
Co-authored-by: domalessi <111786334+domalessi@users.noreply.github.com>
Co-authored-by: domalessi <111786334+domalessi@users.noreply.github.com>
Co-authored-by: domalessi <111786334+domalessi@users.noreply.github.com>
Co-authored-by: domalessi <111786334+domalessi@users.noreply.github.com>
Co-authored-by: domalessi <111786334+domalessi@users.noreply.github.com>
Co-authored-by: domalessi <111786334+domalessi@users.noreply.github.com>
Co-authored-by: domalessi <111786334+domalessi@users.noreply.github.com>
Co-authored-by: domalessi <111786334+domalessi@users.noreply.github.com>
Co-authored-by: domalessi <111786334+domalessi@users.noreply.github.com>
Co-authored-by: domalessi <111786334+domalessi@users.noreply.github.com>
Co-authored-by: domalessi <111786334+domalessi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Guide Content impacting a guide

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants