hephaestus 0.8.8 → 0.8.9

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: 147a21893659ce7204805de5c82711196fbe1b7e3fce13bbeddb049e9cd151b3
4
- data.tar.gz: fb39e4f9a955ae1d5925e53aaf68d3eb660d5d8858b5e49bfb9c5e9ea321b719
3
+ metadata.gz: d2ce525aec1a0e799119c58576c0620f33b61d6c4ec2e3eb720fb731fffe9f25
4
+ data.tar.gz: 73b98f732bce7334868f7f7e2cdccc67ee84df2ffd58a34140504414846b2240
5
5
  SHA512:
6
- metadata.gz: 219a46bf7606c484fd297fe8563e3122edb33af266c4b566024f67269abd5f41a09b4aa1cdb445de827865457c66f0741843fd779cda2c812d1466cf6690f2c5
7
- data.tar.gz: '049ed8fa2d285ac0c018d3a856b9d60de42be83efb25a490643aa47ac09742fd8dd94208491ae19911c563d25f0cd5ef606de914b7358de1dcfcc176d74a2165'
6
+ metadata.gz: '0874dddeb9a33837aede0dbf639ebfe7c94bc58daa24c1b16207ab6705e1f56d029c8230a8eec02f21c9a78217fcd60e12f2f534876de2a081b28e0b868e6bf8'
7
+ data.tar.gz: 5eac3b041ec6ea3ac7f2263c764b279f9aa7998e662e3f437084a383e801e812592c67561526f3afcfc8da9131feea6a1e77300ac4472bc255def552fa6e69fe
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
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
1
7
  # [v0.8.8] - 09-12-2024
2
8
  ## What's Changed
3
9
  * Filter parameter logging in jobs by @gjtorikian in https://github.com/yettoapp/hephaestus/pull/84
@@ -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
@@ -1,41 +1,53 @@
1
1
  # typed: false
2
2
  # frozen_string_literal: true
3
3
 
4
- unless Rails.env.development?
5
- # establish the environment for OTEL
6
- ENV["OTEL_EXPORTER_OTLP_ENDPOINT"] = "https://api.honeycomb.io"
4
+ # development is intentionally disabled
5
+ return if Rails.env.development?
6
+ return if defined?(Rails::Console)
7
7
 
8
- ENV["OTEL_EXPORTER_OTLP_HEADERS"] = fetch_infra_secret(
9
- label: "OTEL_EXPORTER_OTLP_HEADERS",
10
- default: "x-honeycomb-team=your-api-key",
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
- ENV["OTEL_SERVICE_NAME"] = "plug-#{plug_shortname}-#{Rails.env}"
12
+ require "opentelemetry/sdk"
13
+ require "opentelemetry/instrumentation/all"
14
+ require "opentelemetry/exporter/otlp"
15
+ require "opentelemetry/semantic_conventions"
14
16
 
15
- require "opentelemetry/sdk"
16
- require "opentelemetry/exporter/otlp"
17
- require "opentelemetry/semantic_conventions"
17
+ OpenTelemetry::SDK.configure do |c|
18
+ c.logger = Rails.logger
18
19
 
19
- OpenTelemetry::SDK.configure do |c|
20
- c.logger = Rails.logger
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
- c.use_all(
23
- "OpenTelemetry::Instrumentation::PG" => { db_statement: :obfuscate },
24
- "OpenTelemetry::Instrumentation::Rack" => { use_rack_events: false },
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
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Hephaestus
5
- VERSION = "0.8.8"
5
+ VERSION = "0.8.9"
6
6
  RAILS_VERSION = ">= 8.0"
7
7
  RUBY_VERSION = File
8
8
  .read("#{File.dirname(__FILE__)}/../../.ruby-version")
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.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-09 00:00:00.000000000 Z
11
+ date: 2024-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootsnap