hephaestus 0.8.7.5 → 0.8.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/config/initializers/environment.rb +2 -0
- data/config/initializers/filter_job_params.rb +22 -0
- data/config/initializers/opentelemetry.rb +42 -30
- data/lib/hephaestus/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2ce525aec1a0e799119c58576c0620f33b61d6c4ec2e3eb720fb731fffe9f25
|
4
|
+
data.tar.gz: 73b98f732bce7334868f7f7e2cdccc67ee84df2ffd58a34140504414846b2240
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0874dddeb9a33837aede0dbf639ebfe7c94bc58daa24c1b16207ab6705e1f56d029c8230a8eec02f21c9a78217fcd60e12f2f534876de2a081b28e0b868e6bf8'
|
7
|
+
data.tar.gz: 5eac3b041ec6ea3ac7f2263c764b279f9aa7998e662e3f437084a383e801e812592c67561526f3afcfc8da9131feea6a1e77300ac4472bc255def552fa6e69fe
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
# [v0.8.9] - 10-12-2024
|
2
|
+
## What's Changed
|
3
|
+
* Point OpenTelemetry to internal service by @gjtorikian in https://github.com/yettoapp/hephaestus/pull/86
|
4
|
+
|
5
|
+
|
6
|
+
**Full Changelog**: https://github.com/yettoapp/hephaestus/compare/v0.8.8...v0.8.9
|
7
|
+
# [v0.8.8] - 09-12-2024
|
8
|
+
## What's Changed
|
9
|
+
* Filter parameter logging in jobs by @gjtorikian in https://github.com/yettoapp/hephaestus/pull/84
|
10
|
+
|
11
|
+
|
12
|
+
**Full Changelog**: https://github.com/yettoapp/hephaestus/compare/v0.8.7.5...v0.8.8
|
1
13
|
# [v0.8.7.5] - 05-12-2024
|
2
14
|
**Full Changelog**: https://github.com/yettoapp/hephaestus/compare/v0.8.7.4...v0.8.7.5
|
3
15
|
# [v0.8.7.4] - 05-12-2024
|
@@ -106,6 +106,8 @@ module Hephaestus
|
|
106
106
|
["Common"].each do |section_label|
|
107
107
|
res["fields"].select { |f| f["section"] && f["section"]["label"] }.each do |field|
|
108
108
|
next unless field["section"]["label"] == section_label
|
109
|
+
# exclude DATABASE_URL because it's been retrieved already in the plug boot up
|
110
|
+
next if field["label"].include?("DATABASE_URL")
|
109
111
|
|
110
112
|
load_infra_secret(field)
|
111
113
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
# ActiveJob logs the arguments passed to the job. This initializer filters out sensitive information from the logs.
|
5
|
+
# cf. https://github.com/rails/rails/pull/34438#issuecomment-2336749226
|
6
|
+
Rails.application.config.after_initialize do
|
7
|
+
require "active_job/log_subscriber"
|
8
|
+
module ActiveJob
|
9
|
+
class LogSubscriber < ActiveSupport::LogSubscriber
|
10
|
+
alias_method :original_format, :format
|
11
|
+
|
12
|
+
private def format(arg)
|
13
|
+
if arg.is_a?(Hash)
|
14
|
+
parameter_filter = ActiveSupport::ParameterFilter.new(Rails.application.config.filter_parameters)
|
15
|
+
parameter_filter.filter(arg.transform_values { |value| original_format(value) })
|
16
|
+
else
|
17
|
+
original_format(arg)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -1,41 +1,53 @@
|
|
1
1
|
# typed: false
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
# development is intentionally disabled
|
5
|
+
return if Rails.env.development?
|
6
|
+
return if defined?(Rails::Console)
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
)
|
8
|
+
# establish the environment for OTEL
|
9
|
+
ENV["OTEL_EXPORTER_OTLP_ENDPOINT"] = "http://service-otelcol-#{Rails.env}.internal:4318"
|
10
|
+
ENV["OTEL_SERVICE_NAME"] = "plug-#{plug_shortname}-#{Rails.env}"
|
12
11
|
|
13
|
-
|
12
|
+
require "opentelemetry/sdk"
|
13
|
+
require "opentelemetry/instrumentation/all"
|
14
|
+
require "opentelemetry/exporter/otlp"
|
15
|
+
require "opentelemetry/semantic_conventions"
|
14
16
|
|
15
|
-
|
16
|
-
|
17
|
-
require "opentelemetry/semantic_conventions"
|
17
|
+
OpenTelemetry::SDK.configure do |c|
|
18
|
+
c.logger = Rails.logger
|
18
19
|
|
19
|
-
|
20
|
-
|
20
|
+
##### Instruments
|
21
|
+
c.use("OpenTelemetry::Instrumentation::Rack", { use_rack_events: false })
|
22
|
+
c.use("OpenTelemetry::Instrumentation::ActionPack")
|
23
|
+
c.use("OpenTelemetry::Instrumentation::ActionView")
|
24
|
+
c.use("OpenTelemetry::Instrumentation::ActiveJob")
|
25
|
+
c.use("OpenTelemetry::Instrumentation::ActiveRecord")
|
26
|
+
c.use("OpenTelemetry::Instrumentation::AwsSdk")
|
27
|
+
c.use("OpenTelemetry::Instrumentation::ConcurrentRuby")
|
28
|
+
c.use("OpenTelemetry::Instrumentation::Faraday")
|
29
|
+
c.use("OpenTelemetry::Instrumentation::HttpClient")
|
30
|
+
c.use("OpenTelemetry::Instrumentation::Net::HTTP")
|
31
|
+
c.use("OpenTelemetry::Instrumentation::PG", {
|
32
|
+
# By default, this instrumentation includes the executed SQL as the `db.statement`
|
33
|
+
# semantic attribute. Optionally, you may disable the inclusion of this attribute entirely by
|
34
|
+
# setting this option to :omit or sanitize the attribute by setting to :obfuscate
|
35
|
+
db_statement: :obfuscate,
|
36
|
+
})
|
37
|
+
c.use("OpenTelemetry::Instrumentation::Rails")
|
38
|
+
c.use("OpenTelemetry::Instrumentation::RestClient")
|
21
39
|
|
22
|
-
|
23
|
-
|
24
|
-
|
40
|
+
if !productionish?
|
41
|
+
c.add_span_processor(
|
42
|
+
OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(
|
43
|
+
OpenTelemetry::Exporter::OTLP::Exporter.new,
|
44
|
+
),
|
45
|
+
)
|
46
|
+
else # useful for testing instrumentation
|
47
|
+
c.add_span_processor(
|
48
|
+
OpenTelemetry::SDK::Trace::Export::SimpleSpanProcessor.new(
|
49
|
+
OpenTelemetry::SDK::Trace::Export::SpanExporter.new,
|
50
|
+
),
|
25
51
|
)
|
26
|
-
|
27
|
-
if productionish?
|
28
|
-
c.add_span_processor(
|
29
|
-
OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(
|
30
|
-
OpenTelemetry::Exporter::OTLP::Exporter.new,
|
31
|
-
),
|
32
|
-
)
|
33
|
-
else # useful for testing instrumentation
|
34
|
-
c.add_span_processor(
|
35
|
-
OpenTelemetry::SDK::Trace::Export::SimpleSpanProcessor.new(
|
36
|
-
OpenTelemetry::SDK::Trace::Export::SpanExporter.new,
|
37
|
-
),
|
38
|
-
)
|
39
|
-
end # development is intentionally disabled
|
40
52
|
end
|
41
53
|
end
|
data/lib/hephaestus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hephaestus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootsnap
|
@@ -436,6 +436,7 @@ files:
|
|
436
436
|
- config/initializers/application.rb
|
437
437
|
- config/initializers/cors.rb
|
438
438
|
- config/initializers/environment.rb
|
439
|
+
- config/initializers/filter_job_params.rb
|
439
440
|
- config/initializers/filter_parameter_logging.rb
|
440
441
|
- config/initializers/inflections.rb
|
441
442
|
- config/initializers/lograge.rb
|