instana 1.11.6 → 1.11.7

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: 9d171f2b3b043b7b18a534a9609b47098521a9de99755d347e3c338fb0d1adfa
4
- data.tar.gz: 12d93179facc0038eb94b8233386cb7b8a0849d9cdf0f9a9f2ef66cbb9ed029d
3
+ metadata.gz: 4d29c335511f3dec4cac5857ac4d1b84b1b84f70a2f5974ed9b0f20992dc2cb7
4
+ data.tar.gz: 9560b29a9d7902f0f013a4b586fed564c8eb854a6e700e1798e8c71463dbdf7a
5
5
  SHA512:
6
- metadata.gz: 05a5f54ed77c162a58ed331632398abe0777821ad0360978d88caf39cb8748dc91203696ac25120b048c0771e336bcb841e01e1539aa45de761efe8c99ec1847
7
- data.tar.gz: 2b966772f1435202a9077a451e85ddcc3a598b2835cfdd1fd7b395685863b5d0bf11920ad1302f845663a6efce62e87b13574b8a3fa3f8673de0122414ef3790
6
+ metadata.gz: ccd6ac828673bf6f731b0b75d09f4009a6f02e74c80eb2258af40e5993e0dd15c710e4936c2db53691a7a8f43234adbed0bbe45e13d9fe56ce99dbd2491ddf47
7
+ data.tar.gz: 347b2d4e384e37e74ce51d68bbce5059e4f8de7d1ea0aa7ab6dbb82b7ddc4c67d6b97479f1de8152c9fff988994e3daf0642f34712f0a152eaa3ba80b975de3a
@@ -0,0 +1,168 @@
1
+ version: 2.1
2
+
3
+ # More about orbs: https://circleci.com/docs/2.0/using-orbs/
4
+ orbs:
5
+ ruby: circleci/ruby@1.1.2
6
+
7
+ commands:
8
+ prelim-deps:
9
+ steps:
10
+ - run:
11
+ name: Preliminary Dependencies
12
+ command: |
13
+ gem update --system
14
+ gem --version
15
+ gem install bundler
16
+ bundler --version
17
+ bundle config set path './vendor/bundle'
18
+
19
+ run-tests:
20
+ steps:
21
+ - run:
22
+ name: Run the Tests
23
+ command: |
24
+ bundle exec rake test
25
+
26
+ save-stan-cache:
27
+ parameters:
28
+ gemfile:
29
+ default: "Gemfile"
30
+ type: string
31
+ steps:
32
+ - save_cache:
33
+ key: gem-cache-v1-{{ arch }}-{{ .Branch }}-{{ checksum "<<parameters.gemfile>>" }}
34
+ paths:
35
+ - vendor/bundle
36
+
37
+ restore-stan-cache:
38
+ parameters:
39
+ gemfile:
40
+ default: "Gemfile"
41
+ type: string
42
+ steps:
43
+ - restore_cache:
44
+ keys:
45
+ - gem-cache-v1-{{ arch }}-{{ .Branch }}-{{ checksum "<<parameters.gemfile>>" }}
46
+ - gem-cache-v1-{{ arch }}-{{ .Branch }}
47
+ - gem-cache-v1
48
+
49
+ bundle-install:
50
+ parameters:
51
+ gemfile:
52
+ default: "Gemfile"
53
+ type: string
54
+ steps:
55
+ - restore-stan-cache:
56
+ gemfile: <<parameters.gemfile>>
57
+ - run:
58
+ name: Bundle Installation
59
+ command: |
60
+ bundle install
61
+ - save-stan-cache:
62
+ gemfile: <<parameters.gemfile>>
63
+
64
+ jobs:
65
+ ruby26:
66
+ parallelism: 3
67
+ docker:
68
+ - image: circleci/ruby:2.6.3-stretch-node
69
+ executor: ruby/default
70
+ environment:
71
+ BUNDLE_JOBS: "3"
72
+ BUNDLE_RETRY: "3"
73
+
74
+ steps:
75
+ - checkout
76
+ - prelim-deps
77
+ - bundle-install
78
+ - run-tests
79
+
80
+ rails50:
81
+ parallelism: 3
82
+ docker:
83
+ - image: circleci/ruby:2.6.3-stretch-node
84
+ - image: mariadb
85
+ environment:
86
+ MYSQL_DATABASE: 'travis_ci_test'
87
+ MYSQL_USER: 'root'
88
+ MYSQL_PASSWORD: ''
89
+ MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
90
+ MYSQL_ROOT_PASSWORD: ''
91
+ MYSQL_ROOT_HOST: '%'
92
+ executor: ruby/default
93
+ environment:
94
+ BUNDLE_JOBS: "3"
95
+ BUNDLE_RETRY: "3"
96
+ BUNDLE_GEMFILE: "./gemfiles/rails50.gemfile"
97
+
98
+ steps:
99
+ - checkout
100
+ - prelim-deps
101
+ - bundle-install:
102
+ gemfile: "./gemfiles/rails50.gemfile"
103
+ - run-tests
104
+
105
+ rails60:
106
+ parallelism: 3
107
+ docker:
108
+ - image: circleci/ruby:2.6.3-stretch-node
109
+ - image: mariadb
110
+ environment:
111
+ MYSQL_DATABASE: 'travis_ci_test'
112
+ MYSQL_USER: 'root'
113
+ MYSQL_PASSWORD: ''
114
+ MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
115
+ MYSQL_ROOT_PASSWORD: ''
116
+ MYSQL_ROOT_HOST: '%'
117
+ executor: ruby/default
118
+ environment:
119
+ BUNDLE_JOBS: "3"
120
+ BUNDLE_RETRY: "3"
121
+ BUNDLE_GEMFILE: "./gemfiles/rails60.gemfile"
122
+
123
+ steps:
124
+ - checkout
125
+ - prelim-deps
126
+ - bundle-install:
127
+ gemfile: "./gemfiles/rails60.gemfile"
128
+ - run-tests
129
+
130
+ libraries:
131
+ parallelism: 3
132
+ docker:
133
+ - image: circleci/ruby:2.6.3-stretch-node
134
+ - image: mariadb
135
+ environment:
136
+ MYSQL_DATABASE: 'travis_ci_test'
137
+ MYSQL_USER: 'root'
138
+ MYSQL_PASSWORD: ''
139
+ MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
140
+ MYSQL_ROOT_PASSWORD: ''
141
+ MYSQL_ROOT_HOST: '%'
142
+ - image: memcached
143
+ - image: postgres
144
+ environment:
145
+ POSTGRES_USER: 'stan'
146
+ POSTGRES_PASSWORD: 'stanlikesdata'
147
+ - image: redis
148
+ executor: ruby/default
149
+ environment:
150
+ BUNDLE_JOBS: "3"
151
+ BUNDLE_RETRY: "3"
152
+ BUNDLE_GEMFILE: "./gemfiles/libraries.gemfile"
153
+
154
+ steps:
155
+ - checkout
156
+ - prelim-deps
157
+ - bundle-install:
158
+ gemfile: "./gemfiles/libraries.gemfile"
159
+ - run-tests
160
+
161
+ workflows:
162
+ version: 2
163
+ whole-enchilada-MRI26:
164
+ jobs:
165
+ - ruby26
166
+ - rails50
167
+ - rails60
168
+ - libraries
@@ -8,8 +8,9 @@ module Instana
8
8
  @app = app
