mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 06:11:41 +00:00
prometheus_exporter compatible con symbol-fstring
This commit is contained in:
parent
695e591644
commit
76d3935c6f
2 changed files with 12 additions and 0 deletions
|
@ -68,6 +68,7 @@ RUN rm -rf ./node_modules ./tmp/cache ./.git ./test ./doc
|
||||||
USER root
|
USER root
|
||||||
RUN apk add --no-cache findutils
|
RUN apk add --no-cache findutils
|
||||||
RUN find /home/app/checkout/vendor/ruby/2.7.0 -maxdepth 3 -type d -name test -o -name spec -o -name rubocop | xargs -r rm -rf
|
RUN find /home/app/checkout/vendor/ruby/2.7.0 -maxdepth 3 -type d -name test -o -name spec -o -name rubocop | xargs -r rm -rf
|
||||||
|
RUN cd /home/app/checkout/vendor/ruby/2.7.0/gems/prometheus_exporter-0.5.3 && patch -Np 0 -i /home/app/checkout/prom.patch
|
||||||
|
|
||||||
# Contenedor final
|
# Contenedor final
|
||||||
FROM sutty/monit:latest
|
FROM sutty/monit:latest
|
||||||
|
|
11
prom.patch
Normal file
11
prom.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- lib/prometheus_exporter/instrumentation/active_record.rb.orig 2020-10-05 19:06:08.912325451 -0300
|
||||||
|
+++ lib/prometheus_exporter/instrumentation/active_record.rb 2020-10-05 19:06:12.229036702 -0300
|
||||||
|
@@ -69,7 +69,7 @@
|
||||||
|
|
||||||
|
labels_from_config = pool.spec.config
|
||||||
|
.select { |k, v| @config_labels.include? k }
|
||||||
|
- .map { |k, v| [k.to_s.prepend("dbconfig_"), v] }
|
||||||
|
+ .map { |k, v| [k.to_s.dup.prepend("dbconfig_"), v] }
|
||||||
|
|
||||||
|
labels = @metric_labels.merge(pool_name: pool.spec.name).merge(Hash[labels_from_config])
|
||||||
|
|
Loading…
Reference in a new issue