Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add child_spans for Sidekiq Queue instrumentation #2403

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

frederikspang
Copy link
Contributor

@frederikspang frederikspang commented Sep 16, 2024

Implements #2322 for Sidekiq.

Description

Adds support for Sentry Queues page (With predefined span op names)

https://docs.sentry.io/platforms/ruby/guides/sidekiq/tracing/instrumentation/custom-instrumentation/queues-module/

Screenshot 2024-09-16 at 15 45 15

@frederikspang frederikspang force-pushed the feature/sidekiq-queues-childspan branch 2 times, most recently from cd35fcf to 787436b Compare September 16, 2024 16:02
@frederikspang frederikspang force-pushed the feature/sidekiq-queues-childspan branch 3 times, most recently from ac46c1b to 4e505f6 Compare September 17, 2024 09:07
@rwojsznis
Copy link

Oh wow, exactly what I was looking for 😅 🙌

can we somehow help to get this shipped? 💪

Copy link
Collaborator

@solnic solnic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! 🙇🏻 Would you be able to add some basic specs for this too?

@frederikspang
Copy link
Contributor Author

@solnic I've added two basic specs.
Latency is a bit difficult, without introducing some timecop kind of tool. Which we do have in sentry-ruby, so we could just introduce it here if we wanted to.

@frederikspang
Copy link
Contributor Author

@solnic After looking at these, I think queue.process may actually replace op: queue.sidekiq instead of being a child span.
They will always be redundant - But we should set origin or some other field to sidekiq, description or name maybe, to differentiate the processor. (ie. using another processor alongside Sidekiq - or doing queries in Sentry UI across applications)

image

@nateberkopec
Copy link
Contributor

Looks like it needs a changelog too

@frederikspang frederikspang force-pushed the feature/sidekiq-queues-childspan branch from 04750fa to af385ba Compare October 21, 2024 20:51
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.18%. Comparing base (9bba2ef) to head (fad677a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2403   +/-   ##
=======================================
  Coverage   98.18%   98.18%           
=======================================
  Files         126      126           
  Lines        4726     4735    +9     
=======================================
+ Hits         4640     4649    +9     
  Misses         86       86           
Components Coverage Δ
sentry-ruby 98.51% <ø> (ø)
sentry-rails 97.20% <ø> (ø)
sentry-sidekiq 97.58% <100.00%> (+0.10%) ⬆️
sentry-resque 92.85% <ø> (ø)
sentry-delayed_job 95.65% <ø> (ø)
sentry-opentelemetry 99.31% <ø> (ø)
Files with missing lines Coverage Δ
...iq/lib/sentry/sidekiq/sentry_context_middleware.rb 98.07% <100.00%> (+0.40%) ⬆️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants