instana 1.7.13 → 1.7.14a

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: 5ce1ae9e4a902bb968cbed7ed7c2d8a90a92e496e81090934af584a5b949a343
4
- data.tar.gz: 82375ac00d24f5e82beb01037dd065b326d79d560b651c90bc5721ddbf49b8b6
3
+ metadata.gz: 36df55bd5e441471e4d1cb458fb39eeae3c2fa4acb02025b77af116cd41c34e3
4
+ data.tar.gz: dd3b615e82b2776a563cdcdc5a8d201e723458af5425c028dbc5bee9f4fb5110
5
5
  SHA512:
6
- metadata.gz: fc8566333b29d5b8ee33bde902586843687863941d88d24b404f747d86586d3f20a6b79f603b2e734f872f7db84acdef68ecd16f962f871f54602ff795796ce3
7
- data.tar.gz: e08638fdecfbc8fbff0c6bcf64533a478a2d2c45df6c651b6451150412a1e3d0e190f3ef52c8b98cddf94639e24aa0750aba71c83d4bbaffecfdd90315192550
6
+ metadata.gz: ebe24218a34bec53e1e2ecbc66b660f5e41b6e5a0ecfa986de58e012245231c900a9a705dd213aa8141659305c13660c66d39beb433a11ecefea95b013427b08
7
+ data.tar.gz: 58607b6007e733984c0aa6da9ebf45dfca9947b5365001b398e3415714315659512943194acd84e837ad0ed6a3df7b63e1e45b8fb3c895849a9930c3ca20eb5c
data/lib/instana/agent.rb CHANGED
@@ -152,8 +152,10 @@ module Instana
152
152
  # called from an already initialized background thread.
153
153
  #
154
154
  def start
155
- unless host_agent_ready?
156
- ::Instana.logger.warn "Host agent not available. Will retry periodically. (Set env INSTANA_QUIET=1 to shut these messages off)"
155
+ if !host_agent_ready?
156
+ if !ENV.key?("INSTANA_QUIET")
157
+ ::Instana.logger.warn "Host agent not available. Will retry periodically. (Set env INSTANA_QUIET=1 to shut these messages off)"
158
+ end
157
159
  end
158
160
 
159
161
  loop do
@@ -70,7 +70,7 @@ module Instana
70
70
  # Add in process related that could have changed since
71
71
  # snapshot was taken.
72
72
  p = { :pid => ::Instana.agent.report_pid }
73
- p[:name] = ::Instana.agent.process[:name]
73
+ p[:name] = ::Instana::Util.get_app_name
74
74
  p[:exec_args] = ::Instana.agent.process[:arguments]
75
75
  payload.merge!(p)
76
76
  else
@@ -114,4 +114,3 @@ module Instana
114
114
  end
115
115
  end
116
116
  end
117
-
data/lib/instana/util.rb CHANGED
@@ -50,20 +50,24 @@ module Instana
50
50
  #return unless %w(development, test).include? env
51
51
 
52
52
  if RUBY_VERSION > '1.8.7'
53
- require 'pry-byebug'
54
-
55
- if defined?(PryByebug)
56
- Pry.commands.alias_command 'c', 'continue'
57
- Pry.commands.alias_command 's', 'step'
58
- Pry.commands.alias_command 'n', 'next'
59
- Pry.commands.alias_command 'f', 'finish'
60
-
61
- Pry::Commands.command(/^$/, 'repeat last command') do
62
- _pry_.run_command Pry.history.to_a.last
53
+ begin
54
+ require 'pry-byebug'
55
+
56
+ if defined?(PryByebug)
57
+ Pry.commands.alias_command 'c', 'continue'
58
+ Pry.commands.alias_command 's', 'step'
59
+ Pry.commands.alias_command 'n', 'next'
60
+ Pry.commands.alias_command 'f', 'finish'
61
+
62
+ Pry::Commands.command(/^$/, 'repeat last command') do
63
+ _pry_.run_command Pry.history.to_a.last
64
+ end
63
65
  end
64
- end
65
66
 
66
- binding.pry
67
+ binding.pry
68
+ rescue LoadError
69
+ ::Instana.logger.warn("No debugger in bundle. Couldn't load pry-byebug.")
70
+ end
67
71
  else
68
72
  require 'ruby-debug'; debugger
69
73
  end
@@ -158,6 +162,23 @@ module Instana
158
162
  process
159
163
  end
160
164
 
165
+ # Best effort to determine a name for the instrumented application
166
+ # on the dashboard.
167
+ #
168
+ def get_app_name
169
+ name = File.basename($0)
170
+
171
+ # Framework Detection
172
+ if defined?(::RailsLts) || defined?(::Rails)
173
+ name = Rails.application.class.to_s.split('::')[0]
174
+ end
175
+
176
+ return name
177
+ rescue Exception => e
178
+ Instana.logger.info "#{__method__}:#{File.basename(__FILE__)}:#{__LINE__}: #{e.message}"
179
+ Instana.logger.debug e.backtrace.join("\r\n")
180
+ end
181
+
161
182
  # Get the current time in milliseconds from the epoch
162
183
  #
163
184
  # @return [Integer] the current time in milliseconds
@@ -1,4 +1,4 @@
1
1
  module Instana
2
- VERSION = "1.7.13"
2
+ VERSION = "1.7.14a"
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.13
4
+ version: 1.7.14a
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-07-25 00:00:00.000000000 Z
11
+ date: 2018-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -305,9 +305,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
305
305
  version: '2.1'
306
306
  required_rubygems_version: !ruby/object:Gem::Requirement
307
307
  requirements:
308
- - - ">="
308
+ - - ">"
309
309
  - !ruby/object:Gem::Version
310
- version: '0'
310
+ version: 1.3.1
311
311
  requirements: []
312
312
  rubyforge_project:
313
313
  rubygems_version: 2.7.6