logjam_agent 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,6 +27,9 @@ module LogjamAgent
27
27
  mattr_accessor :environment_name
28
28
  self.environment_name = nil
29
29
 
30
+ mattr_accessor :action_name_proc
31
+ self.action_name_proc = lambda{|name| name}
32
+
30
33
  def self.get_hostname
31
34
  n = Socket.gethostname
32
35
  if n.split('.').size > 1
@@ -37,7 +37,8 @@ module LogjamAgent
37
37
  status = result ? result.first : 500
38
38
  duration, additions, view_time, action = Thread.current.thread_variable_get(:time_bandits_completed_info)
39
39
 
40
- request_info = {:total_time => run_time_ms, :code => status, :action => action, :view_time => view_time || 0.0}
40
+ action_name = LogjamAgent.action_name_proc.call(action)
41
+ request_info = {:total_time => run_time_ms, :code => status, :action => action_name, :view_time => view_time || 0.0}
41
42
 
42
43
  message = "Completed #{status} #{::Rack::Utils::HTTP_STATUS_CODES[status]} in %.1fms" % run_time_ms
43
44
  message << " (#{additions.join(' | ')})" unless additions.blank?
@@ -1,3 +1,3 @@
1
1
  module LogjamAgent
2
- VERSION = "0.6.2"
2
+ VERSION = "0.6.3"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logjam_agent
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 2
10
- version: 0.6.2
9
+ - 3
10
+ version: 0.6.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Stefan Kaes
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-01-01 00:00:00 Z
18
+ date: 2013-01-08 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rake