logtail-rack 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logtail-rack/http_events.rb +6 -6
- data/lib/logtail-rack/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: 76c8e9ab5c1364f1a345a7a20e6c24ef277ff8be9b8f3c9a173bbc9263f6d695
|
4
|
+
data.tar.gz: ad6237cc17307742c7263ec59afe93e77476d7410b8e94fe4a0f32129f22565b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d520a022a670a9a8116a0b460aa3a765d3ddcdce4598c30ace1bea5d7cc4e8494ebea7fcdaa01210eac676d7220eba6010d9cabf3f182e4edf36db0a224f00f
|
7
|
+
data.tar.gz: 6fdb85a21302164570c07359a948c8a2a036ef582f0fa7a0a4078c0d7ad86d3d19d30a455709253e88c600a45e09c722e77bfdb89775247bb7308f6218bfbf50
|
@@ -136,14 +136,14 @@ module Logtail
|
|
136
136
|
end
|
137
137
|
|
138
138
|
elsif collapse_into_single_event?
|
139
|
-
|
140
|
-
|
139
|
+
request_start = Time.now
|
141
140
|
status, headers, body = @app.call(env)
|
141
|
+
request_end = Time.now
|
142
142
|
|
143
143
|
Config.instance.logger.info do
|
144
144
|
http_context = CurrentContext.fetch(:http)
|
145
145
|
content_length = safe_to_i(headers[CONTENT_LENGTH_KEY])
|
146
|
-
duration_ms = (
|
146
|
+
duration_ms = (request_end - request_start) * 1000.0
|
147
147
|
|
148
148
|
http_response = HTTPResponse.new(
|
149
149
|
content_length: content_length,
|
@@ -174,8 +174,6 @@ module Logtail
|
|
174
174
|
|
175
175
|
[status, headers, body]
|
176
176
|
else
|
177
|
-
start = Time.now
|
178
|
-
|
179
177
|
Config.instance.logger.info do
|
180
178
|
event_body = capture_request_body? ? request.body_content : nil
|
181
179
|
http_request = HTTPRequest.new(
|
@@ -213,12 +211,14 @@ module Logtail
|
|
213
211
|
}
|
214
212
|
end
|
215
213
|
|
214
|
+
request_start = Time.now
|
216
215
|
status, headers, body = @app.call(env)
|
216
|
+
request_end = Time.now
|
217
217
|
|
218
218
|
Config.instance.logger.info do
|
219
219
|
event_body = capture_response_body? ? body : nil
|
220
220
|
content_length = safe_to_i(headers[CONTENT_LENGTH_KEY])
|
221
|
-
duration_ms = (
|
221
|
+
duration_ms = (request_end - request_start) * 1000.0
|
222
222
|
|
223
223
|
http_response = HTTPResponse.new(
|
224
224
|
body: event_body,
|
data/lib/logtail-rack/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logtail-rack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Logtail
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logtail
|