appsignal 0.6.2 → 0.6.3.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.travis.yml +2 -0
- data/CHANGELOG.md +3 -0
- data/gemfiles/3.0.gemfile +1 -1
- data/gemfiles/3.1.gemfile +1 -1
- data/gemfiles/3.2.gemfile +1 -1
- data/gemfiles/4.0.gemfile +1 -1
- data/lib/appsignal/agent.rb +13 -5
- data/lib/appsignal/version.rb +1 -1
- data/lib/generators/appsignal/appsignal_generator.rb +1 -1
- data/lib/generators/appsignal/templates/appsignal.yml +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2FjMjk1ZGYyZjkwNDI5NmZhNTkzMTVlMjBmZDViNjRlNTEwZTZhOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDUxODgxMTg5ZjRiMWM2NzQwYzhiOTg5ZDQ3NjBiMGI1MzI0ZTY1Yg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MGNkYTExNDNkMDI4ZWM4M2JkNzVkYzVkNWQyYzA4NDc1NTI5Njk1NTAxNzk2
|
10
|
+
MmExY2IzNWJhMmUwOGI0YzE0OTNmZDgzNDlmZjI3MGE5ZjMwNzIyZjJkZDlm
|
11
|
+
MmU1MDc5YTRlMGQ4MTNhOGMyNWIzODNjMmY0ODg1NDJmMTExYzA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzM4ZDAwMzRjNWM4Mjg4M2ZmOTQ2NzdmN2ZhMTlkOTkyNjE0MjViZjg5ZWU5
|
14
|
+
MTU5N2VkOGFiOTcwMDRhYmI4ZTI5ZmM5ODA1OWZmOWRiYjVmZjAzMmQ0ODlk
|
15
|
+
Zjk2YTYwNDlhN2VhMTQ4ZmYzZDVmZTRjN2QxOGJjYTBhM2RmMzA=
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/gemfiles/3.0.gemfile
CHANGED
data/gemfiles/3.1.gemfile
CHANGED
data/gemfiles/3.2.gemfile
CHANGED
data/gemfiles/4.0.gemfile
CHANGED
data/lib/appsignal/agent.rb
CHANGED
@@ -2,12 +2,13 @@ module Appsignal
|
|
2
2
|
class Agent
|
3
3
|
ACTION = 'log_entries'.freeze
|
4
4
|
|
5
|
-
attr_reader :aggregator, :thread, :active, :sleep_time, :transmitter
|
5
|
+
attr_reader :aggregator, :thread, :active, :sleep_time, :transmitter, :aggregator_semaphore
|
6
6
|
|
7
7
|
def initialize
|
8
8
|
return unless Appsignal.active?
|
9
9
|
@sleep_time = 60.0
|
10
10
|
@aggregator = Aggregator.new
|
11
|
+
@aggregator_semaphore = Mutex.new
|
11
12
|
@retry_request = true
|
12
13
|
@thread = Thread.new do
|
13
14
|
while true do
|
@@ -25,15 +26,22 @@ module Appsignal
|
|
25
26
|
end
|
26
27
|
|
27
28
|
def enqueue(transaction)
|
28
|
-
|
29
|
+
aggregator_semaphore.synchronize do
|
30
|
+
aggregator.add(transaction)
|
31
|
+
end
|
29
32
|
end
|
30
33
|
|
31
34
|
def send_queue
|
32
35
|
Appsignal.logger.debug("Sending queue")
|
33
|
-
|
34
|
-
|
36
|
+
aggregator_to_be_sent = nil
|
37
|
+
aggregator_semaphore.synchronize do
|
38
|
+
aggregator_to_be_sent = aggregator
|
39
|
+
@aggregator = Aggregator.new
|
40
|
+
end
|
35
41
|
begin
|
36
|
-
handle_result
|
42
|
+
handle_result(
|
43
|
+
transmitter.transmit(aggregator_to_be_sent.post_processed_queue!)
|
44
|
+
)
|
37
45
|
rescue Exception => ex
|
38
46
|
Appsignal.logger.error "#{ex.class} while sending queue: #{ex.message}"
|
39
47
|
Appsignal.logger.error ex.backtrace.join('\n')
|
data/lib/appsignal/version.rb
CHANGED
@@ -60,6 +60,6 @@ class AppsignalGenerator < Rails::Generators::Base
|
|
60
60
|
def environments
|
61
61
|
@environments ||= Dir.glob(
|
62
62
|
File.join(%w(. config environments *.rb))
|
63
|
-
).map { |o| File.basename(o, ".rb")
|
63
|
+
).map { |o| File.basename(o, ".rb") } - EXCLUDED_ENVIRONMENTS
|
64
64
|
end
|
65
65
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# Active environments count towards the account plan limit.
|
4
4
|
<%- environments.each do |environment| -%>
|
5
5
|
<%= environment %>:
|
6
|
-
<%- if selected_environment
|
6
|
+
<%- if selected_environment == environment -%>
|
7
7
|
# The API key used by the AppSignal gem to push this specific environment to
|
8
8
|
# AppSignal. (required)
|
9
9
|
#
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appsignal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3.beta.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-
|
15
|
+
date: 2013-09-10 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rails
|
@@ -207,9 +207,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
207
207
|
version: '0'
|
208
208
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
209
209
|
requirements:
|
210
|
-
- - ! '
|
210
|
+
- - ! '>'
|
211
211
|
- !ruby/object:Gem::Version
|
212
|
-
version:
|
212
|
+
version: 1.3.1
|
213
213
|
requirements: []
|
214
214
|
rubyforge_project:
|
215
215
|
rubygems_version: 2.0.3
|