-
Notifications
You must be signed in to change notification settings - Fork 439
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
Add views for metrics about pageserver requests #9008
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orca Security Scan Summary
Status | Check | Issues by priority | |
---|---|---|---|
Passed | Infrastructure as Code | 0 0 0 0 | View in Orca |
Passed | Secrets | 0 0 0 0 | View in Orca |
Passed | Vulnerabilities | 0 0 0 0 | View in Orca |
48130d2
to
1993f22
Compare
5038 tests run: 4874 passed, 0 failed, 164 skipped (full report)Flaky tests (19)Postgres 17
Postgres 16
Postgres 15
Postgres 14
Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
562992a at 2024-09-21T13:49:00.955Z :recycle: |
1993f22
to
d2f47a0
Compare
Can't this use additional columns for dimensions? I'm an unfan of prometheus' format and would appreciate not exposing such opinionated names. |
I actually wrote it that way at first, with an explicit "bucket" column. But to then convert them to the prometheus metrics format in the exporter, you need a pretty complex SQL query. I found it easier to do that in C code directly. |
Why can't the exporter do the table-to-metrics transformation? Shouldn't it be able to handle that transformation by itself? |
You can give the exporter an arbitrary SQL, and do the transformation in the SQL query. |
I know you can do that, but shouldn't the exporter by itself know how to treat (absense of) labels like E.g. if I query See e.g. https://github.com/neondatabase/neon/blob/0a8c5e1214fcd3f59767a6ca4adeb68612977e51/vm-image-spec.yaml#L439C1-L449C85 where labels are read from columns. |
A-ha, now I understand. I didn't know sql_exporter can do that. Yeah, that makes sense, I'll do that. |
There is an Epic from John for that #8926 |
95dd419
to
b80597a
Compare
Done. It now looks like this:
and that can be converted to prometheus style format with a pretty simple query:
|
b80597a
to
367de54
Compare
The metrics include a histogram of how long we need to wait for a GetPage request, number of reconnects, and number of requests among other things. The metrics are not yet exported anywhere, but you can query them manually.
367de54
to
175d7dd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a look on the metrics list and some aux code -- LGTM. Haven't had a look at C code, so someone might want to check it
{ | ||
/* shared memory is initialized to zeros, so nothing to do here */ | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this broke the mac OS build (CI link):
2024-09-24T12:26:48.6843180Z /Users/runner/work/neon/neon//pgxn/neon/neon_perf_counters.c:50:1: error: non-void function does not return a value [-Werror,-Wreturn-type]
2024-09-24T12:26:48.6844290Z /Applications/Xcode_15.4.app/Contents/Developer/usr/bin/make -C ../../../../src/backend generated-headers
2024-09-24T12:26:48.6892290Z }
2024-09-24T12:26:48.6892680Z make: Nothing to be done for `distprep'.
2024-09-24T12:26:48.6905160Z ^
2024-09-24T12:26:48.6905560Z make: Nothing to be done for `generated-header-symlinks'.
2024-09-24T12:26:48.6948200Z 1 error generated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The metrics include a histogram of how long we need to wait for a GetPage request, number of reconnects, and number of requests among other things.
The metrics are not yet exported anywhere, but you can query them manually.
This is what the view looks like: