elastic-apm 2.1.0 → 2.1.1
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/elastic_apm/spies/faraday.rb +5 -3
- data/lib/elastic_apm/spies/http.rb +5 -3
- data/lib/elastic_apm/spies/net_http.rb +3 -1
- data/lib/elastic_apm/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: 657222b35d3baf548263821c1ce816d645e1c459d20cdde35a51d9bc68dae039
|
4
|
+
data.tar.gz: 6fec8c47194a0f9fc0cab8b1a8dbd88a3623ae72e314f34ca2084ec5aaee3b9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97c3a679256e705f97ab509e446eecd521b80628e31ce219f709ab323544d5c62ee05895c69e6e8bad13501c4d90bd4a6dd8640cb827a2c462b18c56139371a9
|
7
|
+
data.tar.gz: f0f25a8bf6bbe7a49561774936bda79d7cebb54682483e37345081e446fc5b30c405dac66ef60f29683a7944b66f5246e903de6af737312a49bb80f59df2334d
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,12 @@ 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.1 (2018-12-04)
|
8
|
+
|
9
|
+
### Fixed
|
10
|
+
|
11
|
+
- Set traceparent span.id to transaction id when span is missing ([#261](https://github.com/elastic/apm-agent-ruby/pull/261))
|
12
|
+
|
7
13
|
## 2.1.0 (2018-12-04)
|
8
14
|
|
9
15
|
### Added
|
@@ -5,7 +5,7 @@ module ElasticAPM
|
|
5
5
|
module Spies
|
6
6
|
# @api private
|
7
7
|
class FaradaySpy
|
8
|
-
# rubocop:disable Metrics/MethodLength
|
8
|
+
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
9
9
|
def install
|
10
10
|
::Faraday::Connection.class_eval do
|
11
11
|
alias run_request_without_apm run_request
|
@@ -22,9 +22,11 @@ module ElasticAPM
|
|
22
22
|
|
23
23
|
ElasticAPM.with_span name, type do |span|
|
24
24
|
ElasticAPM::Spies::NetHTTPSpy.disable_in do
|
25
|
+
id = span&.id || transaction.id
|
26
|
+
|
25
27
|
run_request_without_apm(method, url, body, headers) do |req|
|
26
28
|
req['Elastic-Apm-Traceparent'] =
|
27
|
-
transaction.traceparent.to_header(span_id:
|
29
|
+
transaction.traceparent.to_header(span_id: id)
|
28
30
|
|
29
31
|
yield req if block_given?
|
30
32
|
end
|
@@ -33,7 +35,7 @@ module ElasticAPM
|
|
33
35
|
end
|
34
36
|
end
|
35
37
|
end
|
36
|
-
# rubocop:enable Metrics/MethodLength
|
38
|
+
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize
|
37
39
|
end
|
38
40
|
|
39
41
|
register 'Faraday', 'faraday', FaradaySpy.new
|
@@ -5,7 +5,7 @@ module ElasticAPM
|
|
5
5
|
module Spies
|
6
6
|
# @api private
|
7
7
|
class HTTPSpy
|
8
|
-
# rubocop:disable Metrics/MethodLength
|
8
|
+
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
9
9
|
def install
|
10
10
|
::HTTP::Client.class_eval do
|
11
11
|
alias perform_without_apm perform
|
@@ -22,15 +22,17 @@ module ElasticAPM
|
|
22
22
|
type = "ext.http_rb.#{method}"
|
23
23
|
|
24
24
|
ElasticAPM.with_span name, type do |span|
|
25
|
+
id = span&.id || transaction.id
|
26
|
+
|
25
27
|
req['Elastic-Apm-Traceparent'] =
|
26
|
-
transaction.traceparent.to_header(span_id:
|
28
|
+
transaction.traceparent.to_header(span_id: id)
|
27
29
|
|
28
30
|
perform_without_apm(req, options)
|
29
31
|
end
|
30
32
|
end
|
31
33
|
end
|
32
34
|
end
|
33
|
-
# rubocop:enable Metrics/MethodLength
|
35
|
+
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize
|
34
36
|
end
|
35
37
|
|
36
38
|
register 'HTTP', 'http', HTTPSpy.new
|
@@ -49,8 +49,10 @@ module ElasticAPM
|
|
49
49
|
type = "ext.net_http.#{method}"
|
50
50
|
|
51
51
|
ElasticAPM.with_span name, type do |span|
|
52
|
+
id = span&.id || transaction.id
|
53
|
+
|
52
54
|
req['Elastic-Apm-Traceparent'] =
|
53
|
-
transaction.traceparent.to_header(span_id:
|
55
|
+
transaction.traceparent.to_header(span_id: id)
|
54
56
|
|
55
57
|
request_without_apm(req, body, &block)
|
56
58
|
end
|
data/lib/elastic_apm/version.rb
CHANGED