logtail-rack 0.1.6 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76c8e9ab5c1364f1a345a7a20e6c24ef277ff8be9b8f3c9a173bbc9263f6d695
4
- data.tar.gz: ad6237cc17307742c7263ec59afe93e77476d7410b8e94fe4a0f32129f22565b
3
+ metadata.gz: 1ee36c5262e866052f62ff09219455f11fee21f613182d01da7a84b6b6270df4
4
+ data.tar.gz: 88967a4936350f2ae1aaa104b5e4fc2789ad1e9858f637992df904731e203fbd
5
5
  SHA512:
6
- metadata.gz: 2d520a022a670a9a8116a0b460aa3a765d3ddcdce4598c30ace1bea5d7cc4e8494ebea7fcdaa01210eac676d7220eba6010d9cabf3f182e4edf36db0a224f00f
7
- data.tar.gz: 6fdb85a21302164570c07359a948c8a2a036ef582f0fa7a0a4078c0d7ad86d3d19d30a455709253e88c600a45e09c722e77bfdb89775247bb7308f6218bfbf50
6
+ metadata.gz: 9a61667c988b7ad5b6a0adbcc43bd14e49fc5e664fc5be1b033ecdb57b3f60063b902e1b1724427313705eec7f6e396cd9ec4fdd62e0acffe2357d99ae38d30b
7
+ data.tar.gz: 0cc11c57b700edd81a1f9280306140ec9b0b111dcf465ec321286038f802b0dafd5b5efb7f156d491f3573d14611405eaae88a72bdee7ccc795b6a91a526d946
@@ -18,8 +18,9 @@ module Logtail
18
18
  request_id: request.request_id
19
19
  )
20
20
 
21
- CurrentContext.add(context.to_hash)
22
- @app.call(env)
21
+ CurrentContext.with(context.to_hash) do
22
+ @app.call(env)
23
+ end
23
24
  end
24
25
  end
25
26
  end
@@ -67,10 +67,12 @@ module Logtail
67
67
  def call(env)
68
68
  user_hash = get_user_hash(env)
69
69
  if user_hash
70
- CurrentContext.add({user: user_hash})
70
+ CurrentContext.with({user: user_hash}) do
71
+ @app.call(env)
72
+ end
73
+ else
74
+ @app.call(env)
71
75
  end
72
-
73
- @app.call(env)
74
76
  end
75
77
 
76
78
  private
@@ -1,7 +1,7 @@
1
1
  module Logtail
2
2
  module Integrations
3
3
  module Rack
4
- VERSION = "0.1.6"
4
+ VERSION = "0.2.0"
5
5
  end
6
6
  end
7
7
  end
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.6
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Logtail
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-05 00:00:00.000000000 Z
11
+ date: 2022-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logtail
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0'
138
138
  requirements: []
139
- rubygems_version: 3.2.3
139
+ rubygems_version: 3.3.3
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: Logtail integration for Rack