instana 1.11.3 → 1.11.4

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: 964de6b7e7cf62695558794bb80a056a87427f0fc67d6428eaaa1b3bd1e4d7f8
4
- data.tar.gz: d9f7d98a110ef3a73024f26050af10f1fde12dda500ec665dfe28062579577dd
3
+ metadata.gz: 0b2f239d9d7286752e2650375e8096e9525db098a7e5b09486e36dbd89758eb1
4
+ data.tar.gz: 14ebd785f5ef8333360214ad9731583976f96c62980b6d0b7927338d25a0ca90
5
5
  SHA512:
6
- metadata.gz: bdb19c8b417c5d22918d3275a1bbfbe956ebd72b2672083b7045e941ea58dccf8d6fea00e5ec17ebf14a95de0e90ce68bbd936119d87f5632a824135f5afc722
7
- data.tar.gz: 145abd6cfb3c1c267a3099fe715db07fe8e6d64dd6a0c47a29d7923d90ddfac2b7b7770b229034ef3e5d8c2a8e3b873dacf6ec47e6795690b9dee9625d37c17a
6
+ metadata.gz: f2e560309027517414f4358421b5e9f0579254e9479cbe263c7fdd89440d924ef416a90ef2b7ff25eb7cbb3bffb3f630338d590363451de877eb9d9c70a46c32
7
+ data.tar.gz: 0e8612accc07577a4951fddde76e77789714b67ee2e749b167f18ae39f3b8e4947e65fa3f4d35cd7a9af350e9ce65fcec0119f8494760b5f8be855c792cbe229
data/.travis.yml CHANGED
@@ -6,7 +6,7 @@ cache:
6
6
  - vendor/bundle
7
7
 
8
8
  rvm:
9
- - 2.5
9
+ - 2.6
10
10
  - 2.4
11
11
 
12
12
  before_install:
@@ -30,12 +30,12 @@ gemfile:
30
30
  - Gemfile
31
31
  - gemfiles/libraries.gemfile
32
32
  - gemfiles/rails50.gemfile
33
+ - gemfiles/rails60.gemfile
33
34
 
34
35
  matrix:
35
36
  exclude:
36
- # Rails 5.0+ requires Ruby 2.2.2 or higher
37
- - rvm: 2.1.10
38
- gemfile: gemfiles/rails50.gemfile
37
+ - rvm: 2.4
38
+ gemfile: gemfiles/rails60.gemfile
39
39
 
40
40
  notifications:
41
41
  slack:
data/Rakefile CHANGED
@@ -12,7 +12,11 @@ Rake::TestTask.new(:test) do |t|
12
12
 
13
13
  if ENV.key?('BUNDLE_GEMFILE')
14
14
  case File.basename(ENV['BUNDLE_GEMFILE']).split('.').first
15
- when /rails50/
15
+ when /rails6/
16
+ t.test_files = %w(test/frameworks/rails/activerecord_test.rb
17
+ test/frameworks/rails/actioncontroller_test.rb
18
+ test/frameworks/rails/actionview5_test.rb)
19
+ when /rails5/
16
20
  t.test_files = %w(test/frameworks/rails/activerecord_test.rb
17
21
  test/frameworks/rails/actioncontroller_test.rb
18
22
  test/frameworks/rails/actionview5_test.rb)
@@ -0,0 +1,72 @@
1
+ source 'https://rubygems.org'
2
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
+
4
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
5
+ gem 'rails', '~> 6.0.2', '>= 6.0.2.1'
6
+ # Use sqlite3 as the database for Active Record
7
+ gem 'sqlite3', '~> 1.4'
8
+ # Use Puma as the app server
9
+ gem 'puma', '~> 4.1'
10
+ # Use SCSS for stylesheets
11
+ gem 'sass-rails', '>= 6'
12
+ # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
13
+ gem 'webpacker', '~> 4.0'
14
+ # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
15
+ gem 'turbolinks', '~> 5'
16
+ # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
17
+ gem 'jbuilder', '~> 2.7'
18
+ # Use Redis adapter to run Action Cable in production
19
+ # gem 'redis', '~> 4.0'
20
+ # Use Active Model has_secure_password
21
+ # gem 'bcrypt', '~> 3.1.7'
22
+
23
+ gem 'mysql2', '0.4.10'
24
+
25
+ # Use Active Storage variant
26
+ # gem 'image_processing', '~> 1.2'
27
+
28
+ # Reduces boot times through caching; required in config/boot.rb
29
+ gem 'bootsnap', '>= 1.4.2', require: false
30
+
31
+ group :development, :test do
32
+ # Call 'byebug' anywhere in the code to stop execution and get a debugger console
33
+ gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
34
+ end
35
+
36
+ group :development do
37
+ # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
38
+ gem 'web-console', '>= 3.3.0'
39
+ gem 'listen', '>= 3.0.5', '< 3.2'
40
+ # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
41
+ gem 'spring'
42
+ gem 'spring-watcher-listen', '~> 2.0.0'
43
+ end
44
+
45
+ group :test do
46
+ # Adds support for Capybara system testing and selenium driver
47
+ gem 'capybara', '>= 2.15'
48
+ gem 'selenium-webdriver'
49
+ # Easy installation and use of web drivers to run system tests with browsers
50
+ gem 'webdrivers'
51
+ end
52
+
53
+ group :development, :test do
54
+ gem 'rake'
55
+ gem 'minitest', '5.9.1'
56
+ gem 'minitest-reporters'
57
+ gem 'minitest-debugger', :require => false
58
+ gem 'rack-test'
59
+ gem 'webmock'
60
+ # public_suffix dropped support for Ruby 2.1 and earlier.
61
+ gem 'public_suffix', '< 3.0'
62
+ end
63
+
64
+
65
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
66
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
67
+
68
+ # Include the Instana Ruby gem's base set of gems
69
+ gemspec :path => File.expand_path(File.dirname(__FILE__) + '/../')
70
+
71
+
72
+ # vim:syntax=ruby
@@ -6,13 +6,13 @@ module Instana
6
6
  ::Instana::Util.method_alias(klass, :render_collection)
7
7
  end
8
8
 
9
- def render_partial_with_instana
9
+ def render_partial_with_instana(*args)
10
10
  kv_payload = { :render => {} }
11
11
  kv_payload[:render][:type] = :partial
12
12
  kv_payload[:render][:name] = @options[:partial].to_s if @options.is_a?(Hash)
13
13
 
14
14
  ::Instana.tracer.log_entry(:render, kv_payload)
15
- render_partial_without_instana
15
+ render_partial_without_instana(*args)
16
16
  rescue Exception => e
17
17
  ::Instana.tracer.log_error(e)
18
18
  raise
@@ -20,13 +20,13 @@ module Instana
20
20
  ::Instana.tracer.log_exit(:render)
21
21
  end
22
22
 
23
- def render_collection_with_instana
23
+ def render_collection_with_instana(*args)
24
24
  kv_payload = { :render => {} }
25
25
  kv_payload[:render][:type] = :collection
26
26
  kv_payload[:render][:name] = @path.to_s
27
27
 
28
28
  ::Instana.tracer.log_entry(:render, kv_payload)
29
- render_collection_without_instana
29
+ render_collection_without_instana(*args)
30
30
  rescue Exception => e
31
31
  ::Instana.tracer.log_error(e)
32
32
  raise
data/lib/instana/util.rb CHANGED
@@ -176,10 +176,14 @@ module Instana
176
176
  end
177
177
 
178
178
  if defined?(::Resque)
