How to determine job latency via instrumentation #1030
Replies: 1 comment 3 replies
-
open-telemetry/opentelemetry-specification#1582 was proposed to add semantic conventions for job queue systems. Unfortunately, it was closed by the stale bot. It was very much WIP and didn't include the We followed the messaging semantic conventions for Sidekiq because it was the closest thing available in the OTel semantic conventions. I don't recall the conversation leading to using Events rather than Attributes for recording the |
Beta Was this translation helpful? Give feedback.
-
👋 Hello! I'm just getting started with OTel and we're hoping to lean on
opentelemetry-ruby
to get traces to the backend. I've gotOpenTelemetry::SDK
configured and exporting to Honeycomb for one of our smaller, lower risk components, as a bit of a live playground. In this setup Sidekiq is being instrumented via#use_all
, and we're seeing those traces in the backend.One thing I'm having trouble figuring out is how to see the latency of a job as it's being processed. Perhaps this is a limitation of my experience with the particular backend tooling (Honeycomb), but want to make sure I understand why certain information about a Job is set as a Span attribute, and other bits are Span Events. Namely, there is a Span Event called
enqueued_at
added to the Job processed Span, and the timestamp of that event is the Job'senqueued_at
value. Would it be equally valid to have an attribute likemessaging.sidekiq.enqueued_at
set, rather than, or perhaps along with, the Span Event?I see that the Sidekiq instrumentation is using the semantic convention for Messaging, which makes no mention of a concept like
enqueued_at
(or perhapssent_at
, given the messaging-based focus). Is the lack of that concept in the semantic guide might the reason to use an Event?I suppose I'm really just looking for guidance for how the instrumentation is expected to be used. i.e., latency of jobs in a work queue like Sidekiq has often been useful info to have when troubleshooting, or for alerting, etc... So am I holding it wrong? Or my expectations off track?
Thank you for all of the time and effort y'all put into this work.
Beta Was this translation helpful? Give feedback.
All reactions