elastic-apm 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of elastic-apm might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/elastic_apm/http.rb +1 -1
- data/lib/elastic_apm/injectors.rb +12 -0
- data/lib/elastic_apm/serializers/errors.rb +1 -1
- data/lib/elastic_apm/serializers/transactions.rb +1 -1
- data/lib/elastic_apm/util/inspector.rb +2 -2
- data/lib/elastic_apm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 329562f592fbece5d73eb15b09d06085abf6f243ff93626b7fed6429b29d7b82
|
4
|
+
data.tar.gz: 269658c639e1459453f953dff804d97de8ed4a18093b4dfca76cedb1282d614f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed067d07389e9187e290b2e47000f016e4ff72e4e717a9530d5dac64e73caa1648cd57b35413fffb03ee21780a65402ff7b64bf59ed468085576294e6dd38171
|
7
|
+
data.tar.gz: b7425968e951aa1161812a3a15c9205904984d215081b273cb24ce59132e9a069dc59ac7a88d86d4a50f0d1de9db2aac948ec2037722f5dfdc7f20a0b011bc86
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# elastic-apm – Elastic APM agent for Ruby (BETA)
|
2
2
|
|
3
|
-
[![Jenkins](https://img.shields.io/jenkins/s/https/apm-ci.elastic.co/job/elastic+apm-agent-ruby+master.svg)](https://apm-ci.elastic.co/job/elastic+apm-agent-ruby+master/)
|
3
|
+
[![Jenkins](https://img.shields.io/jenkins/s/https/apm-ci.elastic.co/job/elastic+apm-agent-ruby+master.svg)](https://apm-ci.elastic.co/job/elastic+apm-agent-ruby+master/)
|
4
4
|
|
5
5
|
This is the official Rubygem for adding [Elastic][]'s [APM][] to your Ruby app.
|
6
6
|
|
data/lib/elastic_apm/http.rb
CHANGED
@@ -45,6 +45,18 @@ module ElasticAPM
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
+
def self.hook_into(name)
|
49
|
+
return unless (registration = require_hooks[name])
|
50
|
+
return unless const_defined?(registration.const_name)
|
51
|
+
|
52
|
+
installed[registration.const_name] = registration
|
53
|
+
registration.install
|
54
|
+
|
55
|
+
registration.require_paths.each do |path|
|
56
|
+
require_hooks.delete path
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
48
60
|
def self.const_defined?(const_name)
|
49
61
|
const = Util::Inflector.constantize(const_name)
|
50
62
|
!!const
|
@@ -12,7 +12,7 @@ module ElasticAPM
|
|
12
12
|
type: transaction.type,
|
13
13
|
result: transaction.result.to_s,
|
14
14
|
duration: ms(transaction.duration),
|
15
|
-
timestamp: micros_to_time(transaction.timestamp).utc.iso8601,
|
15
|
+
timestamp: micros_to_time(transaction.timestamp).utc.iso8601(3),
|
16
16
|
spans: transaction.spans.map(&method(:build_span)),
|
17
17
|
sampled: transaction.sampled,
|
18
18
|
context: transaction.context.to_h
|
@@ -28,7 +28,7 @@ module ElasticAPM
|
|
28
28
|
span_width = ms(span.duration) * width_factor
|
29
29
|
duration_desc = ms(span.duration)
|
30
30
|
else
|
31
|
-
span_width = width - indent
|
31
|
+
span_width = @width - indent
|
32
32
|
duration_desc = 'RUNNING'
|
33
33
|
end
|
34
34
|
|
@@ -46,7 +46,7 @@ module ElasticAPM
|
|
46
46
|
lines.map { |s| s[0..@width] }.join("\n")
|
47
47
|
rescue StandardError => e
|
48
48
|
puts e
|
49
|
-
puts e.
|
49
|
+
puts e.backtrace.join("\n")
|
50
50
|
nil
|
51
51
|
end
|
52
52
|
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
|
data/lib/elastic_apm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elastic-apm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikkel Malmberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|