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 +4 -4
- data/Configuration.md +14 -0
- data/lib/instana/instrumentation.rb +14 -11
- data/lib/instana/util.rb +6 -3
- data/lib/instana/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ab9e6f138a2e7419056e1b1011c245f33062baa99764a79b74f6ff27f954982
|
4
|
+
data.tar.gz: 60e029e0126becfa038f89a27d88b13b8f747e5267acd893385a2a09f0b05dc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
7
|
-
#
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
-
|
169
|
+
if ENV.key?('INSTANA_SERVICE_NAME')
|
170
|
+
name = ENV['INSTANA_SERVICE_NAME']
|
170
171
|
|
171
|
-
|
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
|
data/lib/instana/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|