pingcap / pingcap/ticdc

[P4][Logs] Add metrics and regression checks for log volume changes

Open
#4,751 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/enhancement
Dominant language
Go
Stars
56
Forks
63
Avg merge
2d 20h
Merged PRs (30d)
34

Description

Parent issue: #4691

Intent

Log-reduction work needs a quantitative feedback loop. Without metrics and regression checks, it is difficult to validate that the new behavior actually reduces noisy logs or to detect future regressions. This task adds observability for emitted, suppressed, and summary log volume.

Modification points

  • Add metrics such as log_entries_total, log_suppressed_total, and log_summary_total.
  • Expose enough dimensions to identify the loudest modules and suppression keys.
  • Add regression checks or baselines in suitable tests or stress environments so log volume changes can be detected intentionally.

Entry points

  • pkg/logger/log.go:176
  • pkg/logger/log_metrics.go

Done criteria

  • The system exposes quantitative signals for emitted logs, suppressed logs, and summary logs.
  • Teams can compare before-and-after log volume for optimization work.
  • Future noisy-log regressions can be detected with an explicit signal instead of anecdotal observation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading pkg/logger/log.go:176 and pkg/logger/log_metrics.go to understand the existing logging flow and metrics support. Trace how emitted, suppressed, and summary logs are handled, then inspect suitable tests or stress environments for baseline patterns. Done means quantitative signals expose these volumes and regression checks can compare changes over time.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.