@@ -27,13 +27,59 @@ class Instrumentation < OpenTelemetry::Instrumentation::Base
27
27
gem_version >= MINIMUM_VERSION
28
28
end
29
29
30
+ # @!group Instrumentation Options
31
+ # @!macro
32
+ # @!method $1
33
+ # @instrumentation_option_default `:$2`
34
+ # @!scope class
35
+ #
36
+ # Specify how the span names are set. Can be one of:
37
+ #
38
+ # - `:queue` - the span names will be set to '<destination / queue name> <operation>'.
39
+ # - `:job_class` - the span names will be set to '<job class name> <operation>'.
30
40
option :span_naming , default : :queue , validate : %I[ job_class queue ]
41
+ # Controls how the job's execution is traced and related
42
+ # to the trace where the job was enqueued. Can be one of:
43
+ #
44
+ # - `:link` - the job will be executed in a separate trace. The
45
+ # initial span of the execution trace will be linked to the span that
46
+ # enqueued the job, via a Span Link.
47
+ # - `:child` - the job will be executed in the same logical trace, as a direct
48
+ # child of the span that enqueued the job.
49
+ # - `:none` - the job's execution will not be explicitly linked to the span that
50
+ # enqueued the job.
31
51
option :propagation_style , default : :link , validate : %i[ link child none ]
52
+ # @!macro
53
+ # @!method $1
54
+ # @instrumentation_option_default `:$2`
55
+ # @!scope class
56
+ # Allows tracing Sidekiq::Launcher#heartbeat.
32
57
option :trace_launcher_heartbeat , default : false , validate : :boolean
58
+ # @!macro
59
+ # @!method $1
60
+ # @instrumentation_option_default $2
61
+ # @!scope class
62
+ # Allows tracing Sidekiq::Scheduled#enqueue.
33
63
option :trace_poller_enqueue , default : false , validate : :boolean
64
+ # @!macro
65
+ # @!method $1
66
+ # @instrumentation_option_default $2
67
+ # @!scope class
68
+ # Allows trasing Sidekiq::Scheduled#wait
34
69
option :trace_poller_wait , default : false , validate : :boolean
70
+ # @!macro
71
+ # @!method $1
72
+ # @instrumentation_option_default $2
73
+ # @!scope class
74
+ # Allows tracing Sidekiq::Processor#process_one.
35
75
option :trace_processor_process_one , default : false , validate : :boolean
76
+ # @!macro
77
+ # @!method $1
78
+ # @instrumentation_option_default $2
79
+ # @!scope class
80
+ # Sets service name of the remote service.
36
81
option :peer_service , default : nil , validate : :string
82
+ # @!endgroup
37
83
38
84
private
39
85
0 commit comments