logjam_agent 0.34.1 → 0.34.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logjam_agent/rack/logger.rb +8 -5
- data/lib/logjam_agent/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2dfc15309d8eff89747771c28c14be766acdbffce10fa2121e07820b9d628d84
|
4
|
+
data.tar.gz: 32646c3d1020458de93151ed03f3c48248fe0bef27b404c21d1a87dfad05a82e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb48957ea64f8da0a16770ff30ff927019c09d604ccec6ea018a9b43da9a67fb63eb656ea61d535e089516a340c5c5e42454f764acc9bdcefcab75b5dfba1f0f
|
7
|
+
data.tar.gz: 5bddcb2bc40fb7e5eade6dfe290fa9cde23b9b3fb69650f092a54b838ee780726d7a11e985f1e26f708bcbf6671cdb89910c4201fc82dc9ee57592191be3c85a
|
@@ -32,21 +32,24 @@ module LogjamAgent
|
|
32
32
|
|
33
33
|
def call_app(request, env)
|
34
34
|
start_time = Time.now
|
35
|
-
|
35
|
+
start_clock = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
36
|
+
wait_time = 0.0
|
36
37
|
if http_start_time = extract_http_start_time(env)
|
37
|
-
|
38
|
-
if
|
38
|
+
wait_time = start_time - http_start_time
|
39
|
+
if wait_time > 0
|
39
40
|
start_time = http_start_time
|
40
41
|
else
|
41
|
-
|
42
|
+
wait_time = 0.0
|
42
43
|
end
|
43
44
|
end
|
45
|
+
wait_time_ms = wait_time * 1000
|
44
46
|
before_dispatch(request, env, start_time, wait_time_ms)
|
45
47
|
result = @app.call(env)
|
46
48
|
rescue ActionDispatch::RemoteIp::IpSpoofAttackError
|
47
49
|
result = [403, {}, ['Forbidden']]
|
48
50
|
ensure
|
49
|
-
|
51
|
+
end_clock = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
52
|
+
run_time_ms = (end_clock - start_clock + wait_time) * 1000
|
50
53
|
after_dispatch(env, result, run_time_ms, wait_time_ms)
|
51
54
|
end
|
52
55
|
|
data/lib/logjam_agent/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logjam_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.34.
|
4
|
+
version: 0.34.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Kaes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|