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: export runtime metric to promethues #2985

Merged
merged 3 commits into from
Dec 25, 2023

Conversation

SSebo
Copy link
Contributor

@SSebo SSebo commented Dec 23, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

export tokio runtime metrics

Please explain IN DETAIL what the changes are in this PR and why they are needed:

  • use tokio-metric to collect runtime metrics
  • use tokio-metric-collector to expose to promethues

Checklist

  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

close #1529

@killme2008 killme2008 added the docs-not-required This change does not impact docs. label Dec 23, 2023
Copy link

codecov bot commented Dec 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (06fd7fd) 85.87% compared to head (fb73057) 85.24%.
Report is 7 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2985      +/-   ##
===========================================
- Coverage    85.87%   85.24%   -0.63%     
===========================================
  Files          780      783       +3     
  Lines       126184   126638     +454     
===========================================
- Hits        108356   107954     -402     
- Misses       17828    18684     +856     

@SSebo
Copy link
Contributor Author

SSebo commented Dec 25, 2023

@MichaelScofield PTAL

@MichaelScofield
Copy link
Collaborator

@SSebo can you attach some output as an example to illustrate the tokio runtime metrics look like?

Copy link
Contributor

@fengys1996 fengys1996 left a comment

Choose a reason for hiding this comment

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

LGTM, Thank you @SSebo .

Copy link
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

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

Others LGTM

@killme2008 killme2008 enabled auto-merge December 25, 2023 12:18
Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

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

Have to sort the deps.

auto-merge was automatically disabled December 25, 2023 12:29

Head branch was pushed to by a user without write access

@SSebo
Copy link
Contributor Author

SSebo commented Dec 25, 2023

@SSebo can you attach some output as an example to illustrate the tokio runtime metrics look like?

Of course. How about this ?

            assert!(metric_text.contains("runtime_0_tokio_budget_forced_yield_count 0"));
            assert!(metric_text.contains("runtime_0_tokio_injection_queue_depth 0"));
            assert!(metric_text.contains("runtime_0_tokio_workers_count 5"));

@killme2008 killme2008 added this pull request to the merge queue Dec 25, 2023
Merged via the queue into GreptimeTeam:develop with commit cf561df Dec 25, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export tokio runtime metrics from tokio-console
5 participants