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

docs: ✏️ Sidekiq instrumentation options #824

Merged
merged 4 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions instrumentation/sidekiq/.yardopts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
--title=OpenTelemetry Sidekiq Instrumentation
--markup=markdown
--main=README.md
--tag=instrumentation_option_default:"Default"
./lib/opentelemetry/instrumentation/**/*.rb
./lib/opentelemetry/instrumentation.rb
-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,59 @@ class Instrumentation < OpenTelemetry::Instrumentation::Base
gem_version >= MINIMUM_VERSION
end

# @!group Instrumentation Options
# @!macro
# @!method $1
# @instrumentation_option_default `:$2`
# @!scope class
#
# Specify how the span names are set. Can be one of:
#
# - `:queue` - the span names will be set to '<destination / queue name> <operation>'.
# - `:job_class` - the span names will be set to '<job class name> <operation>'.
option :span_naming, default: :queue, validate: %I[job_class queue]
# Controls how the job's execution is traced and related
# to the trace where the job was enqueued. Can be one of:
#
# - `:link` - the job will be executed in a separate trace. The
# initial span of the execution trace will be linked to the span that
# enqueued the job, via a Span Link.
# - `:child` - the job will be executed in the same logical trace, as a direct
# child of the span that enqueued the job.
# - `:none` - the job's execution will not be explicitly linked to the span that
# enqueued the job.
option :propagation_style, default: :link, validate: %i[link child none]
# @!macro
# @!method $1
# @instrumentation_option_default `:$2`
# @!scope class
# Allows tracing Sidekiq::Launcher#heartbeat.
option :trace_launcher_heartbeat, default: false, validate: :boolean
# @!macro
# @!method $1
# @instrumentation_option_default $2
# @!scope class
# Allows tracing Sidekiq::Scheduled#enqueue.
option :trace_poller_enqueue, default: false, validate: :boolean
# @!macro
# @!method $1
# @instrumentation_option_default $2
# @!scope class
# Allows trasing Sidekiq::Scheduled#wait
option :trace_poller_wait, default: false, validate: :boolean
# @!macro
# @!method $1
# @instrumentation_option_default $2
# @!scope class
# Allows tracing Sidekiq::Processor#process_one.
option :trace_processor_process_one, default: false, validate: :boolean
# @!macro
# @!method $1
# @instrumentation_option_default $2
# @!scope class
# Sets service name of the remote service.
option :peer_service, default: nil, validate: :string
# @!endgroup

private

Expand Down
Loading