From 76d3935c6f189e3f1ee4ba1563fc383ecb77b836 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 5 Oct 2020 19:12:20 -0300 Subject: [PATCH] prometheus_exporter compatible con symbol-fstring --- Dockerfile | 1 + prom.patch | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 prom.patch diff --git a/Dockerfile b/Dockerfile index 3e37014..00c8c9f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -68,6 +68,7 @@ RUN rm -rf ./node_modules ./tmp/cache ./.git ./test ./doc USER root 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 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 FROM sutty/monit:latest diff --git a/prom.patch b/prom.patch new file mode 100644 index 0000000..27c1d4a --- /dev/null +++ b/prom.patch @@ -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]) +