logjam_agent 0.5.9 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -15,11 +15,11 @@ module LogjamAgent
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def request
|
18
|
-
Thread.current
|
18
|
+
Thread.current.thread_variable_get(:logjam_request)
|
19
19
|
end
|
20
20
|
|
21
21
|
def request=(request)
|
22
|
-
Thread.current
|
22
|
+
Thread.current.thread_variable_set(:logjam_request, request)
|
23
23
|
end
|
24
24
|
|
25
25
|
def start_request(app, env, initial_fields={})
|
@@ -36,7 +36,7 @@ module LogjamAgent
|
|
36
36
|
|
37
37
|
def add(severity, message = nil, progname = nil, &block)
|
38
38
|
return if level > severity
|
39
|
-
request = self.request || Thread.main
|
39
|
+
request = self.request || Thread.main.thread_variable_get(:logjam_request)
|
40
40
|
if message.is_a?(Exception)
|
41
41
|
request.add_exception(message.class.to_s) if request
|
42
42
|
message = format_exception(message)
|
@@ -20,7 +20,7 @@ module LogjamAgent
|
|
20
20
|
def before_dispatch(env, start_time)
|
21
21
|
TimeBandits.reset
|
22
22
|
|
23
|
-
Thread.current
|
23
|
+
Thread.current.thread_variable_set(:time_bandits_completed_info, nil)
|
24
24
|
|
25
25
|
request = ActionDispatch::Request.new(env)
|
26
26
|
|
@@ -35,7 +35,7 @@ module LogjamAgent
|
|
35
35
|
|
36
36
|
def after_dispatch(env, result, run_time_ms)
|
37
37
|
status = result ? result.first : 500
|
38
|
-
duration, additions, view_time, action = Thread.
|
38
|
+
duration, additions, view_time, action = Thread.thread_variable_get(:time_bandits_completed_info)
|
39
39
|
|
40
40
|
request_info = {:total_time => run_time_ms, :code => status, :action => action, :view_time => view_time || 0.0}
|
41
41
|
|
data/lib/logjam_agent/version.rb
CHANGED
data/logjam_agent.gemspec
CHANGED
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:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 6
|
9
|
+
- 0
|
10
|
+
version: 0.6.0
|
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: 2012-
|
18
|
+
date: 2012-11-02 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rake
|
@@ -81,12 +81,11 @@ dependencies:
|
|
81
81
|
requirements:
|
82
82
|
- - ">="
|
83
83
|
- !ruby/object:Gem::Version
|
84
|
-
hash:
|
84
|
+
hash: 13
|
85
85
|
segments:
|
86
86
|
- 0
|
87
|
-
-
|
88
|
-
|
89
|
-
version: 0.2.2
|
87
|
+
- 3
|
88
|
+
version: "0.3"
|
90
89
|
type: :runtime
|
91
90
|
version_requirements: *id005
|
92
91
|
description: Logjam logger and request information forwarding
|