instana 1.7.14 → 1.7.15

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: d454794b8ce761266410f8d5945c35749d6967f1b84ff6f9a3d566dbde75a5b8
4
- data.tar.gz: ee04627b188aefdbb0ef70904dcfb62fbea426531f2de12cba58b5a25bfb56e4
3
+ metadata.gz: 9ab9e6f138a2e7419056e1b1011c245f33062baa99764a79b74f6ff27f954982
4
+ data.tar.gz: 60e029e0126becfa038f89a27d88b13b8f747e5267acd893385a2a09f0b05dc7
5
5
  SHA512:
6
- metadata.gz: '0905681ab7883eb4a04b8bf527ef3c595823cd35b70a0ca2997f2640fb198d118cd54826ca8d44691edb0197112f3777f7be98344577a15a09b6e6ee4647655a'
7
- data.tar.gz: d57d325e093b1b52c39f85e3defa3253ecdd0b47a903c920de5fa05a4a30af558443022bb7adca6f7f03701d8f41048b3c2b98433cead5275a7f34af3f9d89f1
6
+ metadata.gz: 86c29e0278ddb1ea596996fd9c4f612356336143a147fcde020d731e9af2d442f273a09485fc87c39545386b9bd4b3d4ecabe568dcc03a20d3458af4aba00e1c
7
+ data.tar.gz: '08e1b2e767af48ecd4b8bffb5afd33dcde1b6c57ee67e4e96a7b53aaefee6df7e6097616df9a9507cb473471e60d75fa78ce23dbdfe41a3c05ff57f00ac530c1'
data/Configuration.md CHANGED
@@ -18,6 +18,12 @@ Instana.config[:metrics][:enabled] # default true
18
18
  Instana.config[:tracing][:enabled] # default true
19
19
  ```
20
20
 
21
+ If you wish to disable the built-in instrumentation but still permit custom instrumentation, set the following environment variable for your application:
22
+
23
+ ```sh
24
+ export INSTANA_DISABLE_AUTO_INSTR=true
25
+ ```
26
+
21
27
  ## Agent Communication
22
28
 
23
29
  The sensor tries to communicate with the Instana agent via IP 127.0.0.1 and as a fallback via the host's default gateway. Should the agent not be available under either of these IPs, e.g. due to iptables or other networking tricks, you can use the agentHost option to use a custom IP.
@@ -58,6 +64,14 @@ Because backtraces are somewhat expensive in Ruby, backtrace collection is disab
58
64
 
59
65
  This will in-turn enable CodeView in your dashboard to get code level insights.
60
66
 
67
+ ## Setting a Custom Service Name
68
+
69
+ You can set a custom service name for your application by setting the `INSTANA_SERVICE_NAME` environment variable:
70
+
71
+ ```sh
72
+ export INSTANA_SERVICE_NAME=MrBlueSky
73
+ ```
74
+
61
75
  ## Rack Middleware
62
76
 
63
77
  This gem will detect and automagically insert the Instana Rack middleware into the middleware stack when a [supported framework](https://instana.atlassian.net/wiki/display/DOCS/Ruby) is present. We are currently adding support for more frameworks. If you are using a yet to be instrumented framework, you can insert the Instana Rack middleware with the following:
@@ -2,17 +2,20 @@ module Instana
2
2
  AUTOLOAD_DIRECTORIES = [:instrumentation, :frameworks].freeze
3
3
  end
4
4
 
5
- #
6
- # Load all of the files in the specified subdirectories
7
- #
8
- ::Instana::AUTOLOAD_DIRECTORIES.each do |d|
9
- pattern = File.join(File.dirname(__FILE__), d.to_s, '*.rb')
10
- Dir.glob(pattern) do |f|
11
- begin
12
- require f
13
- rescue => e
14
- Instana.logger.error "#{__method__}:#{File.basename(__FILE__)}:#{__LINE__}: #{e.message}"
15
- Instana.logger.debug e.backtrace.join("\r\n")
5
+
6
+ if !ENV.key?('INSTANA_DISABLE_AUTO_INSTR')
7
+ #
8
+ # Load all of the files in the specified subdirectories
9
+ #
10
+ ::Instana::AUTOLOAD_DIRECTORIES.each do |d|
11
+ pattern = File.join(File.dirname(__FILE__), d.to_s, '*.rb')
12
+ Dir.glob(pattern) do |f|
13
+ begin
14
+ require f
15
+ rescue => e
16
+ Instana.logger.error "#{__method__}:#{File.basename(__FILE__)}:#{__LINE__}: #{e.message}"
17
+ Instana.logger.debug e.backtrace.join("\r\n")
18
+ end
16
19
  end
17
20
  end
18
21
  end
data/lib/instana/util.rb CHANGED
@@ -166,11 +166,14 @@ module Instana
166
166
  # on the dashboard.
167
167
  #
168
168
  def get_app_name
169
- name = File.basename($0)
169
+ if ENV.key?('INSTANA_SERVICE_NAME')
170
+ name = ENV['INSTANA_SERVICE_NAME']
170
171
 
171
- # Framework Detection
172
- if defined?(::RailsLts) || defined?(::Rails)
172
+ elsif defined?(::RailsLts) || defined?(::Rails)
173
173
  name = Rails.application.class.to_s.split('::')[0]
174
+
175
+ else
176
+ name = File.basename($0)
174
177
  end
175
178
 
176
179
  return name
@@ -1,4 +1,4 @@
1
1
  module Instana
2
- VERSION = "1.7.14"
2
+ VERSION = "1.7.15"
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.14
4
+ version: 1.7.15
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-27 00:00:00.000000000 Z
11
+ date: 2018-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler