railswatch_gem 0.2.1 → 0.2.3

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: a2c16032bac936ffb962e68207d32bceaaf7c778f846c5408990230f251437c9
4
- data.tar.gz: 8e3e5bd6b3a5e2f472310e80f8c3a1b3e833e86d5ff26f46817514b1fc17b34c
3
+ metadata.gz: 2bf72315894a0b5340f7b847d0a4c377137e2a9bae3940c6498dbb9f5bd7d642
4
+ data.tar.gz: 690b95a780c37b2ab7b368c8e1b8462681f4bfcdca650c56237823985286e95f
5
5
  SHA512:
6
- metadata.gz: 9f81eeb22836763653b3d19d3db9bc7731f8b9a14f3b0899f4f15a6b3a28968071aafc3a49cb2e2d7801090a8f52346a3db716fc62c465d0d813bafb032e9e61
7
- data.tar.gz: fb238c8fdafe1cc958571f3bbfa727fb2f8235570d219f68ed413ac8a879a6501305ae762b1f68d61c3b09bda4c2bd0ce7527cb71ed6b5f5d5975ab71bc7bb9e
6
+ metadata.gz: 8968464f6cb0887b97fdc5796cc6c15dd02b6dd451542d545b1c58f9726b1036415a0fc702fdd01f4e3e60b165dde57d4f98d703873e21ffcfd952b2a6888c77
7
+ data.tar.gz: 229a9d48d69681f448e24f798b1a7549258e604adc15bfd8c94f734193f8fe3813a3e830bb9850e9f8de53b1d764208b9a661601c8266a99dd942f3c07958f04
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailswatchGem
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.3"
5
5
  end
@@ -29,32 +29,27 @@ module RailswatchGem
29
29
  return unless config.enabled
30
30
  return if @started
31
31
 
32
- # 1. Initialize OpenTelemetry SDK
32
+ ENV['OTEL_EXPORTER_OTLP_PROTOCOL'] = 'http/json'
33
+ ENV['OTEL_EXPORTER_OTLP_COMPRESSION'] = 'gzip'
34
+
33
35
  OpenTelemetry::SDK.configure do |c|
34
36
  c.service_name = config.service_name
35
37
 
36
- # 2. Add the OTLP Exporter
37
- # We use BatchSpanProcessor for performance (buffers traces)
38
38
  c.add_span_processor(
39
39
  OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(
40
40
  OpenTelemetry::Exporter::OTLP::Exporter.new(
41
41
  endpoint: config.ingest_url,
42
- headers: { "X-Railswatch-Token" => config.api_key },
43
- protocol: "http_json",
44
- compression: "gzip"
42
+ headers: { "X-Railswatch-Token" => config.api_key }
45
43
  )
46
44
  )
47
45
  )
48
46
 
49
- # 3. Enable Standard Instrumentation (Rails, Sidekiq, PG, Redis, etc.)
50
47
  c.use_all
51
48
  end
52
49
 
53
- # 4. Enable Custom AI Instrumentation
54
50
  RailswatchGem::Instrumentation::OpenAI.install
55
-
56
51
  @started = true
57
- puts "[Railswatch] Observability started for #{config.service_name}"
52
+ puts "[Railswatch] Observability started for #{config.service_name} (JSON/Gzip)"
58
53
  end
59
54
  end
60
55
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railswatch_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Hammett