govuk_app_config 9.23.10 → 9.24.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: e62009211dbfe4a9662418df8a391742846ff1f80ea79a78885b848c69f71089
4
- data.tar.gz: e973c77ec2afe8b2a97a5be508e513ed998bcf63c9e990b67932025b8829335c
3
+ metadata.gz: 79ba460ce5bf7e2b95104ca48f334cb8262fde5f31f0b302047ca61ffef0b16b
4
+ data.tar.gz: d2290e462a1dcf5a808ba268918699a98832f845353b33b8ddbb393b2e644fad
5
5
  SHA512:
6
- metadata.gz: f9876f187ac01a960e48e6a88c537d0d0370f030b0845702a6c584e1ca49750a62eed742be98329ce188c334987e9aab07245001897c0c873088ae1e44ab5b82
7
- data.tar.gz: 143a8a89f3e04850ae5a162b6cbb98c14e74a1b9096738b244892bf76fa4df2072b72e3cdb58fe0727af1916b4fc868cd1314e12d869919a8fce071788674800
6
+ metadata.gz: cf383c42236cfd7df4ddaf20e1b1e52a03cde2018342eb71dd7427583ade0d83e5d1929d8d354da2e641323fb363cd702d814a8da92143de7c17a0f2167450a7
7
+ data.tar.gz: fb7e48fe9ef8039a22415c264ef3efa638086432da5761de2589ea0a5dabd1eb76f0f54f6b045226dabe8d60d7613388967b0a1ed38bb1bf8314f3c5c3c5e753
data/CHANGELOG.md CHANGED
@@ -1,4 +1,14 @@
1
+ # 9.24.0
2
+
3
+ * Make OpenTelemetry service name configurable via environment variable `GOVUK_OTEL_SERVICE_NAME`
4
+
5
+ # 9.23.11
6
+
7
+ * Fix dual boot of Logstasher configuration
8
+ * Add request_uri to rails log fields
9
+
1
10
  # 9.23.10
11
+
2
12
  * Set dependency cooldowns in Dependabot
3
13
 
4
14
  # 9.23.9
@@ -16,6 +16,10 @@ module GovukJsonLogging
16
16
  end
17
17
 
18
18
  def self.configure(&block)
19
+ return if @configured
20
+
21
+ @configured = true
22
+
19
23
  # Fixes the monkey patch from the logstasher gem to support Rails 7
20
24
  config = Rails.application.config.logstasher
21
25
  if (!config.controller_monkey_patch && config.controller_monkey_patch != false) || config.controller_monkey_patch == true
@@ -52,6 +56,7 @@ module GovukJsonLogging
52
56
  # Mirrors Nginx request logging, e.g. GET /path/here HTTP/1.1
53
57
  fields[:request] = "#{request.request_method} #{request.fullpath} #{request.headers['SERVER_PROTOCOL']}"
54
58
 
59
+ fields[:request_uri] = request.fullpath
55
60
  fields[:govuk_request_id] = request.headers["GOVUK-Request-Id"]
56
61
  fields[:varnish_id] = request.headers["X-Varnish"]
57
62
  fields[:govuk_app_config] = GovukAppConfig::VERSION
@@ -20,7 +20,8 @@ module GovukAppConfig
20
20
  class Railtie < Rails::Railtie
21
21
  initializer "govuk_app_config.configure_open_telemetry" do |app|
22
22
  unless Rails.const_defined?(:Console)
23
- GovukOpenTelemetry.configure(app.class.module_parent_name.underscore)
23
+ service_name = ENV["GOVUK_OTEL_SERVICE_NAME"] || app.class.module_parent_name.underscore
24
+ GovukOpenTelemetry.configure(service_name)
24
25
  end
25
26
  end
26
27
 
@@ -1,3 +1,3 @@
1
1
  module GovukAppConfig
2
- VERSION = "9.23.10".freeze
2
+ VERSION = "9.24.0".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_app_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.23.10
4
+ version: 9.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev