-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[receiver/postgresql] clarify postgresql.backends metric semantics
#49201
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
base: main
Are you sure you want to change the base?
Changes from 8 commits
6b734ae
64bbfae
54dad14
d9d0119
c52f3c7
733588e
7dde961
ae0bf2f
3ebc2d5
c31b2e0
0608331
adc996d
05b79de
3e99d33
5d2d82e
fe9e0b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ metrics: | |
|
|
||
| ### postgresql.backends | ||
|
|
||
| The number of backends. | ||
| The number of backend processes associated with each database, as reported by `pg_stat_activity`. Counts backends across all connection states (active, idle, idle-in-transaction) and all backend types, including non-client backends such as autovacuum and parallel workers. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I try to follow the rule of not disclosing the underlying datasoruce in documentation. How about: "The number of backend processes associated with each database. Counts backends across all connection states (active, idle, idle-in-transaction) and all backend types, including non-client backends such as autovacuum and parallel workers." - {in all relevant places in the MR} |
||
|
|
||
| | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | Stability | | ||
| | ---- | ----------- | ---------- | ----------------------- | --------- | --------- | | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Heads up — the generated files (generated_package_test.go, generated_logs.go, generated_logs_test.go, generated_metrics.go, generated_resource_test.go) have import reordering where standard library packages ended up below third-party imports, which can cause CI lint failures. What I do is run make generate from within receiver/postgresqlreceiver/ — that runs mdatagen and then applies gofumpt, goimports, and gci to fix import ordering automatically. If you only ran go generate ./... or make mdatagen, those formatting steps get skipped. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 README paragraph is more of an extended explanation for users, and while it's debatable there, I'd still lean toward removing the explicit pg_stat_activity reference from the README too, since the review guidelines are clear about this.
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.
Agreed. The only reason it was added here was because of the presence of
pg_stat_activity. It makes sense to remove it from here since its an internal detail.