Fix oban tags
authorTim Buchwaldt <tim@buchwaldt.ws>
Sat, 12 Nov 2022 10:54:35 +0000 (11:54 +0100)
committerFloatingGhost <hannah@coffee-and-dreams.uk>
Thu, 15 Dec 2022 01:04:56 +0000 (01:04 +0000)
lib/pleroma/web/telemetry.ex

index 2ca188e1ad4570d61612cc9ee020a8b11886cb8c..505ee382c69b68815bdae0b6fbc8f3ccf975a843 100644 (file)
@@ -75,7 +75,8 @@ defmodule Pleroma.Web.Telemetry do
         "oban.job.stop",
         event_name: [:oban, :job, :stop],
         measurement: :duration,
-        tags: [:job],
+        tags: [:worker],
+        tag_values: fn tags -> Map.put(tags, :worker, tags.job.worker) end,
         unit: {:native, :second},
         reporter_options: [
           buckets: [0.01, 0.025, 0.05, 0.1, 0.2, 0.5, 1, 2.5, 5, 10]