-
Notifications
You must be signed in to change notification settings - Fork 12
PMM-11984: Add new metrics pg_available_extensions
and pg_extensions
to expose info about available extensions and installed extensions accordingly
#117
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
Conversation
…ns` to expose info about available extensions and installed extensions accordingly
"Extensions that are available for installation", | ||
[]string{ | ||
"name", | ||
"default_version", |
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.
what does it mean default? used? I think we need a better name 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.
these lablels are copies of column names from the table from which we fetch these metrics.
I believe it means if you install this extensions and not specify the version this default version will be used.
collector/pg_extensions.go
Outdated
"pg_extensions", | ||
"Installed extensions", | ||
[]string{ | ||
"extname", |
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.
why ext prefixes?
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.
probably it means 'extension'
removed it
collector/pg_extensions.go
Outdated
ch <- prometheus.MustNewConstMetric( | ||
pgExtensions["pg_extensions"], | ||
prometheus.GaugeValue, 1, | ||
extname, strconv.FormatBool(extrelocatable), extversion, |
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.
how about putting each param on it's own line?
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.
formatted
), | ||
} | ||
|
||
type ExtensionsCollector struct { |
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.
how about checking that struct implements interface?
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.
added it
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.
pls see my questions
…nsions-metrics' into PMM-11984-add-collector-for-extensions-metrics
FB: Percona-Lab/pmm-submodules#3258