Class: LaunchDarkly::Otel::TracingHookOptions
- Inherits:
-
Object
- Object
- LaunchDarkly::Otel::TracingHookOptions
- Defined in:
- lib/ldclient-otel/tracing_hook.rb
Instance Attribute Summary collapse
-
#add_spans ⇒ Boolean?
readonly
Experimental: If set to true, then the tracing hook will add spans for each variation method call.
-
#include_variant ⇒ Boolean
readonly
If set to true, then the tracing hook will add the evaluated flag value to span events.
-
#logger ⇒ Logger
readonly
The logger used for hook execution.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ TracingHookOptions
constructor
Configuration options to control the effect of the TracingHook.
Constructor Details
#initialize(opts = {}) ⇒ TracingHookOptions
Configuration options to control the effect of the TracingHook.
43 44 45 46 47 |
# File 'lib/ldclient-otel/tracing_hook.rb', line 43 def initialize(opts = {}) @add_spans = opts.fetch(:add_spans, nil) @include_variant = opts.fetch(:include_variant, false) @logger = opts[:logger] || LaunchDarkly::Otel.default_logger end |
Instance Attribute Details
#add_spans ⇒ Boolean? (readonly)
Experimental: If set to true, then the tracing hook will add spans for each variation method call. Span events are always added and are unaffected by this setting.
The default value is false.
This feature is experimental and the data in the spans, or nesting of spans, could change in future versions.
17 18 19 |
# File 'lib/ldclient-otel/tracing_hook.rb', line 17 def add_spans @add_spans end |
#include_variant ⇒ Boolean (readonly)
If set to true, then the tracing hook will add the evaluated flag value to span events.
The default is false.
26 27 28 |
# File 'lib/ldclient-otel/tracing_hook.rb', line 26 def include_variant @include_variant end |
#logger ⇒ Logger (readonly)
The logger used for hook execution. Provide a custom logger or use the default which logs to the console.
33 34 35 |
# File 'lib/ldclient-otel/tracing_hook.rb', line 33 def logger @logger end |