gitlab-labkit 0.35.0 → 0.35.1

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: 93345552c013b93d13d6f87e2160c737489e75ccdb63ba1638cd22a8c92508a1
4
- data.tar.gz: e55c8ec4d4d17a9d207b3b0ff9af27b92821d6b7210a304a192e120a07c19141
3
+ metadata.gz: 48e2df6dd68eddc3928dad7c12f616bc124c16c55fd3d94947a21f23dc9cd732
4
+ data.tar.gz: 4b7dd6dffbb2936d6464b5777ac01db0c2142cdfa79b0527419a3750fcbe6b60
5
5
  SHA512:
6
- metadata.gz: 97c4077db5b62456809cb9fea6850d6e4977cbcd0979562d704eb6ef55eb8aca3fce2ecf6a89beb7d496f8c88b94c46e1a00cd9b06b6b5591255cb0158601b8a
7
- data.tar.gz: 9c91a4e8e5c36fbbd9f65587ff00f756a5112adb8b1c8d22cf4a9401dac8b7c8628bf2b294afa19bb03eac247d9f5ccdd3a32bfae23ad7300c3eb78cb6681b15
6
+ metadata.gz: f7eea840bb4724fedc0f0789d87f234a4f997dce9cdefece2ea839c09c4c0a6a2494f80048d8fbb9dcd0545e1ec4fca0e1600fb528bbeffd6369458868ebb94c
7
+ data.tar.gz: d2274b20b41924ed939e2f09d9ae0dcefbdcfff8bed448d8c045373c1afa72785f2a9e528036e535460807cd59532f4d5eb96b45949abea24eb33b9de6ca15ca
@@ -66,10 +66,6 @@ module Labkit
66
66
  "#{LOG_KEY}.#{key}"
67
67
  end
68
68
 
69
- def known_log_keys
70
- @known_log_keys ||= (KNOWN_KEYS.map(&method(:log_key)) + RAW_KEYS).freeze
71
- end
72
-
73
69
  private
74
70
 
75
71
  def contexts
@@ -9,7 +9,15 @@ module Labkit
9
9
  # be reinstantiated by Sidekiq-server when running the job.
10
10
  class Client
11
11
  def call(_worker_class, job, _queue, _redis_pool)
12
- Labkit::Context.with_context do |context|
12
+ attributes = {}
13
+
14
+ # Don't overwrite the correlation_id from the job. A new context
15
+ # will always generate a new correlation_id and we'd rather carry
16
+ # through the correlation_id from the previous job if it is
17
+ # present (eg. for retries).
18
+ attributes[Labkit::Context::CORRELATION_ID_KEY] = job["correlation_id"] if job["correlation_id"]
19
+
20
+ Labkit::Context.with_context(attributes) do |context|
13
21
  job.merge!(context.to_h)
14
22
 
15
23
  yield
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-labkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.35.0
4
+ version: 0.35.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Newdigate
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-09 00:00:00.000000000 Z
11
+ date: 2024-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack