Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(metrics): add progress metrics via collector #17359

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

flaneur2020
Copy link
Member

@flaneur2020 flaneur2020 commented Jan 23, 2025

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

this pr is a rework of #17266

instead of maintain a global metrics, this pr use prometheus's Collector to dump the metrics when /metrics is scraped.

Tests

  • No Test - add metrics

Type of change

  • Other (please describe): observability

This change is Reviewable

@github-actions github-actions bot added the pr-feature this PR introduces a new feature to the codebase label Jan 23, 2025
@flaneur2020 flaneur2020 marked this pull request as ready for review January 24, 2025 08:22
@flaneur2020 flaneur2020 requested a review from zhang2014 January 24, 2025 09:27
group_by_spill: ProgressValues,
window_partition_spill: ProgressValues,
) {
let mut guard = self.inner.lock();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Atomic is better?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me have a try

Copy link
Member Author

@flaneur2020 flaneur2020 Jan 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tried to use an AtomicPtr instead but finally returned to the Mutex approach 🥲, the exlusive region is not big imo, it only held the lock when query is finished & metrics is scraped.

@flaneur2020 flaneur2020 requested a review from zhang2014 January 26, 2025 07:02
@zhang2014 zhang2014 added the ci-benchmark Benchmark: run all test label Feb 6, 2025
Copy link
Contributor

github-actions bot commented Feb 6, 2025

Docker Image for PR

  • tag: pr-17359-31edfaf-1738826681

note: this image tag is only available for internal use,
please check the internal doc for more details.

Copy link
Contributor

github-actions bot commented Feb 7, 2025

Docker Image for PR

  • tag: pr-17359-265858d-1738899269

note: this image tag is only available for internal use,
please check the internal doc for more details.

Copy link
Contributor

github-actions bot commented Feb 7, 2025

Docker Image for PR

  • tag: pr-17359-dc711ef-1738905094

note: this image tag is only available for internal use,
please check the internal doc for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-benchmark Benchmark: run all test pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants