scout_apm 1.2.0.pre12 → 1.2.0.pre13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c2662815011cf49ea8705e43d05c640c0f8bb3bf
4
- data.tar.gz: db64b05bef1ed18f057850d3ee9e3b82c3caa5f2
3
+ metadata.gz: 3dd9ed781be96c9560a930cd06d77f1e16dc5850
4
+ data.tar.gz: 55e2e5b19b2b7cba3762acfbf7770885a7aa587e
5
5
  SHA512:
6
- metadata.gz: 8cb4d0a454e78d70d5518b4f22d35e5f1c95afa73082fc9f15c684fb132ced136f01c9e8cda586ce7b2f33459fcafe03a54b1b4c0ab97a71cbd5d3449bcedbc3
7
- data.tar.gz: 3717ff448998e6d3dee06bc0217f45d83fca5d23feeac61597af6b780375500c81c65d2fc34ead0a93ae31a5785f2339ddf09b4f33f4fd5d6241ea56246b8d3e
6
+ metadata.gz: 5fd9b980f60e9acf3afaa82ced352a3b1af769fed1daadeb08ed583789b611801c67aabbf8ed1ac2141c56194effd5d489e74d4e344a3735ecee138874c714b5
7
+ data.tar.gz: 7c5ba8af066c1416f9edfd44488f2309868d42d8a528ac68685e5ba39f6f82a420acc3e24b0843a37f385bfd793e019821e0eefceb9254bbfb5a228ff390ca91
data/.gitignore CHANGED
@@ -4,3 +4,4 @@
4
4
  Gemfile.lock
5
5
  pkg/*
6
6
  .rvmrc
7
+ .idea
@@ -29,6 +29,10 @@ module ScoutApm
29
29
  @config_path = config_path
30
30
  end
31
31
 
32
+ def config_file_exists?
33
+ File.exist?(config_path)
34
+ end
35
+
32
36
  # Fetch a config value.
33
37
  # It first attempts to fetch an ENV var prefixed with 'SCOUT_',
34
38
  # then from the settings file.
@@ -104,7 +104,8 @@ module ScoutApm
104
104
  end
105
105
 
106
106
  def hostname
107
- @hostname ||= Agent.instance.config.value("hostname") || platform_integration.hostname
107
+ config_hostname = Agent.instance.config.value("hostname", !Agent.instance.config.config_file_exists?)
108
+ @hostname ||= config_hostname || platform_integration.hostname
108
109
  end
109
110
 
110
111
  # Returns the whole integration object
@@ -121,11 +121,7 @@ module ScoutApm
121
121
  # TODO: Figure out a way to not have this duplicate what's in Samplers, and also on server's ingest
122
122
  PASSTHROUGH_METRICS = ["CPU", "Memory", "Instance", "Controller"]
123
123
 
124
- # Calculate any aggregate metrics necessary.
125
- #
126
- # A hash of { MetricMeta => MetricStat }
127
- # This represents the aggregate metrics over the course of the minute.
128
- # "ActiveRecord/all", "View/all", "HTTP/all" and similar
124
+ # Absorbs a single new metric into the aggregates
129
125
  def absorb(metric)
130
126
  meta, stat = metric
131
127
 
@@ -1,4 +1,4 @@
1
1
  module ScoutApm
2
- VERSION = "1.2.0.pre12"
2
+ VERSION = "1.2.0.pre13"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout_apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0.pre12
4
+ version: 1.2.0.pre13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Haynes