9
9
  end
10
10
 
11
- def call(env)
12
- kvs = { :http => {} }
11
+ def collect_kvs(env)
12
+ kvs = {}
13
+ kvs[:http] = {}
13
14
  kvs[:http][:method] = env['REQUEST_METHOD']
14
15
  kvs[:http][:url] = ::CGI.unescape(env['PATH_INFO'])
15
16
 
@@ -37,15 +38,27 @@ module Instana
37
38
  end
38
39
  }
39
40
  end
41
+ return kvs
42
+ end
40
43
 
44
+ def call(env)
41
45
  # Check incoming context
42
46
  incoming_context = {}
43
47
  if env.key?('HTTP_X_INSTANA_T')
44
48
  incoming_context[:trace_id] = ::Instana::Util.header_to_id(env['HTTP_X_INSTANA_T'])
45
49
  incoming_context[:span_id] = ::Instana::Util.header_to_id(env['HTTP_X_INSTANA_S']) if env.key?('HTTP_X_INSTANA_S')
46
50
  incoming_context[:level] = env['HTTP_X_INSTANA_L'] if env.key?('HTTP_X_INSTANA_L')
51
+
52
+ # Honor X-Instana-L
53
+ if incoming_context[:level] and incoming_context[:level].length > 0
54
+ if incoming_context[:level][0] == "0"
55
+ return @app.call(env)
56
+ end
57
+ end
47
58
  end
