govuk_app_config 9.1.0 → 9.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b294855ddebc514295005646929b0097f632fee29abca5e5bcfcf8762fa6a074
4
- data.tar.gz: 5001db9a6a2ea18b55337fa58ffc43698949201644f0274c337468c0228b7220
3
+ metadata.gz: a879f92fed2a4b6f098a3a1bbd367853413b3314c4d45f3d38802897cc9ecc68
4
+ data.tar.gz: 2dcd94fb037f6799cf9ce5229cb3ba6b7e391063091c3f3a65e4085d5eab9195
5
5
  SHA512:
6
- metadata.gz: 5f022124d42f44d65e8b34f47451b2bed770340690529983d9277cf2d5f747d85400b7061048c64e0e9c1b5c040c975b0421bb1143bca052736ffa4e75e6557f
7
- data.tar.gz: 80af52848ba6276c0103bb6f7b32830b5cd4ca8fda42b2e4cb682dbce4ea958fd761c394b5864f3ea450f19e85197ccd0fadbd18c921cfee8783bb196a12a650
6
+ metadata.gz: cab7cd78d7ffd83c19e37ad9bcd7865b3c1d7731baf1dd607556d3a758e99288b56186786fa20789011fc84f340e83caa7df6c1d9324c63d934f9b15733e6003
7
+ data.tar.gz: c547b53fca4fa5ad8f9f4444451dd8facc04bfcbe2312dfe5f591ac6236c6df90f9c49c7d0c3ab2a2cdcd25336b50ab3b23711cf137804286040e1b39b383d0d
@@ -20,7 +20,7 @@ jobs:
20
20
  ruby: ['3.0', 3.1, 3.2]
21
21
  runs-on: ubuntu-latest
22
22
  steps:
23
- - uses: actions/checkout@v3
23
+ - uses: actions/checkout@v4
24
24
  with:
25
25
  ref: ${{ inputs.ref || github.ref }}
26
26
  - uses: ruby/setup-ruby@v1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 9.2.0
2
+
3
+ * Default to Prometheus histograms, not summaries ([#318](https://github.com/alphagov/govuk_app_config/pull/318))
4
+
1
5
  # 9.1.0
2
6
 
3
7
  * GovukAppConfig silences OpenTelemetry log output when running a rake task ([#311](https://github.com/alphagov/govuk_app_config/pull/311))
@@ -1,3 +1,8 @@
1
+ require "prometheus_exporter"
2
+ require "prometheus_exporter/metric"
3
+ require "prometheus_exporter/server"
4
+ require "prometheus_exporter/middleware"
5
+
1
6
  module GovukPrometheusExporter
2
7
  def self.should_configure
3
8
  # Allow us to force the Prometheus Exporter for persistent Rake tasks...
@@ -11,12 +16,14 @@ module GovukPrometheusExporter
11
16
  end
12
17
  end
13
18
 
14
- def self.configure(collectors: [])
19
+ def self.configure(collectors: [], default_aggregation: PrometheusExporter::Metric::Histogram)
15
20
  return unless should_configure
16
21
 
17
- require "prometheus_exporter"
18
- require "prometheus_exporter/server"
19
- require "prometheus_exporter/middleware"
22
+ # PrometheusExporter::Metric::Histogram.DEFAULT_BUCKETS tops out at 10 but
23
+ # we have a few controller actions which are slower than this, so we add a
24
+ # few extra buckets for slower requests
25
+ PrometheusExporter::Metric::Histogram.default_buckets = [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10, 15, 25, 50].freeze
26
+ PrometheusExporter::Metric::Base.default_aggregation = default_aggregation
20
27
 
21
28
  if defined?(Sidekiq)
22
29
  Sidekiq.configure_server do |config|
@@ -1,3 +1,3 @@
1
1
  module GovukAppConfig
2
- VERSION = "9.1.0".freeze
2
+ VERSION = "9.2.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_app_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.1.0
4
+ version: 9.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-08 00:00:00.000000000 Z
11
+ date: 2023-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstasher