Skip to content

feat(mysql): add counter metric for parseSQL errors#4498

Merged
dtunikov merged 12 commits into
mainfrom
DBI-861/filter-out-the-rest-of-parse-failures
Jul 3, 2026
Merged

feat(mysql): add counter metric for parseSQL errors#4498
dtunikov merged 12 commits into
mainfrom
DBI-861/filter-out-the-rest-of-parse-failures

Conversation

@dtunikov

@dtunikov dtunikov commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a counter metric tracking failures parsing MySQL QueryEvent SQL on the CDC path.

  • New parse_sql_errors Int64 counter in otel_metrics
  • Incremented in the parseSQL error branch in flow/connectors/mysql/cdc.go
  • Classify known error patterns and avoid reporting failures for such

Also partially resolves DBI-860.

The counter is intentionally label-free to avoid high cardinality from the varied SQL queries / error messages that can fail to parse.

Track failures parsing MySQL QueryEvent SQL on the CDC path via a
label-free counter to avoid high cardinality from varied SQL/error text.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dtunikov dtunikov requested a review from a team as a code owner June 25, 2026 15:04
@claude

claude Bot commented Jun 25, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@dtunikov dtunikov enabled auto-merge (squash) June 26, 2026 12:01
@dtunikov dtunikov disabled auto-merge June 26, 2026 12:03
@dtunikov dtunikov requested a review from ilidemi June 26, 2026 12:40
Comment thread flow/connectors/mysql/query_parser.go Outdated
Comment thread flow/connectors/mysql/query_parser.go Outdated
Comment thread flow/connectors/mysql/query_parser.go
Comment thread flow/connectors/mysql/query_parser_test.go
Comment thread flow/connectors/mysql/query_parser.go Outdated
Comment thread flow/connectors/mysql/query_parser.go Outdated
Comment thread flow/connectors/mysql/cdc.go
Comment thread flow/connectors/mysql/cdc.go Outdated
@dtunikov dtunikov requested a review from ilidemi June 29, 2026 09:36
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

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

Awesome job. There are always more corner cases but if it ever becomes important, I wonder if the next step would be an actual tidb replacement (hopefully not).

Comment thread flow/connectors/mysql/query_parser.go Outdated
Comment thread flow/connectors/mysql/query_parser.go
dtunikov and others added 2 commits July 3, 2026 12:23
Co-authored-by: Ilia Demianenko <ilia.demianenko@clickhouse.com>
@dtunikov dtunikov merged commit 764acd8 into main Jul 3, 2026
17 checks passed
@dtunikov dtunikov deleted the DBI-861/filter-out-the-rest-of-parse-failures branch July 3, 2026 12:15
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