48
59
 
60
+ kvs = collect_kvs(env)
61
+
49
62
  ::Instana.tracer.log_start_or_continue(:rack, {}, incoming_context)
50
63
 
51
64
  status, headers, response = @app.call(env)
@@ -78,8 +91,10 @@ module Instana
78
91
  # Set reponse headers; encode as hex string
79
92
  headers['X-Instana-T'] = ::Instana::Util.id_to_header(trace_id)
80
93
  headers['X-Instana-S'] = ::Instana::Util.id_to_header(span_id)
94
+ headers['X-Instana-L'] = '1'
95
+ headers['Server-Timing'] = "intid;desc=#{::Instana::Util.id_to_header(trace_id)}"
96
+ ::Instana.tracer.log_end(:rack, kvs)
81
97
  end
82
- ::Instana.tracer.log_end(:rack, kvs)
83
98
  end
84
99
  end
85
100
  end
@@ -7,14 +7,15 @@ module Instana
7
7
  def setup_environment
8
8
  # Set defaults if not set
9
9
  ENV['MEMCACHED_HOST'] ||= '127.0.0.1:11211'
10
- ENV['TRAVIS_PSQL_HOST'] ||= "127.0.0.1"
11
- ENV['TRAVIS_PSQL_USER'] ||= "postgres"
10
+ ENV['POSTGRES_HOST'] ||= "127.0.0.1"
11
+ ENV['POSTGRES_USER'] ||= "stan"
12
+ ENV['POSTGRES_PASSWORD'] ||= "stanlikesdata"
12
13
  ENV['TRAVIS_MYSQL_HOST'] ||= "127.0.0.1"
13
14
  ENV['TRAVIS_MYSQL_USER'] ||= "root"
14
15
 
15
16
  if !ENV.key?('DATABASE_URL')
16
17
  if ENV['DB_FLAVOR'] == 'postgresql'
17
- ENV['DATABASE_URL'] = "postgresql://#{ENV['TRAVIS_PSQL_USER']}:#{ENV['TRAVIS_PSQL_PASS']}@#{ENV['TRAVIS_PSQL_HOST']}:5432/travis_ci_test"
18
+ ENV['DATABASE_URL'] = "postgresql://#{ENV['POSTGRES_USER']}:#{ENV['POSTGRES_PASSWORD']}@#{ENV['POSTGRES_HOST']}:5432/#{ENV['POSTGRES_USER']}"
18
19
  elsif ENV['DB_FLAVOR'] == 'mysql'
19
20
  ENV['DATABASE_URL'] = "mysql://#{ENV['TRAVIS_MYSQL_USER']}:#{ENV['TRAVIS_MYSQL_PASS']}@#{ENV['TRAVIS_MYSQL_HOST']}:3306/travis_ci_test"
20
21
  else
@@ -1,4 +1,4 @@
1
1
  module Instana
2
- VERSION = "1.11.6"
2
+ VERSION = "1.11.7"
3
3
  VERSION_FULL = "instana-#{VERSION}"
4
4
  end
@@ -29,23 +29,33 @@ class RackTest < Minitest::Test
29
29
  # Span validation
30
30
  assert_equal 1, spans.count
31
31
 
32
- first_span = spans.first
33
- assert_equal :rack, first_span[:n]
34
- assert first_span.key?(:data)
35
- assert first_span[:data].key?(:http)
36
- assert_equal "GET", first_span[:data][:http][:method]
37
- assert_equal "/mrlobster", first_span[:data][:http][:url]
38
- assert_equal 200, first_span[:data][:http][:status]
39
- assert_equal 'example.org', first_span[:data][:http][:host]
40
- assert first_span.key?(:f)
41
- assert first_span[:f].key?(:e)
42
- assert first_span[:f].key?(:h)
43
- assert_equal ::Instana.agent.agent_uuid, first_span[:f][:h]
32
+ rack_span = spans.first
33
+ assert_equal :rack, rack_span[:n]
34
+
35
+ assert last_response.headers.key?("X-Instana-T")
36
+ assert last_response.headers["X-Instana-T"] == ::Instana::Util.id_to_header(rack_span[:t])
37
+ assert last_response.headers.key?("X-Instana-S")
38
+ assert last_response.headers["X-Instana-S"] == ::Instana::Util.id_to_header(rack_span[:s])
39
+ assert last_response.headers.key?("X-Instana-L")
40
+ assert last_response.headers["X-Instana-L"] == '1'
41
+ assert last_response.headers.key?("Server-Timing")
42
+ assert last_response.headers["Server-Timing"] == "intid;desc=#{::Instana::Util.id_to_header(rack_span[:t])}"
43
+
44
+ assert rack_span.key?(:data)
45
+ assert rack_span[:data].key?(:http)
46
+ assert_equal "GET", rack_span[:data][:http][:method]
47
+ assert_equal "/mrlobster", rack_span[:data][:http][:url]
48
+ assert_equal 200, rack_span[:data][:http][:status]
49
+ assert_equal 'example.org', rack_span[:data][:http][:host]
50
+ assert rack_span.key?(:f)
51
+ assert rack_span[:f].key?(:e)
52
+ assert rack_span[:f].key?(:h)
53
+ assert_equal ::Instana.agent.agent_uuid, rack_span[:f][:h]
44
54
 
45
55
  # Backtrace fingerprint validation
46
- assert first_span.key?(:stack)
47
- assert_equal 2, first_span[:stack].count
48
- refute_nil first_span[:stack].first[:c].match(/instana\/instrumentation\/rack.rb/)
56
+ assert rack_span.key?(:stack)
57
+ assert_equal 2, rack_span[:stack].count
58
+ refute_nil rack_span[:stack].first[:c].match(/instana\/instrumentation\/rack.rb/)
49
59
 
50
60
  # Restore to default
51
61
  ::Instana.config[:collect_backtraces] = false
@@ -63,8 +73,8 @@ class RackTest < Minitest::Test
63
73
  # Span validation
64
74
  assert_equal 1, spans.count
65
75
 
66
- first_span = spans.first
67
- assert_equal 'WalterBishop', first_span[:data][:service]
76
+ rack_span = spans.first
77
+ assert_equal 'WalterBishop', rack_span[:data][:service]
68
78
 
69
79
  ENV.delete('INSTANA_SERVICE_NAME')
70
80
  end
@@ -78,17 +88,27 @@ class RackTest < Minitest::Test
78
88
 
79
89
  # Span validation
80
90
  assert_equal 1, spans.count
81
- first_span = spans.first
82
- assert_equal :rack, first_span[:n]
83
- assert first_span.key?(:data)
84
- assert first_span[:data].key?(:http)
85
- assert_equal "POST", first_span[:data][:http][:method]
86
- assert_equal "/mrlobster", first_span[:data][:http][:url]
87
- assert_equal 200, first_span[:data][:http][:status]
88
- assert first_span.key?(:f)
89
- assert first_span[:f].key?(:e)
90
- assert first_span[:f].key?(:h)
91
- assert_equal ::Instana.agent.agent_uuid, first_span[:f][:h]
91
+ rack_span = spans.first
92
+ assert_equal :rack, rack_span[:n]
93
+
94
+ assert last_response.headers.key?("X-Instana-T")
95
+ assert last_response.headers["X-Instana-T"] == ::Instana::Util.id_to_header(rack_span[:t])
96
+ assert last_response.headers.key?("X-Instana-S")
97
+ assert last_response.headers["X-Instana-S"] == ::Instana::Util.id_to_header(rack_span[:s])
98
+ assert last_response.headers.key?("X-Instana-L")
99
+ assert last_response.headers["X-Instana-L"] == '1'
100
+ assert last_response.headers.key?("Server-Timing")
101
+ assert last_response.headers["Server-Timing"] == "intid;desc=#{::Instana::Util.id_to_header(rack_span[:t])}"
102
+
103
+ assert rack_span.key?(:data)
104
+ assert rack_span[:data].key?(:http)
105
+ assert_equal "POST", rack_span[:data][:http][:method]
106
+ assert_equal "/mrlobster", rack_span[:data][:http][:url]
107
+ assert_equal 200, rack_span[:data][:http][:status]
108
+ assert rack_span.key?(:f)
109
+ assert rack_span[:f].key?(:e)
110
+ assert rack_span[:f].key?(:h)
111
+ assert_equal ::Instana.agent.agent_uuid, rack_span[:f][:h]
92
112
  end
93
113
 
94
114
  def test_basic_put
@@ -100,17 +120,27 @@ class RackTest < Minitest::Test
100
120
 
101
121
  # Span validation
102
122
  assert_equal 1, spans.count
103
- first_span = spans.first
104
- assert_equal :rack, first_span[:n]
105
- assert first_span.key?(:data)
106
- assert first_span[:data].key?(:http)
107
- assert_equal "PUT", first_span[:data][:http][:method]
108
- assert_equal "/mrlobster", first_span[:data][:http][:url]
109
- assert_equal 200, first_span[:data][:http][:status]
110
- assert first_span.key?(:f)
111
- assert first_span[:f].key?(:e)
112
- assert first_span[:f].key?(:h)
113
- assert_equal ::Instana.agent.agent_uuid, first_span[:f][:h]
123
+ rack_span = spans.first
124
+ assert_equal :rack, rack_span[:n]
125
+
126
+ assert last_response.headers.key?("X-Instana-T")
127
+ assert last_response.headers["X-Instana-T"] == ::Instana::Util.id_to_header(rack_span[:t])
128
+ assert last_response.headers.key?("X-Instana-S")
129
+ assert last_response.headers["X-Instana-S"] == ::Instana::Util.id_to_header(rack_span[:s])
130
+ assert last_response.headers.key?("X-Instana-L")
131
+ assert last_response.headers["X-Instana-L"] == '1'
132
+ assert last_response.headers.key?("Server-Timing")
133
+ assert last_response.headers["Server-Timing"] == "intid;desc=#{::Instana::Util.id_to_header(rack_span[:t])}"
134
+
135
+ assert rack_span.key?(:data)
136
+ assert rack_span[:data].key?(:http)
137
+ assert_equal "PUT", rack_span[:data][:http][:method]
138
+ assert_equal "/mrlobster", rack_span[:data][:http][:url]
139
+ assert_equal 200, rack_span[:data][:http][:status]
140
+ assert rack_span.key?(:f)
141
+ assert rack_span[:f].key?(:e)
142
+ assert rack_span[:f].key?(:h)
143
+ assert_equal ::Instana.agent.agent_uuid, rack_span[:f][:h]
114
144
  end
115
145
 
116
146
  def test_context_continuation
@@ -125,23 +155,33 @@ class RackTest < Minitest::Test
125
155
 
126
156
  # Span validation
127
157
  assert_equal 1, spans.count
128
- first_span = spans.first
129
- assert_equal :rack, first_span[:n]
130
- assert first_span.key?(:data)
131
- assert first_span[:data].key?(:http)
132
- assert_equal "GET", first_span[:data][:http][:method]
133
- assert_equal "/mrlobster", first_span[:data][:http][:url]
134
- assert_equal 200, first_span[:data][:http][:status]
135
- assert first_span.key?(:f)
136
- assert first_span[:f].key?(:e)
137
- assert first_span[:f].key?(:h)
138
- assert_equal ::Instana.agent.agent_uuid, first_span[:f][:h]
158
+ rack_span = spans.first
159
+ assert_equal :rack, rack_span[:n]
160
+
161
+ assert last_response.headers.key?("X-Instana-T")
162
+ assert last_response.headers["X-Instana-T"] == ::Instana::Util.id_to_header(rack_span[:t])
163
+ assert last_response.headers.key?("X-Instana-S")
164
+ assert last_response.headers["X-Instana-S"] == ::Instana::Util.id_to_header(rack_span[:s])
165
+ assert last_response.headers.key?("X-Instana-L")
166
+ assert last_response.headers["X-Instana-L"] == '1'
167
+ assert last_response.headers.key?("Server-Timing")
168
+ assert last_response.headers["Server-Timing"] == "intid;desc=#{::Instana::Util.id_to_header(rack_span[:t])}"
169
+
170
+ assert rack_span.key?(:data)
171
+ assert rack_span[:data].key?(:http)
172
+ assert_equal "GET", rack_span[:data][:http][:method]
173
+ assert_equal "/mrlobster", rack_span[:data][:http][:url]
174
+ assert_equal 200, rack_span[:data][:http][:status]
175
+ assert rack_span.key?(:f)
176
+ assert rack_span[:f].key?(:e)
177
+ assert rack_span[:f].key?(:h)
178
+ assert_equal ::Instana.agent.agent_uuid, rack_span[:f][:h]
139
179
 
140
180
  # Context validation
141
181
  # The first span should have the passed in trace ID
142
182
  # and specify the passed in span ID as it's parent.
143
- assert_equal 1234, first_span[:t]
144
- assert_equal 4321, first_span[:p]
183
+ assert_equal 1234, rack_span[:t]
184
+ assert_equal 4321, rack_span[:p]
145
185
  end
146
186
 
147
187
  def test_instana_response_headers
@@ -181,17 +221,17 @@ class RackTest < Minitest::Test
181
221
 
182
222
  # Span validation
183
223
  assert_equal 1, spans.count
184
- first_span = spans.first
224
+ rack_span = spans.first
185
225
 
186
- assert first_span[:data][:http].key?(:header)
187
- assert first_span[:data][:http][:header].key?(:"X-Capture-This")
188
- assert !first_span[:data][:http][:header].key?(:"X-Capture-That")
189
- assert_equal "ThereYouGo", first_span[:data][:http][:header][:"X-Capture-This"]
226
+ assert rack_span[:data][:http].key?(:header)
227
+ assert rack_span[:data][:http][:header].key?(:"X-Capture-This")
228
+ assert !rack_span[:data][:http][:header].key?(:"X-Capture-That")
229
+ assert_equal "ThereYouGo", rack_span[:data][:http][:header][:"X-Capture-This"]
190
230
 
191
231
  # Backtrace fingerprint validation
192
- assert first_span.key?(:stack)
193
- assert_equal 2, first_span[:stack].count
194
- refute_nil first_span[:stack].first[:c].match(/instana\/instrumentation\/rack.rb/)
232
+ assert rack_span.key?(:stack)
233
+ assert_equal 2, rack_span[:stack].count
234
+ refute_nil rack_span[:stack].first[:c].match(/instana\/instrumentation\/rack.rb/)
195
235
 
196
236
  # Restore to default
197
237
  ::Instana.config[:collect_backtraces] = false
@@ -1,4 +1,4 @@
1
-
1
+ require 'sinatra'
2
2
  if defined?(::Sinatra)
3
3
  require 'test_helper'
4
4
  require File.expand_path(File.dirname(__FILE__) + '/../apps/sinatra')
@@ -17,28 +17,36 @@ if defined?(::Sinatra)
17
17
  r = get '/'
18
18
  assert last_response.ok?
19
19
 
20
- assert r.headers.key?("X-Instana-T")
21
- assert r.headers.key?("X-Instana-S")
22
20
 
23
21
  spans = ::Instana.processor.queued_spans
24
22
  assert_equal 1, spans.count
25
23
 
26
- first_span = spans.first
27
- assert_equal :rack, first_span[:n]
28
- assert first_span.key?(:data)
29
- assert first_span[:data].key?(:http)
30
-
31
- assert first_span[:data][:http].key?(:method)
32
- assert_equal "GET", first_span[:data][:http][:method]
24
+ rack_span = spans.first
25
+ assert_equal :rack, rack_span[:n]
26
+ # ::Instana::Util.pry!
33
27
 
34
- assert first_span[:data][:http].key?(:url)
35
- assert_equal "/", first_span[:data][:http][:url]
36
-
37
- assert first_span[:data][:http].key?(:status)
38
- assert_equal 200, first_span[:data][:http][:status]
39
-
40
- assert first_span[:data][:http].key?(:host)
41
- assert_equal "example.org", first_span[:data][:http][:host]
28
+ assert r.headers.key?("X-Instana-T")
29
+ assert r.headers["X-Instana-T"] == ::Instana::Util.id_to_header(rack_span[:t])
30
+ assert r.headers.key?("X-Instana-S")
31
+ assert r.headers["X-Instana-S"] == ::Instana::Util.id_to_header(rack_span[:s])
32
+ assert r.headers.key?("X-Instana-L")
33
+ assert r.headers["X-Instana-L"] == '1'
34
+ assert r.headers.key?("Server-Timing")
35
+ assert r.headers["Server-Timing"] == "intid;desc=#{::Instana::Util.id_to_header(rack_span[:t])}"
36
+
37
+ assert rack_span.key?(:data)
38
+ assert rack_span[:data].key?(:http)
39
+ assert rack_span[:data][:http].key?(:method)
40
+ assert_equal "GET", rack_span[:data][:http][:method]
41
+
42
+ assert rack_span[:data][:http].key?(:url)
43
+ assert_equal "/", rack_span[:data][:http][:url]
44
+
45
+ assert rack_span[:data][:http].key?(:status)
46
+ assert_equal 200, rack_span[:data][:http][:status]
47
+
48
+ assert rack_span[:data][:http].key?(:host)
49
+ assert_equal "example.org", rack_span[:data][:http][:host]
42
50
  end
43
51
  end
44
52
  end
@@ -14,7 +14,7 @@ class GrpcTest < Minitest::Test
14
14
 
15
15
  if error
16
16
  assert_equal true, data[:rpc][:error]
17
- assert_equal "2:RuntimeError: #{error}", data[:log][:message]
17
+ assert data[:log][:message].include?("2:RuntimeError: #{error}")
18
18
  end
19
19
  end
20
20
 
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.11.6
4
+ version: 1.11.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Giacomo Lombardo
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-25 00:00:00.000000000 Z
11
+ date: 2020-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -173,11 +173,11 @@ executables: []
173
173
  extensions: []
174
174
  extra_rdoc_files: []
175
175
  files:
176
+ - ".circleci/config.yml"
176
177
  - ".codeclimate.yml"
177
178
  - ".fasterer.yml"
178
179
  - ".gitignore"
179
180
  - ".rubocop.yml"
180
- - ".travis.yml"
181
181
  - Dockerfile
182
182
  - Gemfile
183
183
  - LICENSE
@@ -307,7 +307,7 @@ metadata:
307
307
  documentation_uri: https://docs.instana.io/ecosystem/ruby/
308
308
  homepage_uri: https://www.instana.com/
309
309
  source_code_uri: https://github.com/instana/ruby-sensor
310
- post_install_message:
310
+ post_install_message:
311
311
  rdoc_options: []
312
312
  require_paths:
313
313
  - lib
@@ -322,8 +322,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
322
322
  - !ruby/object:Gem::Version
323
323
  version: '0'
324
324
  requirements: []
325
- rubygems_version: 3.0.3
326
- signing_key:
325
+ rubygems_version: 3.0.6
326
+ signing_key:
327
327
  specification_version: 4
328
328
  summary: Ruby Distributed Tracing & Metrics Sensor for Instana
329
329
  test_files:
@@ -1,43 +0,0 @@
1
- language: ruby
2
-
3
- cache:
4
- bundler: true
5
- directories:
6
- - vendor/bundle
7
-
8
- rvm:
9
- - 2.6
10
- - 2.4
11
-
12
- before_install:
13
- - gem update --system
14
- - gem install bundler
15
- - gem --version
16
-
17
- before_script:
18
- - psql -c 'create database travis_ci_test;' -U postgres
19
- - mysql -e 'CREATE DATABASE travis_ci_test;'
20
-
21
- script: "bundle exec rake test"
22
-
23
- services:
24
- - memcached
25
- - redis
26
- - mysql
27
- - postgresql
28
-
29
- gemfile:
30
- - Gemfile
31
- - gemfiles/libraries.gemfile
32
- - gemfiles/rails50.gemfile
33
- - gemfiles/rails60.gemfile
34
-
35
- matrix:
36
- exclude:
37
- - rvm: 2.4
38
- gemfile: gemfiles/rails60.gemfile
39
-
40
- notifications:
41
- slack:
42
- rooms:
43
- secure: Ae9tJmBO9/sgYWthHRS5uufAf8s6uIMdtmQn+gBkcAXaMWJgt1IAzpIj98Qsg15/lhHS8ezwCe7WIAWC4mM1cnwl/hP195dbgLzF4D2uOjaIXj55ckIIE06jBX1yHapu0vMFSaKwgL4auEEVg4xkehBb9TzLNG/LbExadZQOIkeLdtgU04VrPfDC9pZWPplXT4kzjMZkMESzBYaCfNl6eenu0sHdoxSvngv52MImog6aZQKT+k3ccAa1yzZNhUdy4gSZi1HafXdSCn4UTPDtkNIlsWBW8yprICLxZV/NvgUTEEJYSHO6Ucx9Er22LzKtNbEYlAs1GErGWjDzpqvvXt/5UwNx0rLDrVKI/xMIELEbT047mSgJ8tpVd0ErGA/bnDfbF2oDFTAEXq4jaeAMaVR9Q1CW0ZZF2Jh5jOKc41U+AVGgaMDaBA0ukDSeXvJcnteZ9EllOO8ZAtC2FKtBNnj36W13KTR0TkjMCl+KOiVJXnOyRJIR+CUL9BdDuODBVPZHqZaZ48N+MOG9dRb+fvkdTnwh7hU+UmR08kOsd4x+dDlm4dBrFrB8v8udQ7XuBN9AOZty2CPWFUSJM1BxtetyS3We0L6lQ8o/B9STFNK4KTa/M8wNq1Fm85h3ZKHHIHDpQnXM6vD8SV1p9u91C5UI8rEyxzW5IaT2oqXsCzU=