hephaestus 0.8.8 → 0.8.9.1

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: 7f38a5f40fcd9c413ca5f8de2c68d028fcc26b18008b7e49e0a9df07f69247c5
4
+ data.tar.gz: 00dbd4c3c932a46a7e8cbbfa1612d88ac850a86025cc8eac9ab1445a7bdf94e7
5
5
  SHA512:
6
- metadata.gz: 219a46bf7606c484fd297fe8563e3122edb33af266c4b566024f67269abd5f41a09b4aa1cdb445de827865457c66f0741843fd779cda2c812d1466cf6690f2c5
7
- data.tar.gz: '049ed8fa2d285ac0c018d3a856b9d60de42be83efb25a490643aa47ac09742fd8dd94208491ae19911c563d25f0cd5ef606de914b7358de1dcfcc176d74a2165'
6
+ metadata.gz: 298b2aa68ed5e09d3b65865ecae50cbadeba8c450ae3b89a9ba98b0e473d66413ddd8484f33cdabfeab8cf35915797388e744def725ef171cd7d13ffdfef4ffc
7
+ data.tar.gz: b00957880a17e27ecbae69df9d1849b068fe816d2aa23f82baf73fe63902e21ec5981f9c2ba92793847a6560bcedb6fcaa9be16b8a5638bfdff0b2d29406cae7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # [v0.8.9.1] - 10-12-2024
2
+ **Full Changelog**: https://github.com/yettoapp/hephaestus/compare/v0.8.9...v0.8.9.1
3
+ # [v0.8.9] - 10-12-2024
4
+ ## What's Changed
5
+ * Point OpenTelemetry to internal service by @gjtorikian in https://github.com/yettoapp/hephaestus/pull/86
6
+
7
+
8
+ **Full Changelog**: https://github.com/yettoapp/hephaestus/compare/v0.8.8...v0.8.9
1
9
  # [v0.8.8] - 09-12-2024
2
10
  ## What's Changed
3
11
  * 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,54 @@
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_EXPORTER_OTLP_HEADERS"] = "x-honeycomb-dataset=plug-#{plug_shortname}-#{Rails.env}"
11
+ ENV["OTEL_SERVICE_NAME"] = "plug-#{plug_shortname}-#{Rails.env}"
12
12
 
13
- ENV["OTEL_SERVICE_NAME"] = "plug-#{plug_shortname}-#{Rails.env}"
13
+ require "opentelemetry/sdk"
14
+ require "opentelemetry/instrumentation/all"
15
+ require "opentelemetry/exporter/otlp"
16
+ require "opentelemetry/semantic_conventions"
14
17
 
15
- require "opentelemetry/sdk"
16
- require "opentelemetry/exporter/otlp"
17
- require "opentelemetry/semantic_conventions"
18
+ OpenTelemetry::SDK.configure do |c|
19
+ c.logger = Rails.logger
18
20
 
19
- OpenTelemetry::SDK.configure do |c|
20
- c.logger = Rails.logger
21
+ ##### Instruments
22
+ c.use("OpenTelemetry::Instrumentation::Rack", { use_rack_events: false })
23
+ c.use("OpenTelemetry::Instrumentation::ActionPack")
24
+ c.use("OpenTelemetry::Instrumentation::ActionView")
25
+ c.use("OpenTelemetry::Instrumentation::ActiveJob")
26
+ c.use("OpenTelemetry::Instrumentation::ActiveRecord")
27
+ c.use("OpenTelemetry::Instrumentation::AwsSdk")
28
+ c.use("OpenTelemetry::Instrumentation::ConcurrentRuby")
29
+ c.use("OpenTelemetry::Instrumentation::Faraday")
30
+ c.use("OpenTelemetry::Instrumentation::HttpClient")
31
+ c.use("OpenTelemetry::Instrumentation::Net::HTTP")
32
+ c.use("OpenTelemetry::Instrumentation::PG", {
33
+ # By default, this instrumentation includes the executed SQL as the `db.statement`
34
+ # semantic attribute. Optionally, you may disable the inclusion of this attribute entirely by
35
+ # setting this option to :omit or sanitize the attribute by setting to :obfuscate
36
+ db_statement: :obfuscate,
37
+ })
38
+ c.use("OpenTelemetry::Instrumentation::Rails")
39
+ c.use("OpenTelemetry::Instrumentation::RestClient")
21
40
 
22
- c.use_all(
23
- "OpenTelemetry::Instrumentation::PG" => { db_statement: :obfuscate },
24
- "OpenTelemetry::Instrumentation::Rack" => { use_rack_events: false },
41
+ if !productionish?
42
+ c.add_span_processor(
43
+ OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(
44
+ OpenTelemetry::Exporter::OTLP::Exporter.new,
45
+ ),
46
+ )
47
+ else # useful for testing instrumentation
48
+ c.add_span_processor(
49
+ OpenTelemetry::SDK::Trace::Export::SimpleSpanProcessor.new(
50
+ OpenTelemetry::SDK::Trace::Export::SpanExporter.new,
51
+ ),
25
52
  )
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
53
  end
41
54
  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.1"
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.1
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