govuk_app_config 8.0.2 → 8.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +3 -0
- data/govuk_app_config.gemspec +4 -1
- data/lib/govuk_app_config/govuk_open_telemetry.rb +18 -0
- data/lib/govuk_app_config/railtie.rb +4 -0
- data/lib/govuk_app_config/version.rb +1 -1
- data/lib/govuk_app_config.rb +1 -0
- metadata +48 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3d7236b119d0f93a720288c9ca9ee559324fed80472261aa049472dcc7a11f4
|
4
|
+
data.tar.gz: 1803d31e9fa99656514c4c127ae9d230af8dd2eae95791432d547f8604575009
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1674b3b5655bf2fa492cbcd644eff15b3effe83fb504d5bd8f9428dfe404e1b2130626dbc88fa0b63674cd0313a8fa80b0592a61a547aa36f3984f5c2b837f27
|
7
|
+
data.tar.gz: 9676dea638fcad4895d510570a9cebf173a463cd65cc1190ec6e7029a2d521b343efd353bd1990bdbb50228d7a5eeddeda62289133c019a443d5115d31e84d66
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -104,6 +104,9 @@ end
|
|
104
104
|
|
105
105
|
`GovukError.configure` has the same options as the Sentry client, Raven. See [the Raven docs for all configuration options](https://docs.sentry.io/clients/ruby/config).
|
106
106
|
|
107
|
+
## Open Telemetry
|
108
|
+
|
109
|
+
To enable Open Telemetry instrumentation for Rails set the ENABLE_OPEN_TELEMETRY="true" environment variable.
|
107
110
|
|
108
111
|
## Prometheus monitoring
|
109
112
|
|
data/govuk_app_config.gemspec
CHANGED
@@ -21,6 +21,9 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.require_paths = %w[lib]
|
22
22
|
|
23
23
|
spec.add_dependency "logstasher", "~> 2.1"
|
24
|
+
spec.add_dependency "opentelemetry-exporter-otlp", "~> 0.25.0"
|
25
|
+
spec.add_dependency "opentelemetry-instrumentation-all", "~> 0.39.1"
|
26
|
+
spec.add_dependency "opentelemetry-sdk", "~> 1.2"
|
24
27
|
spec.add_dependency "plek", ">= 4", "< 6"
|
25
28
|
spec.add_dependency "prometheus_exporter", "~> 2.0"
|
26
29
|
spec.add_dependency "puma", ">= 5.6", "< 7.0"
|
@@ -36,6 +39,6 @@ Gem::Specification.new do |spec|
|
|
36
39
|
spec.add_development_dependency "rake", "~> 13.0"
|
37
40
|
spec.add_development_dependency "rspec", "~> 3.10"
|
38
41
|
spec.add_development_dependency "rspec-its", "~> 1.3"
|
39
|
-
spec.add_development_dependency "rubocop-govuk", "4.
|
42
|
+
spec.add_development_dependency "rubocop-govuk", "4.11.0"
|
40
43
|
spec.add_development_dependency "webmock"
|
41
44
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module GovukOpenTelemetry
|
2
|
+
def self.should_configure?
|
3
|
+
ENV["ENABLE_OPEN_TELEMETRY"] == "true"
|
4
|
+
end
|
5
|
+
|
6
|
+
def self.configure(service_name)
|
7
|
+
return unless should_configure?
|
8
|
+
|
9
|
+
require "opentelemetry/sdk"
|
10
|
+
require "opentelemetry/exporter/otlp"
|
11
|
+
require "opentelemetry/instrumentation/all"
|
12
|
+
|
13
|
+
OpenTelemetry::SDK.configure do |config|
|
14
|
+
config.service_name = service_name
|
15
|
+
config.use_all # enables all instrumentation!
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -8,6 +8,10 @@ module GovukAppConfig
|
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
|
+
initializer "govuk_app_config.configure_open_telemetry" do |app|
|
12
|
+
GovukOpenTelemetry.configure(app.class.module_parent_name.underscore)
|
13
|
+
end
|
14
|
+
|
11
15
|
config.before_initialize do
|
12
16
|
GovukLogging.configure if Rails.env.production?
|
13
17
|
end
|
data/lib/govuk_app_config.rb
CHANGED
@@ -3,6 +3,7 @@ require "govuk_app_config/govuk_statsd"
|
|
3
3
|
require "govuk_app_config/govuk_error"
|
4
4
|
require "govuk_app_config/govuk_proxy/static_proxy"
|
5
5
|
require "govuk_app_config/govuk_healthcheck"
|
6
|
+
require "govuk_app_config/govuk_open_telemetry"
|
6
7
|
require "govuk_app_config/govuk_prometheus_exporter"
|
7
8
|
|
8
9
|
if defined?(Rails)
|
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: 8.0
|
4
|
+
version: 8.1.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-
|
11
|
+
date: 2023-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstasher
|
@@ -24,6 +24,48 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: opentelemetry-exporter-otlp
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.25.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.25.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: opentelemetry-instrumentation-all
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.39.1
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.39.1
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: opentelemetry-sdk
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.2'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.2'
|
27
69
|
- !ruby/object:Gem::Dependency
|
28
70
|
name: plek
|
29
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -238,14 +280,14 @@ dependencies:
|
|
238
280
|
requirements:
|
239
281
|
- - '='
|
240
282
|
- !ruby/object:Gem::Version
|
241
|
-
version: 4.
|
283
|
+
version: 4.11.0
|
242
284
|
type: :development
|
243
285
|
prerelease: false
|
244
286
|
version_requirements: !ruby/object:Gem::Requirement
|
245
287
|
requirements:
|
246
288
|
- - '='
|
247
289
|
- !ruby/object:Gem::Version
|
248
|
-
version: 4.
|
290
|
+
version: 4.11.0
|
249
291
|
- !ruby/object:Gem::Dependency
|
250
292
|
name: webmock
|
251
293
|
requirement: !ruby/object:Gem::Requirement
|
@@ -295,6 +337,7 @@ files:
|
|
295
337
|
- lib/govuk_app_config/govuk_healthcheck/redis.rb
|
296
338
|
- lib/govuk_app_config/govuk_healthcheck/sidekiq_redis.rb
|
297
339
|
- lib/govuk_app_config/govuk_logging.rb
|
340
|
+
- lib/govuk_app_config/govuk_open_telemetry.rb
|
298
341
|
- lib/govuk_app_config/govuk_prometheus_exporter.rb
|
299
342
|
- lib/govuk_app_config/govuk_proxy/static_proxy.rb
|
300
343
|
- lib/govuk_app_config/govuk_puma.rb
|
@@ -321,7 +364,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
321
364
|
- !ruby/object:Gem::Version
|
322
365
|
version: '0'
|
323
366
|
requirements: []
|
324
|
-
rubygems_version: 3.4.
|
367
|
+
rubygems_version: 3.4.15
|
325
368
|
signing_key:
|
326
369
|
specification_version: 4
|
327
370
|
summary: Base configuration for GOV.UK applications
|