instana 1.7.12 → 1.7.13

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: e32605a5c0e78cf76b985377710399ca560b8f7687a196b5a11437fdbdb63cff
4
- data.tar.gz: a08bdf6e350aa25983bbbc522833c8055508d406d71b350f3714504fa26a4aa5
3
+ metadata.gz: 5ce1ae9e4a902bb968cbed7ed7c2d8a90a92e496e81090934af584a5b949a343
4
+ data.tar.gz: 82375ac00d24f5e82beb01037dd065b326d79d560b651c90bc5721ddbf49b8b6
5
5
  SHA512:
6
- metadata.gz: e153c457ec6700fd2eb26a0369e4b4842c00bd8f268df51dd0e92ce9f8f2baccf6b95f4cbd5fbf5a6c86de4f2db6d2007e65c69cfa2f177a31c70b1734fe5a1f
7
- data.tar.gz: ebddc6f88569511249f4746d77dc626a293792f04b44873e5ccb004318ff2c7face97c6ec449fc7613354a643486a9c709a2c12760adc2a578692a2a44de7467
6
+ metadata.gz: fc8566333b29d5b8ee33bde902586843687863941d88d24b404f747d86586d3f20a6b79f603b2e734f872f7db84acdef68ecd16f962f871f54602ff795796ce3
7
+ data.tar.gz: e08638fdecfbc8fbff0c6bcf64533a478a2d2c45df6c651b6451150412a1e3d0e190f3ef52c8b98cddf94639e24aa0750aba71c83d4bbaffecfdd90315192550
data/lib/instana/agent.rb CHANGED
@@ -372,8 +372,8 @@ module Instana
372
372
  end
373
373
 
374
374
  # Runs a discovery process to determine where we can contact the host agent. This is usually just
375
- # localhost but in docker can be found on the default gateway. This also allows for manual
376
- # configuration via ::Instana.config[:agent_host/port].
375
+ # localhost but in docker can be found on the default gateway. Another option is the INSTANA_AGENT_HOST
376
+ # environment variable. This also allows for manual configuration via ::Instana.config[:agent_host/port].
377
377
  #
378
378
  # @return [Hash] a hash with :agent_host, :agent_port values or empty hash
379
379
  #
@@ -414,6 +414,7 @@ module Instana
414
414
  ::Instana.logger.debug "#{__method__}: Found #{discovered[:agent_host]}:#{discovered[:agent_port]}"
415
415
  return discovered
416
416
  end
417
+
417
418
  nil
418
419
  end
419
420
 
@@ -3,9 +3,16 @@ module Instana
3
3
 
4
4
  def initialize
5
5
  @config = {}
6
-
7
- @config[:agent_host] = '127.0.0.1'
8
- @config[:agent_port] = 42699
6
+ if ENV.key?('INSTANA_AGENT_HOST')
7
+ @config[:agent_host] = ENV['INSTANA_AGENT_HOST']
8
+ else
9
+ @config[:agent_host] = '127.0.0.1'
10
+ end
11
+ if ENV.key?('INSTANA_AGENT_PORT')
12
+ @config[:agent_port] = ENV['INSTANA_AGENT_PORT']
13
+ else
14
+ @config[:agent_port] = 42699
15
+ end
9
16
 
10
17
  # Global on/off switch for prebuilt environments
11
18
  # Setting this to false will disable this gem
@@ -1,4 +1,4 @@
1
1
  module Instana
2
- VERSION = "1.7.12"
2
+ VERSION = "1.7.13"
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.12
4
+ version: 1.7.13
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-05-02 00:00:00.000000000 Z
11
+ date: 2018-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler