-
Notifications
You must be signed in to change notification settings - Fork 80
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
Updating plugin to support latest prometheus ruby client version #180
Conversation
Looking for some feedback before giving sign-off |
if @registry.exist?(name) | ||
@registry.get(name) | ||
else | ||
@registry.gauge(name, docstring: docstring, labels: @base_labels.keys + [:plugin_id, :plugin_category, :type]) |
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.
Not really fond of duplicating the labels [:plugin_id, :plugin_category, :type]
, could be abstracted in an attribute or a method to align labels here and in labels
method line 91
. Any feedback?
Same for the 2 other monitoring plugins
1da0ab6
to
ed599a4
Compare
fluent-plugin-prometheus.gemspec
Outdated
@@ -1,6 +1,6 @@ | |||
Gem::Specification.new do |spec| | |||
spec.name = "fluent-plugin-prometheus" | |||
spec.version = "1.8.4" | |||
spec.version = "1.9.0" |
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.
Don't include version update in feature request patch.
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.
Just to be sure, you want this removed and you will yourself do a commit for version update and changelog? Or should I do another dedicated commit?
fluent-plugin-prometheus.gemspec
Outdated
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec| | |||
spec.require_paths = ["lib"] | |||
|
|||
spec.add_dependency "fluentd", ">= 1.9.1", "< 2" | |||
spec.add_dependency "prometheus-client", "< 0.10" | |||
spec.add_dependency "prometheus-client", "= 2.1.0" |
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.
=
is not recommended because users can't use bug fixed version like 2.1.1.
Use >= 2.1.0
or ~> 2.2
like pattern.
Signed-off-by: AntoineC44 <[email protected]>
ed599a4
to
8bbf46f
Compare
Hello @repeatedly, is this ok for you? |
Sorry for the delay. Just merged! |
Hello,
I would like to implement the following feature of the ruby prom client: init_label_set that would allow metric init if specified by user in
fluent.conf
.Though current
fluent-plugin-prometheus
build is blocked to old versions<0.10
of prometheus ruby client.init_label_set
method is only available in recent versions.This PR thus aims at using latest prom client version.
In detail
Please note the loss of summary metric quantiles as removed in this Pull Request on prometheus-client repo
This effectively means that any summary metric will no longer display quantile labels (e.g.
quantile="0.99"
) but onlysum
andcount
.Though personal experience on production environments showed anyway fluentd performance issues when over-using summary quantile computations. Prefer thus histograms instead - with custom buckets if needed - and computation of quantiles on prometheus server side. See the prometheus official documentation on this topic here.