govuk_app_config 9.15.8 → 9.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/govuk_app_config/govuk_prometheus_exporter.rb +14 -6
- data/lib/govuk_app_config/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb44777e2f99d4cd18095e308a9f907bd870292c2c500f30ba36c4c3e23730ea
|
4
|
+
data.tar.gz: 8578bbd300c3febc4453c5ca199477aa15dfd014c16151980b9d052768601aa6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42b060b29d1138587a0c7078d2be9150c37238b06f158256e28c84054faf48e3aed652821d92a200440a6322da9b11dee666ed078c8df5d68891dff76d139551
|
7
|
+
data.tar.gz: 62145bed7d6c5a2235abae4f5f69c7b6eaa6b11f939975001e8f97231fbbf2c694c40bb982fb8597d6cae9e90678eb719bb1c2126cef72acb6a349438608343f
|
data/CHANGELOG.md
CHANGED
@@ -4,13 +4,13 @@ require "prometheus_exporter/server"
|
|
4
4
|
require "prometheus_exporter/middleware"
|
5
5
|
|
6
6
|
module GovukPrometheusExporter
|
7
|
-
#
|
8
|
-
# See https://github.com/discourse/prometheus_exporter/pull/293
|
9
|
-
#
|
10
|
-
# RailsMiddleware can be removed and replaced with the default middleware if
|
11
|
-
# that PR is merged / released
|
12
|
-
#
|
13
7
|
class RailsMiddleware < PrometheusExporter::Middleware
|
8
|
+
#
|
9
|
+
# See https://github.com/discourse/prometheus_exporter/pull/293
|
10
|
+
#
|
11
|
+
# default_labels can be removed and fall through to the base method if
|
12
|
+
# that PR is merged / released
|
13
|
+
#
|
14
14
|
def default_labels(env, _result)
|
15
15
|
controller_instance = env["action_controller.instance"]
|
16
16
|
action = controller = nil
|
@@ -28,6 +28,10 @@ module GovukPrometheusExporter
|
|
28
28
|
controller: controller || "other",
|
29
29
|
}
|
30
30
|
end
|
31
|
+
|
32
|
+
def custom_labels(env)
|
33
|
+
env.fetch("govuk.prometheus_labels", {})
|
34
|
+
end
|
31
35
|
end
|
32
36
|
|
33
37
|
class SinatraMiddleware < PrometheusExporter::Middleware
|
@@ -39,6 +43,10 @@ module GovukPrometheusExporter
|
|
39
43
|
# the application / pod and don't provide any other labels
|
40
44
|
{}
|
41
45
|
end
|
46
|
+
|
47
|
+
def custom_labels(env)
|
48
|
+
env.fetch("govuk.prometheus_labels", {})
|
49
|
+
end
|
42
50
|
end
|
43
51
|
|
44
52
|
def self.should_configure
|