instana 1.7.15 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ab9e6f138a2e7419056e1b1011c245f33062baa99764a79b74f6ff27f954982
4
- data.tar.gz: 60e029e0126becfa038f89a27d88b13b8f747e5267acd893385a2a09f0b05dc7
3
+ metadata.gz: 5c968fb1710122a4a4d667b7fdc5462378bcbb9f0f20da3f543251534e0aa87a
4
+ data.tar.gz: 72663f04bb23be306e3f87a997cc01375d57a70e8d95501de30a73ca76c32e23
5
5
  SHA512:
6
- metadata.gz: 86c29e0278ddb1ea596996fd9c4f612356336143a147fcde020d731e9af2d442f273a09485fc87c39545386b9bd4b3d4ecabe568dcc03a20d3458af4aba00e1c
7
- data.tar.gz: '08e1b2e767af48ecd4b8bffb5afd33dcde1b6c57ee67e4e96a7b53aaefee6df7e6097616df9a9507cb473471e60d75fa78ce23dbdfe41a3c05ff57f00ac530c1'
6
+ metadata.gz: f4ad1808b31168d09d780b855517ee6b9b40646533e7cb9a4fdd5a546501a241e2e5ff549158bdb8425cc3165f5f1aaf73140a0a6296302e74992012dd828e44
7
+ data.tar.gz: f4dfa14ef6e2ee9c07ac46dacec492cced49e237cdd0420406fe810ba1e719210c7c089bc3ab065d2f6d0193a6e1a872e99e899e53df4035107f513677934582
data/lib/instana/agent.rb CHANGED
@@ -16,6 +16,7 @@ module Instana
16
16
  attr_accessor :process
17
17
  attr_accessor :collect_thread
18
18
  attr_accessor :thread_spawn_lock
19
+ attr_accessor :extra_headers
19
20
 
20
21
  LOCALHOST = '127.0.0.1'.freeze
21
22
  MIME_JSON = 'application/json'.freeze
@@ -64,6 +65,9 @@ module Instana
64
65
 
65
66
  # This will hold info on the discovered agent host
66
67
  @discovered = nil
68
+
69
+ # The agent may pass down custom headers for this sensor to capture
70
+ @extra_headers = nil
67
71
  end
68
72
 
69
73
  # Used post fork to re-initialize state and restart communications with
@@ -221,6 +225,10 @@ module Instana
221
225
  data = Oj.load(response.body)
222
226
  @process[:report_pid] = data['pid']
223
227
  @agent_uuid = data['agentUuid']
228
+
229
+ if data.key?('extraHeaders')
230
+ @extra_headers = data['extraHeaders']
231
+ end
224
232
  true
225
233
  else
226
234
  false
@@ -19,6 +19,16 @@ module Instana
19
19
  kvs[:http][:host] = env['SERVER_NAME']
20
20
  end
21
21
 
22
+ if ::Instana.agent.extra_headers
23
+ for custom_header in agent.extra_headers
24
+ # Headers are available in this format: HTTP_X_CAPTURE_THIS
25
+ rack_header = ('HTTP_' + custom_header.upcase).gsub('-', '_')
26
+ if env.key?(rack_header)
27
+ kvs["http.#{custom_header}"] = env[rack_header]
28
+ end
29
+ end
30
+ end
31
+
22
32
  # Check incoming context
23
33
  incoming_context = {}
24
34
  if env.key?('HTTP_X_INSTANA_T')
@@ -1,4 +1,4 @@
1
1
  module Instana
2
- VERSION = "1.7.15"
2
+ VERSION = "1.8.0"
3
3
  VERSION_FULL = "instana-#{VERSION}"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instana
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.15
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Giacomo Lombardo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-22 00:00:00.000000000 Z
11
+ date: 2018-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler