diff --git a/Gemfile b/Gemfile
index dbeda69ef981f9fd0c7811d85f0c1d280bc465e5..3258135d68668688840ace186f06a9576db1dc8b 100644
--- a/Gemfile
+++ b/Gemfile
@@ -310,7 +310,7 @@ gem 'pg_query', '~> 1.3.0'
 gem 'premailer-rails', '~> 1.10.3'
 
 # LabKit: Tracing and Correlation
-gem 'gitlab-labkit', '0.14.0'
+gem 'gitlab-labkit', '~> 0.16.0'
 
 # I18n
 gem 'ruby_parser', '~> 3.15', require: false
diff --git a/Gemfile.lock b/Gemfile.lock
index 5e06975ec8745912b3d868645a6cea657b810beb..257d60a2cfacc88be0458cafd57a7bc847fc3a8d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -435,19 +435,18 @@ GEM
       fog-json (~> 1.2.0)
       mime-types
       ms_rest_azure (~> 0.12.0)
-    gitlab-labkit (0.14.0)
+    gitlab-labkit (0.16.0)
       actionpack (>= 5.0.0, < 7.0.0)
       activesupport (>= 5.0.0, < 7.0.0)
-      gitlab-pg_query (~> 1.3)
       grpc (~> 1.19)
       jaeger-client (~> 1.1)
       opentracing (~> 0.4)
+      pg_query (~> 1.3)
       redis (> 3.0.0, < 5.0.0)
     gitlab-license (1.3.1)
     gitlab-mail_room (0.0.8)
     gitlab-markup (1.7.1)
     gitlab-net-dns (0.9.1)
-    gitlab-pg_query (1.3.1)
     gitlab-pry-byebug (3.9.0)
       byebug (~> 11.0)
       pry (~> 0.13.0)
@@ -1186,7 +1185,7 @@ GEM
       rack (>= 1, < 3)
     thor (1.1.0)
     thread_safe (0.3.6)
-    thrift (0.13.0)
+    thrift (0.14.0)
     tilt (2.0.10)
     timecop (0.9.1)
     timeliness (0.3.10)
@@ -1373,7 +1372,7 @@ DEPENDENCIES
   gitlab-chronic (~> 0.10.5)
   gitlab-experiment (~> 0.4.12)
   gitlab-fog-azure-rm (~> 1.0.1)
-  gitlab-labkit (= 0.14.0)
+  gitlab-labkit (~> 0.16.0)
   gitlab-license (~> 1.3)
   gitlab-mail_room (~> 0.0.8)
   gitlab-markup (~> 1.7.1)
diff --git a/lib/gitlab/marginalia/comment.rb b/lib/gitlab/marginalia/comment.rb
index ed641b38945d15a1a88a143c733cecf561447e35..ee15d3b1812821ef27de5e9d382103f6b4e96c31 100644
--- a/lib/gitlab/marginalia/comment.rb
+++ b/lib/gitlab/marginalia/comment.rb
@@ -39,7 +39,7 @@ def bg_job
       end
 
       def endpoint_id
-        Labkit::Context.current.to_h['meta.caller_id']
+        Labkit::Context.current&.get_attribute(:caller_id)
       end
     end
   end
diff --git a/spec/requests/api/api_spec.rb b/spec/requests/api/api_spec.rb
index 67b3a32230f00fd0d35434d2ce2a2817f67a3fbe..e1050d0b5f786dfe3c2eb733a6f8a449f4cf9d1e 100644
--- a/spec/requests/api/api_spec.rb
+++ b/spec/requests/api/api_spec.rb
@@ -138,8 +138,8 @@
       let_it_be(:user) { create(:user) }
       let(:component_map) do
         {
-          "application"       => "test",
-          "endpoint_id"       => "/api/:version/users/:id"
+          "application" => "test",
+          "endpoint_id" => "/api/:version/users/:id"
         }
       end