elastic-apm 2.1.1 → 2.1.2

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.

Potentially problematic release.


This version of elastic-apm might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 657222b35d3baf548263821c1ce816d645e1c459d20cdde35a51d9bc68dae039
4
- data.tar.gz: 6fec8c47194a0f9fc0cab8b1a8dbd88a3623ae72e314f34ca2084ec5aaee3b9e
3
+ metadata.gz: 7026cd778a6226802c4bb0b0c384b67c86df3a60430a4283f7b48f45da16e8a6
4
+ data.tar.gz: c415bff2b4c720a3a5b981a27c1ca91500233be95d6f1a73c6bb46ba5d2e2344
5
5
  SHA512:
6
- metadata.gz: 97c3a679256e705f97ab509e446eecd521b80628e31ce219f709ab323544d5c62ee05895c69e6e8bad13501c4d90bd4a6dd8640cb827a2c462b18c56139371a9
7
- data.tar.gz: f0f25a8bf6bbe7a49561774936bda79d7cebb54682483e37345081e446fc5b30c405dac66ef60f29683a7944b66f5246e903de6af737312a49bb80f59df2334d
6
+ metadata.gz: 6e6db8df5ab8e2d7313813b3ca4524c8b32a11e9fe14940cb6d7b55483847015b0716bd760124be452ff4d17708a926edd242f715ab887820a5e0f24eb85d4ac
7
+ data.tar.gz: 7a9e88ef324250a4715b7e60e7c5f32256eea3965556a3b77535c6bd6673dce72c3f8fea92dac321976f1a75ee81ab4174d4502b9655ddfcecabb114f518ee83
data/CHANGELOG.md CHANGED
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 2.1.2 (2018-12-07)
8
+
9
+ ### Fixed
10
+
11
+ - Fix truncation of `transaction.request.url` values ([#267](https://github.com/elastic/apm-agent-ruby/pull/267))
12
+ - Fix Faraday calls with `url_prefix` ([#263](https://github.com/elastic/apm-agent-ruby/pull/263))
13
+ - Force `span.context.http.status_code` to be an integer
14
+
7
15
  ## 2.1.1 (2018-12-04)
8
16
 
9
17
  ### Fixed
data/Rakefile CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  require 'bundler/gem_tasks'
4
4
 
5
+ Rake::Task[:release].enhance do
6
+ `git checkout 2.x &&
7
+ git rebase master &&
8
+ git push origin 2.x &&
9
+ git checkout master`
10
+ end
11
+
5
12
  require 'rspec/core/rake_task'
6
13
  RSpec::Core::RakeTask.new(:spec)
7
14
 
@@ -15,7 +15,11 @@ module ElasticAPM
15
15
  return run_request_without_apm(method, url, body, headers, &block)
16
16
  end
17
17
 
18
- host = URI(url).host
18
+ host = if url_prefix.is_a?(URI) && url_prefix.host
19
+ url_prefix.host
20
+ else
21
+ URI(url).host
22
+ end
19
23
 
20
24
  name = "#{method.upcase} #{host}"
21
25
  type = "ext.faraday.#{method}"
@@ -28,6 +28,8 @@ module ElasticAPM
28
28
  end
29
29
 
30
30
  def keyword_object(hash)
31
+ return unless hash
32
+
31
33
  hash.tap do |h|
32
34
  h.each { |k, v| hash[k] = keyword_field(v) }
33
35
  end
@@ -29,7 +29,7 @@ module ElasticAPM
29
29
  http_version: keyword_field(request.http_version),
30
30
  method: keyword_field(request.method),
31
31
  socket: build_socket(request.socket),
32
- url: request.url
32
+ url: build_url(request.url)
33
33
  }
34
34
  end
35
35
  # rubocop:enable Metrics/MethodLength
@@ -63,6 +63,20 @@ module ElasticAPM
63
63
  encrypted: socket.encrypted
64
64
  }
65
65
  end
66
+
67
+ def build_url(url)
68
+ return unless url
69
+
70
+ {
71
+ protocol: keyword_field(url.protocol),
72
+ full: keyword_field(url.full),
73
+ hostname: keyword_field(url.hostname),
74
+ port: keyword_field(url.port),
75
+ pathname: keyword_field(url.pathname),
76
+ search: keyword_field(url.search),
77
+ hash: keyword_field(url.hash)
78
+ }
79
+ end
66
80
  end
67
81
  end
68
82
  end
@@ -62,7 +62,7 @@ module ElasticAPM
62
62
 
63
63
  {
64
64
  url: http.url,
65
- status_code: http.status_code,
65
+ status_code: http.status_code.to_i,
66
66
  method: keyword_field(http.method)
67
67
  }
68
68
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ElasticAPM
4
- VERSION = '2.1.1'
4
+ VERSION = '2.1.2'
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: 2.1.1
4
+ version: 2.1.2
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-12-04 00:00:00.000000000 Z
11
+ date: 2018-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby