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 +4 -4
- data/lib/apm_bro/client.rb +2 -1
- data/lib/apm_bro/http_instrumentation.rb +2 -2
- data/lib/apm_bro/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 235bb0964fa7bad2508335a33a743a3d7202757523660570b9a0aaa31ab36a41
|
|
4
|
+
data.tar.gz: b75c946a211a2da589e9a05534d70669ef296cc15be3d753d349e5ff6367eb5e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96b1f310fe50eec5072e1ac93f96108a342ab60d85aef80635ead30044174469b39979d766d69b54b767ae259be712d40fb7fd05dafc21f701deef6923e721a0
|
|
7
|
+
data.tar.gz: 891c797268cfb6910bf3ddfd5e139586f1c1aa4002002edf2d63287c6548374d7798d079eb94de8fa4857cf7cecf995fcea2eefd224f591e243eec8f306e79c6
|
data/lib/apm_bro/client.rb
CHANGED
|
@@ -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
|
-
|
|
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?("
|
|
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 = {
|
data/lib/apm_bro/version.rb
CHANGED