elastic-apm 0.4.4 → 0.4.5

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: f8b4212fe43613decb50e73909c38c9188e5a57d02859ae40164d53e238fe539
4
- data.tar.gz: 92fd6e982456dfd3aca127b1342e4dca73c2921f38c2deb5faa885f3706735a2
3
+ metadata.gz: 329562f592fbece5d73eb15b09d06085abf6f243ff93626b7fed6429b29d7b82
4
+ data.tar.gz: 269658c639e1459453f953dff804d97de8ed4a18093b4dfca76cedb1282d614f
5
5
  SHA512:
6
- metadata.gz: 3e3fcacd80cc3050c3aec21542f9130c5bf9cdffa7d128fd1d88fe4bd46ab8276ecabddc818b37549b46da9f4f7fc73f66ef4b708c330ffb7b99a2c6ab71b88d
7
- data.tar.gz: 32ebd78d8c1368b4177f376d1455f3e67576b91ddf9db61072450172c3d536b18929fb320179f7362344f9977fa7d42380b2d72d6eaaa7c4f94f5fa99b9ba10b
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/) [![Gem](https://img.shields.io/gem/v/formatador.svg?style=flat-square)](https://rubygems.org/gems/elastic-apm)
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
 
@@ -103,7 +103,7 @@ module ElasticAPM
103
103
  end
104
104
 
105
105
  def server_uri
106
- @uri ||= URI(@config.server_url)
106
+ @server_uri ||= URI(@config.server_url)
107
107
  end
108
108
 
109
109
  def verify_mode
@@ -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
@@ -9,7 +9,7 @@ module ElasticAPM
9
9
  base = {
10
10
  id: error.id,
11
11
  culprit: error.culprit,
12
- timestamp: micros_to_time(error.timestamp).utc.iso8601,
12
+ timestamp: micros_to_time(error.timestamp).utc.iso8601(3),
13
13
  context: error.context.to_h
14
14
  }
15
15
 
@@ -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.backspan.join("\n")
49
+ puts e.backtrace.join("\n")
50
50
  nil
51
51
  end
52
52
  # rubocop:enable Metrics/AbcSize, Metrics/MethodLength
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ElasticAPM
4
- VERSION = '0.4.4'.freeze
4
+ VERSION = '0.4.5'.freeze
5
5
  end
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
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-02-20 00:00:00.000000000 Z
11
+ date: 2018-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport