instana 1.10.4-java → 1.10.5-java

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: 346cd335b9d396c17a51bae447c174e8fc7a51b7b50d8ca9cf529edf8f8f79af
4
- data.tar.gz: bd715a791082dc0cf60d4de992be8aea223dfe4a4cf91e4f91693020754939c8
3
+ metadata.gz: 2a38b4a5f5040ad04b434717f6317c5944598c505d96aaa02cde4f91d3315574
4
+ data.tar.gz: f116278027e0d0227aec05834dc81fed7a00fc130dfabd672a6312b35c13b978
5
5
  SHA512:
6
- metadata.gz: 7fbd3d312c7d3761633d8f2895b68052495775a166a823fcc3b524be2246f3d10316aedcb0e70b87e39e8a1490cdb58fc51b58e78da09bf2c667c468ad1fadaf
7
- data.tar.gz: 8b78f6772d7325baadb37c34f02e1ec4d35909d07f16674fc1e58c1a1f6f933abac8a9ddb16cfcef8fe7fdaff439c79e031e253b38d888ecde1f1864c70cb84b
6
+ metadata.gz: 7483fbfa0f44f4b16a7837aa3ad3e4565ff719ce6bc862869d0577d105134e0135e847f74fd0dc60c90c78cc90c88ec10e240dc961c85e1e461f10f2e0be3c53
7
+ data.tar.gz: 27d1facb5b032a7bf17ea2661c3da84afc97813a80e29fc004e5ff30d5141104e78de2b503b57c47cd0c11bea8a53be14e0622753342ddcff3249858b39eef08
data/README.md CHANGED
@@ -59,32 +59,11 @@ This Ruby gem provides a simple API for tracing and also supports [OpenTracing](
59
59
 
60
60
  You can find more documentation covering supported components and minimum versions in the Instana [documentation portal](https://docs.instana.io/ecosystem/ruby/).
61
61
 
62
- ## Want End User Monitoring?
62
+ # Want End User Monitoring (EUM)?
63
63
 
64
- Instana provides deep end user monitoring that links server side traces with browser events.
64
+ Instana provides deep end user monitoring that links server side traces with browser events to give you a complete view from server to browser.
65
65
 
66
- For Ruby templates and views, get your EUM API key from your Instana dashboard and you can call `::Instana::Helpers.eum_snippet('example_api_key_string')` from within your layout file. This will output
67
- a small javascript snippet of code to instrument browser events. It's based on [Weasel](https://github.com/instana/weasel). Check it out.
68
-
69
- As an example for Haml, you could do the following:
70
-
71
- ```ruby
72
- %html{ :lang => "en", :xmlns => "http://www.w3.org/1999/xhtml" }
73
- %head
74
- - if user_signed_in?
75
- = raw ::Instana::Helpers.eum_snippet('example_api_key_string', :username => current_user.username)
76
- - else
77
- = raw ::Instana::Helpers.eum_snippet('example_api_key_string')
78
- %body
79
- ```
80
- Make sure to use the `raw` helper so the javascript isn't interpolated with escape strings.
81
-
82
- The optional second argument to `::Instana::Helpers.eum_snippet` is a hash of metadata key/values that will be reported along
83
- with the browser instrumentation.
84
-
85
- ![Instana EUM example with metadata](https://s3.amazonaws.com/instana/Instana+Gameface+EUM+with+metadata+2016-12-22+at+15.32.01.png)
86
-
87
- See also the [End User Monitoring](https://docs.instana.io/products/website_monitoring/) in the Instana documentation portal.
66
+ See the [End User Monitoring](/products/website_monitoring/#configuration) page for more information.
88
67
 
89
68
  ## Development
90
69
 
data/Rakefile CHANGED
@@ -27,6 +27,7 @@ Rake::TestTask.new(:test) do |t|
27
27
  when /libraries/
28
28
  t.test_files = FileList['test/instrumentation/*_test.rb',
29
29
  'test/frameworks/cuba_test.rb',
30
+ 'test/frameworks/rack_test.rb',
30
31
  'test/frameworks/roda_test.rb',
31
32
  'test/frameworks/sinatra_test.rb']
32
33
  else
@@ -28,8 +28,12 @@ module Instana
28
28
  # Headers are available in this format: HTTP_X_CAPTURE_THIS
29
29
  rack_header = 'HTTP_' + custom_header.upcase
30
30
  rack_header.tr!('-', '_')
31
+
31
32
  if env.key?(rack_header)
32
- kvs["http.#{custom_header}"] = env[rack_header]
33
+ unless kvs[:http].key?(:header)
34
+ kvs[:http][:header] = {}
35
+ end
36
+ kvs[:http][:header][custom_header.to_sym] = env[rack_header]
33
37
  end
34
38
  }
35
39
  end
@@ -1,4 +1,4 @@
1
1
  module Instana
2
- VERSION = "1.10.4"
2
+ VERSION = "1.10.5"
3
3
  VERSION_FULL = "instana-#{VERSION}"
4
4
  end
@@ -46,6 +46,9 @@ class RackTest < Minitest::Test
46
46
  assert first_span.key?(:stack)
47
47
  assert_equal 2, first_span[:stack].count
48
48
  refute_nil first_span[:stack].first[:c].match(/instana\/instrumentation\/rack.rb/)
49
+
50
+ # Restore to default
51
+ ::Instana.config[:collect_backtraces] = false
49
52
  end
50
53
 
51
54
  def test_basic_get_with_custom_service_name
@@ -164,4 +167,34 @@ class RackTest < Minitest::Test
164
167
 
165
168
  assert last_response.ok?
166
169
  end
170
+
171
+ def test_custom_headers_capture
172
+ clear_all!
173
+ ::Instana.config[:collect_backtraces] = true
174
+ ::Instana.agent.extra_headers = %w(X-Capture-This X-Capture-That)
175
+
176
+ get '/mrlobster', {}, { "HTTP_X_CAPTURE_THIS" => "ThereYouGo" }
177
+ assert last_response.ok?
178
+ assert_equal "ThereYouGo", last_request.env["HTTP_X_CAPTURE_THIS"]
179
+
180
+ spans = ::Instana.processor.queued_spans
181
+
182
+ # Span validation
183
+ assert_equal 1, spans.count
184
+ first_span = spans.first
185
+
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"]
190
+
191
+ # 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/)
195
+
196
+ # Restore to default
197
+ ::Instana.config[:collect_backtraces] = false
198
+ ::Instana.agent.extra_headers = nil
199
+ end
167
200
  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.10.4
4
+ version: 1.10.5
5
5
  platform: java
6
6
  authors:
7
7
  - Peter Giacomo Lombardo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-17 00:00:00.000000000 Z
11
+ date: 2019-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement