apm_bro 0.1.17 → 0.1.18

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: 2fde98f2cfbdbc149e9a10f3000a56c14fb35238bd09e0dba8b7cb17db7095b2
4
- data.tar.gz: 7b995dbae659d5e24982c1c2da7b2b50e644ca4b275bbc5fef410118bfc6a385
3
+ metadata.gz: 235bb0964fa7bad2508335a33a743a3d7202757523660570b9a0aaa31ab36a41
4
+ data.tar.gz: b75c946a211a2da589e9a05534d70669ef296cc15be3d753d349e5ff6367eb5e
5
5
  SHA512:
6
- metadata.gz: bcb1b5ce3f643b0b7ef971c3a219884892741664beefa28ae6c4111076e9eb393f8b10840ba655835061f9a481f07c35fc234f9e0bd787bcbceb150a08f0ba11
7
- data.tar.gz: 9f88694746c9ac3ba2dc463481ca26796bd04306817a44b44e7a596ea2c94aad4f7bb4d84c6cffa0470b614ba09b6da47379d8ce0325b3cc9e1f191fe949c830
6
+ metadata.gz: 96b1f310fe50eec5072e1ac93f96108a342ab60d85aef80635ead30044174469b39979d766d69b54b767ae259be712d40fb7fd05dafc21f701deef6923e721a0
7
+ data.tar.gz: 891c797268cfb6910bf3ddfd5e139586f1c1aa4002002edf2d63287c6548374d7798d079eb94de8fa4857cf7cecf995fcea2eefd224f591e243eec8f306e79c6
@@ -59,9 +59,10 @@ module ApmBro
59
59
  end
60
60
 
61
61
  def make_http_request(event_name, payload, api_key)
62
+ production_url = ENV["USE_STAGING_ENDPOINT"].present? ? "https://deadbro.aberatii.com/apm/v1/metrics" : "https://www.deadbro.com/apm/v1/metrics"
62
63
  endpoint_url = (@configuration.respond_to?(:ruby_dev) && @configuration.ruby_dev) ?
63
64
  "http://localhost:3100/apm/v1/metrics" :
64
- "https://www.deadbro.com/apm/v1/metrics"
65
+ production_url
65
66
 
66
67
  uri = URI.parse(endpoint_url)
67
68
  http = Net::HTTP.new(uri.host, uri.port)
@@ -38,7 +38,7 @@ module ApmBro
38
38
 
39
39
  # Skip instrumentation for our own APM endpoint to prevent infinite loops,
40
40
  # but do NOT alter the original method's return value/control flow.
41
- skip_instrumentation = uri && (uri.to_s.include?("localhost") || uri.to_s.include?("uptime.aberatii.com"))
41
+ skip_instrumentation = uri && (uri.to_s.include?("localhost") || uri.to_s.include?("aberatii.com"))
42
42
 
43
43
  unless skip_instrumentation
44
44
  payload = {
@@ -85,7 +85,7 @@ module ApmBro
85
85
 
86
86
  # Skip instrumentation for our own APM endpoint to prevent infinite loops,
87
87
  # but do NOT alter the original method's return value/control flow.
88
- skip_instrumentation = req_url && req_url.include?("localhost:3100/apm/v1/metrics")
88
+ skip_instrumentation = req_url && (req_url.include?("localhost:3100/apm/v1/metrics") || req_url.include?("deadbro.aberatii.com/apm/v1/metrics"))
89
89
 
90
90
  unless skip_instrumentation
91
91
  payload = {
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ApmBro
4
- VERSION = "0.1.17"
4
+ VERSION = "0.1.18"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apm_bro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.17
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emanuel Comsa