179
+ # Just because Resque is defined doesn't mean this is a resque process necessarily
180
+ # Check arguments for a match
179
181
  if ($0 =~ /resque-#{Resque::Version}/)
180
182
  return "Resque Worker"
181
183
  elsif ($0 =~ /resque-pool-master/)
182
184
  return "Resque Pool Master"
185
+ elsif ($0 =~ /resque-scheduler/)
186
+ return "Resque Scheduler"
183
187
  end
184
188
  end
185
189
 
@@ -187,10 +191,20 @@ module Instana
187
191
  return Rails.application.class.to_s.split('::')[0]
188
192
  end
189
193
 
190
- return File.basename($0)
194
+ if $0.to_s.empty?
195
+ return "Ruby"
196
+ end
197
+
198
+ exe = File.basename($0)
199
+ if exe == "rake"
200
+ return "Rake"
201
+ end
202
+
203
+ return exe
191
204
  rescue Exception => e
192
205
  Instana.logger.info "#{__method__}:#{File.basename(__FILE__)}:#{__LINE__}: #{e.message}"
193
206
  Instana.logger.debug { e.backtrace.join("\r\n") }
207
+ return "Ruby"
194
208
  end
195
209
 
196
210
  # Get the current time in milliseconds from the epoch
@@ -1,4 +1,4 @@
1
1
  module Instana
2
- VERSION = "1.11.3"
2
+ VERSION = "1.11.4"
3
3
  VERSION_FULL = "instana-#{VERSION}"
4
4
  end
@@ -190,7 +190,7 @@ class ActionViewTest < Minitest::Test
190
190
  assert_equal :partial, fourth_span[:data][:render][:type]
191
191
  assert_equal 'syntax_error', fourth_span[:data][:render][:name]
192
192
  assert fourth_span[:data][:log].key?(:message)
193
- assert_equal "SyntaxError", fourth_span[:data][:log][:parameters]
193
+ assert(fourth_span[:data][:log][:parameters].include?("SyntaxError"))
194
194
  assert fourth_span[:error]
195
195
  assert fourth_span[:stack]
196
196
  end
@@ -0,0 +1,18 @@
1
+ class Block < ActiveRecord::Base
2
+ def do_work(*args)
3
+ block = Block.first
4
+ block.name = "Charlie"
5
+ block.color = "Black"
6
+ block.save
7
+ end
8
+ end
9
+
10
+ class CreateBlocks < ActiveRecord::Migration[6.0]
11
+ def change
12
+ create_table :blocks do |t|
13
+ t.string :name
14
+ t.string :color
15
+ t.timestamps
16
+ end
17
+ end
18
+ end
@@ -8,7 +8,16 @@ end
8
8
  require "rails/all"
9
9
  require "action_controller/railtie" # require more if needed
10
10
  require 'rack/handler/puma'
11
- require File.expand_path(File.dirname(__FILE__) + '/../models/block')
11
+
12
+ if Rails::VERSION::STRING >= '6.0'
13
+ require File.expand_path(File.dirname(__FILE__) + '/../models/block6')
14
+ system("mkdir -p app/assets/config && echo '{}' > app/assets/config/manifest.js")
15
+ # Rails 6 Issue: https://github.com/rails/rails/issues/37183
16
+ class ApplicationController < ActionController::Base
17
+ end
18
+ else
19
+ require File.expand_path(File.dirname(__FILE__) + '/../models/block')
20
+ end
12
21
 
13
22
  ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'])
14
23
 
data/test/test_helper.rb CHANGED
@@ -25,7 +25,7 @@ allowed_sites = lambda{|uri|
25
25
  require "./test/servers/rackapp_6511"
26
26
 
27
27
  case File.basename(ENV['BUNDLE_GEMFILE'])
28
- when /rails50|rails42|rails32/
28
+ when /rails/
29
29
  require './test/servers/rails_3205'
30
30
  when /libraries/
31
31
  # Configure gRPC
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.3
4
+ version: 1.11.4
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: 2020-01-24 00:00:00.000000000 Z
11
+ date: 2020-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -201,6 +201,7 @@ files:
201
201
  - gemfiles/rails42.gemfile
202
202
  - gemfiles/rails50.gemfile
203
203
  - gemfiles/rails52.gemfile
204
+ - gemfiles/rails60.gemfile
204
205
  - instana.gemspec
205
206
  - lib/instana.rb
206
207
  - lib/instana/agent.rb
@@ -285,6 +286,7 @@ files:
285
286
  - test/jobs/sidekiq_job_1.rb
286
287
  - test/jobs/sidekiq_job_2.rb
287
288
  - test/models/block.rb
289
+ - test/models/block6.rb
288
290
  - test/servers/grpc_50051.rb
289
291
  - test/servers/helpers/sidekiq_worker_initializer.rb
290
292
  - test/servers/rackapp_6511.rb
@@ -334,6 +336,7 @@ test_files:
334
336
  - test/tracing/tracer_async_test.rb
335
337
  - test/agent/agent_test.rb
336
338
  - test/models/block.rb
339
+ - test/models/block6.rb
337
340
  - test/instrumentation/sidekiq-client_test.rb
338
341
  - test/instrumentation/resque_test.rb
339
342
  - test/instrumentation/sidekiq-worker_test.rb