logjam_agent 0.14.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/lib/logjam_agent.rb +3 -0
- data/lib/logjam_agent/railtie.rb +2 -0
- data/lib/logjam_agent/request.rb +3 -0
- data/lib/logjam_agent/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ad1b7b44556c48ab799684162444761e910c234
|
4
|
+
data.tar.gz: e5b28e6cbee67466613291b8938deda0972e925d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a16ec916208d1a8ca7cf145900cafb72fc3337dcb38c36ef8bdb1ef66d6e755eb339707709ccd2412db1ab8c56010ebc86a1e35b38f3fee348eb1d2f2b777d6
|
7
|
+
data.tar.gz: ab29bc6133ae428fc3f0f0e3e816f03fc6858ddf3e11d10b987b12ad3a0303569e0f32052667ad8fcace6c7f0de7b09ab8a5f671e7fdc554ef3bd723b31b239f
|
data/README.md
CHANGED
@@ -35,6 +35,9 @@ module LogjamAgent
|
|
35
35
|
# Configure the environment name (optional). Defaults to Rails.env.
|
36
36
|
# self.environment_name = Rails.env
|
37
37
|
|
38
|
+
# Configure the application revision (optional). Defaults to (git rev-parse HEAD).
|
39
|
+
# self.application_revision = "f494e11afa0738b279517a2a96101a952052da5d"
|
40
|
+
|
38
41
|
# Configure request data forwarder for ZeroMQ.
|
39
42
|
add_forwarder(:zmq, :host => "logjam.instance.at.your.org", :port => 9605)
|
40
43
|
|
data/lib/logjam_agent.rb
CHANGED
data/lib/logjam_agent/railtie.rb
CHANGED
@@ -61,6 +61,8 @@ module LogjamAgent
|
|
61
61
|
# ignore asset requests in development
|
62
62
|
LogjamAgent.ignore_asset_requests = Rails.env.development?
|
63
63
|
|
64
|
+
LogjamAgent.application_revision = `git rev-parse HEAD 2>/dev/null`.chomp rescue ""
|
65
|
+
|
64
66
|
# patch controller testing to create a logjam request, because middlewares aren't executed
|
65
67
|
if Rails.env.test?
|
66
68
|
ActiveSupport.on_load(:action_controller) do
|
data/lib/logjam_agent/request.rb
CHANGED
@@ -17,6 +17,9 @@ module LogjamAgent
|
|
17
17
|
@uuid = LogjamAgent.generate_uuid
|
18
18
|
@fields = initial_fields.merge(:request_id => @uuid, :host => LogjamAgent.hostname,
|
19
19
|
:process_id => Process.pid, :lines => @lines)
|
20
|
+
unless (revision = LogjamAgent.application_revision).blank?
|
21
|
+
@fields[:revision] = revision
|
22
|
+
end
|
20
23
|
if start_time = @fields.delete(:start_time)
|
21
24
|
self.start_time = start_time
|
22
25
|
end
|
data/lib/logjam_agent/version.rb
CHANGED