Uh oh!
There was an error while loading. Please reload this page.
[Improve](StreamingJob) add more metrics to observe the streaming job - #60493
Conversation
hello-stephen
commented
Feb 4, 2026
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
JNSimba
commented
Feb 4, 2026
run buildall |
There was a problem hiding this comment.
Pull request overview
Adds new FE-side metrics to improve observability of streaming insert jobs, along with a regression test that validates the metrics are exposed via the FE /metrics endpoint.
Changes:
- Registers new streaming job counter metrics in
MetricRepoand adds streaming job state gauges. - Increments the new counters from
StreamingInsertJoblifecycle points (meta fetch, task success/failure, offset commit). - Adds a MySQL CDC regression test that polls FE metrics until all expected streaming-job metrics are present.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| regression-test/suites/job_p0/streaming_job/cdc/test_streaming_mysql_job_metrics.groovy | New regression test validating FE exports the expected streaming job metrics. |
| fe/fe-core/src/main/java/org/apache/doris/metric/MetricRepo.java | Registers streaming job counters and adds streaming job state gauge metrics. |
| fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/streaming/StreamingInsertJob.java | Emits streaming job metric increments during meta fetch, task completion, and offset/stat updates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
JNSimba
commented
Feb 5, 2026
run buildall |
doris-robot
commented
Feb 5, 2026
TPC-H: Total hot run time: 31401 ms |
doris-robot
commented
Feb 5, 2026
ClickBench: Total hot run time: 29.11 s |
hello-stephen
commented
Feb 5, 2026
FE UT Coverage ReportIncrement line coverage |
JNSimba
commented
Feb 5, 2026
run buildall |
doris-robot
commented
Feb 5, 2026
TPC-H: Total hot run time: 31611 ms |
doris-robot
commented
Feb 5, 2026
ClickBench: Total hot run time: 28.33 s |
JNSimba
commented
Feb 5, 2026
run p0 |
1 similar comment
JNSimba
commented
Feb 5, 2026
run p0 |
hello-stephen
commented
Feb 5, 2026
FE Regression Coverage ReportIncrement line coverage |
1 similar comment
hello-stephen
commented
Feb 5, 2026
FE Regression Coverage ReportIncrement line coverage |
JNSimba
commented
Feb 5, 2026
run p0 |
hello-stephen
commented
Feb 5, 2026
FE Regression Coverage ReportIncrement line coverage |
PR approved by anyone and no changes requested. |
PR approved by at least one committer and no changes requested. |
Uh oh!
There was an error while loading. Please reload this page.
…#60493) ### What problem does this PR solve? Add more metrics to observe the streaming job: | Metrics | Module | Description | |---------------------------------------|--------|-------------------------------------------------------------------| | streaming_job_get_meta_latency | FE | Time spent fetching source metadata for streaming jobs | | streaming_job_get_meta_count | FE | Number of times source metadata is fetched for streaming jobs | | streaming_job_get_meta_fail_count | FE | Number of failures when fetching source metadata for streaming jobs | | streaming_job_task_execute_time | FE | Total execution time of streaming job tasks | | streaming_job_task_execute_count | FE | Total number of executed streaming job tasks | | streaming_job_task_failed_count | FE | Total number of failed streaming job tasks | | streaming_job_total_rows | FE | Total number of rows processed by streaming jobs | | streaming_job_filter_rows | FE | Total number of rows filtered out by streaming jobs | | streaming_job_load_bytes | FE | Total data volume loaded by streaming jobs (in bytes) | | doris_fe_job,type=STREAMING_JOB | FE | Status of streaming job |
…treaming job apache#60493 (apache#60571) Cherry-picked from apache#60493 Co-authored-by: wudi <wudi@selectdb.com>
#62224) ## Summary - Add per-job granularity metrics for streaming insert jobs with `job_id` and `job_name` labels - New metrics: `streaming_job_per_job_scanned_rows`, `streaming_job_per_job_load_bytes`, `streaming_job_per_job_filtered_rows`, `streaming_job_per_job_succeed_task_count`, `streaming_job_per_job_failed_task_count` - Existing global aggregated metrics remain unchanged - Follow-up to #60493 ## Approach Follows `generateBackendsTabletMetrics()` pattern: on each `/metrics` request, remove all previous per-job metrics then re-register with current job data. This ensures values are always up-to-date and stale jobs are cleaned up automatically. Offset info is intentionally excluded from metric labels to avoid Prometheus series churn and serialization issues. Offset can be viewed via `SHOW STREAMING JOBS` or `jobs("type"="insert")` TVF. ## Test plan - [ ] Verify per-job metrics appear in `/metrics?type=json` with correct `job_id` and `job_name` labels - [ ] Verify existing global streaming job metrics still present - [ ] Verify FE replay is not affected - [ ] Run `test_streaming_mysql_job_metrics.groovy` regression test 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
#62224) ## Summary - Add per-job granularity metrics for streaming insert jobs with `job_id` and `job_name` labels - New metrics: `streaming_job_per_job_scanned_rows`, `streaming_job_per_job_load_bytes`, `streaming_job_per_job_filtered_rows`, `streaming_job_per_job_succeed_task_count`, `streaming_job_per_job_failed_task_count` - Existing global aggregated metrics remain unchanged - Follow-up to #60493 ## Approach Follows `generateBackendsTabletMetrics()` pattern: on each `/metrics` request, remove all previous per-job metrics then re-register with current job data. This ensures values are always up-to-date and stale jobs are cleaned up automatically. Offset info is intentionally excluded from metric labels to avoid Prometheus series churn and serialization issues. Offset can be viewed via `SHOW STREAMING JOBS` or `jobs("type"="insert")` TVF. ## Test plan - [ ] Verify per-job metrics appear in `/metrics?type=json` with correct `job_id` and `job_name` labels - [ ] Verify existing global streaming job metrics still present - [ ] Verify FE replay is not affected - [ ] Run `test_streaming_mysql_job_metrics.groovy` regression test 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
#62224) ## Summary - Add per-job granularity metrics for streaming insert jobs with `job_id` and `job_name` labels - New metrics: `streaming_job_per_job_scanned_rows`, `streaming_job_per_job_load_bytes`, `streaming_job_per_job_filtered_rows`, `streaming_job_per_job_succeed_task_count`, `streaming_job_per_job_failed_task_count` - Existing global aggregated metrics remain unchanged - Follow-up to #60493 ## Approach Follows `generateBackendsTabletMetrics()` pattern: on each `/metrics` request, remove all previous per-job metrics then re-register with current job data. This ensures values are always up-to-date and stale jobs are cleaned up automatically. Offset info is intentionally excluded from metric labels to avoid Prometheus series churn and serialization issues. Offset can be viewed via `SHOW STREAMING JOBS` or `jobs("type"="insert")` TVF. ## Test plan - [ ] Verify per-job metrics appear in `/metrics?type=json` with correct `job_id` and `job_name` labels - [ ] Verify existing global streaming job metrics still present - [ ] Verify FE replay is not affected - [ ] Run `test_streaming_mysql_job_metrics.groovy` regression test 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
apache#62224) ## Summary - Add per-job granularity metrics for streaming insert jobs with `job_id` and `job_name` labels - New metrics: `streaming_job_per_job_scanned_rows`, `streaming_job_per_job_load_bytes`, `streaming_job_per_job_filtered_rows`, `streaming_job_per_job_succeed_task_count`, `streaming_job_per_job_failed_task_count` - Existing global aggregated metrics remain unchanged - Follow-up to apache#60493 ## Approach Follows `generateBackendsTabletMetrics()` pattern: on each `/metrics` request, remove all previous per-job metrics then re-register with current job data. This ensures values are always up-to-date and stale jobs are cleaned up automatically. Offset info is intentionally excluded from metric labels to avoid Prometheus series churn and serialization issues. Offset can be viewed via `SHOW STREAMING JOBS` or `jobs("type"="insert")` TVF. ## Test plan - [ ] Verify per-job metrics appear in `/metrics?type=json` with correct `job_id` and `job_name` labels - [ ] Verify existing global streaming job metrics still present - [ ] Verify FE replay is not affected - [ ] Run `test_streaming_mysql_job_metrics.groovy` regression test 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
What problem does this PR solve?
Issue Number: close #xxx
Add more metrics to observe the streaming job:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)