elastic-apm 2.1.0 → 2.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: df3dedd32ff6829fff4db353e0f6990d378d57313112cba444f717cb958565bd
4
- data.tar.gz: 9e822ce49bc71ebf13ab70e0bf67e8c156a19f0f5c68e5dcca895fcebbf64edb
3
+ metadata.gz: 657222b35d3baf548263821c1ce816d645e1c459d20cdde35a51d9bc68dae039
4
+ data.tar.gz: 6fec8c47194a0f9fc0cab8b1a8dbd88a3623ae72e314f34ca2084ec5aaee3b9e
5
5
  SHA512:
6
- metadata.gz: 9cd54124d6b4278d5cef85347eacc071a1a9d6511dc31c30fa551d9e9827d5288e1f91fad7c89cec32b4642897f13f92c16ed8a61b494f9e3b9bb4a60c8eacfc
7
- data.tar.gz: ff0c2bff7f2d9f5d1a920a54a9dd120938c8a91e02cc024e3ecb9e420a50673f75b8ec2535643b794f34319ac2f2eb005a9a907dcc0e1b79869178fc3278305c
6
+ metadata.gz: 97c3a679256e705f97ab509e446eecd521b80628e31ce219f709ab323544d5c62ee05895c69e6e8bad13501c4d90bd4a6dd8640cb827a2c462b18c56139371a9
7
+ data.tar.gz: f0f25a8bf6bbe7a49561774936bda79d7cebb54682483e37345081e446fc5b30c405dac66ef60f29683a7944b66f5246e903de6af737312a49bb80f59df2334d
@@ -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: 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: 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: span.id)
55
+ transaction.traceparent.to_header(span_id: id)
54
56
 
55
57
  request_without_apm(req, body, &block)
56
58
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ElasticAPM
4
- VERSION = '2.1.0'
4
+ VERSION = '2.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic-apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikkel Malmberg