logjam_agent 0.24.1 → 0.24.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 443c043f32bea5cbc1349dce3820cd9d742f6066
4
- data.tar.gz: 220d4ba72365935ec7d5113b02e9c6214ca2b767
3
+ metadata.gz: b20bff9f96a0a2d579b508bc1f92117c760aeb31
4
+ data.tar.gz: e972f22874775d7184e409db4dbc01b63662f7ff
5
5
  SHA512:
6
- metadata.gz: b5a7c60349a97f1c39acb3d20516a2794347120b8f09daea78923d77c6b857ce675a017dd31c2137b785ff581e5423e80f12a210a03c56e3bffa619600fd2c70
7
- data.tar.gz: f2763dca572146a177958e49a870bdc29085371bf0066382f1c872414b21f7aa68e3176160c8ef034392da28b084f1062f5c0872f23431cc2e5f29e3187ef500
6
+ metadata.gz: eac6d9f8e05fa4cd9f62ff408bf3f304b1860346a976818733572c0e5129dd940dc74e0a3f327281c96993b7b2d425179502815f807d2969a6e13cff1b310e9f
7
+ data.tar.gz: ef41e1c35b80e4d04d3eff2bce3ccaf02c8c67e90b52435c1f2a9e3c1ed14ad489d90f4996ac5cbe0805932228e4013fffaf8acd37cf1ef3d5963370cab8830e
@@ -28,10 +28,16 @@ module LogjamAgent
28
28
  def call_app(request, env)
29
29
  start_time = Time.now
30
30
  start_time_header = env['HTTP_X_STARTTIME']
31
- if start_time_header && start_time_header =~ /\At=(\d+)\z/
32
- # HTTP_X_STARTTIME is microseconds since the epoch (UTC)
33
- http_start_time = Time.at($1.to_f / 1_000_000.0)
34
- if (wait_time_ms = (start_time - http_start_time) * 1000) > 0
31
+ if start_time_header
32
+ if start_time_header =~ /\At=(\d+)\z/
33
+ # HTTP_X_STARTTIME is microseconds since the epoch (UTC)
34
+ http_start_time = Time.at($1.to_f / 1_000_000.0)
35
+ elsif start_time_header =~ /\Ats=(\d+)(?:\.(\d+))?\z/
36
+ # HTTP_X_STARTTIME is seconds since the epoch (UTC) with a milliseconds resolution
37
+ http_start_time = Time.at($1.to_f + $2.to_f / 1000)
38
+ end
39
+
40
+ if http_start_time && (wait_time_ms = (start_time - http_start_time) * 1000) > 0
35
41
  start_time = http_start_time
36
42
  end
37
43
  else
@@ -1,3 +1,3 @@
1
1
  module LogjamAgent
2
- VERSION = "0.24.1"
2
+ VERSION = "0.24.2"
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.24.1
4
+ version: 0.24.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Kaes