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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5957018a83ecf2126ec5b5b9ac939268ca0d3b57
4
- data.tar.gz: 67dfeb8457026181730c98ed1013762e57ea483c
3
+ metadata.gz: 1ad1b7b44556c48ab799684162444761e910c234
4
+ data.tar.gz: e5b28e6cbee67466613291b8938deda0972e925d
5
5
  SHA512:
6
- metadata.gz: 2e4ea8eab816b52fbc114f025ed486f31615c225825a12e01e53a7b57c36c7937d8505ba96b3f65b7ee9f8106930d46dfc6c8bee06beed32bdb2078623ff28b0
7
- data.tar.gz: 91aa0893b909026b8136d46f634f46a83df2502073bb09f9a650e281aaecb1fa385afc84f13bcd904754a33dcf3efcec0193a621e2a8dec40eb035ed604ca965
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
 
@@ -62,6 +62,9 @@ module LogjamAgent
62
62
  mattr_accessor :environment_name
63
63
  self.environment_name = nil
64
64
 
65
+ mattr_accessor :application_revision
66
+ self.application_revision = nil
67
+
65
68
  mattr_accessor :action_name_proc
66
69
  self.action_name_proc = lambda{|name| name}
67
70
 
@@ -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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module LogjamAgent
2
- VERSION = "0.14.0"
2
+ VERSION = "0.15.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logjam_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Kaes