Class: OpenTelemetry::SDK::Trace::Config::TraceConfig
- Inherits:
-
Object
- Object
- OpenTelemetry::SDK::Trace::Config::TraceConfig
- Defined in:
- lib/opentelemetry/sdk/trace/config/trace_config.rb
Overview
Class that holds global trace parameters.
Constant Summary collapse
- DEFAULT =
The default OpenTelemetry::SDK::Trace::Config::TraceConfig.
new
Instance Attribute Summary collapse
-
#max_attributes_count ⇒ Object
readonly
The global default max number of attributes per Span.
-
#max_attributes_per_event ⇒ Object
readonly
The global default max number of attributes per Event.
-
#max_attributes_per_link ⇒ Object
readonly
The global default max number of attributes per Trace::Link.
- #max_events_count ⇒ Object readonly
-
#max_links_count ⇒ Object
readonly
The global default max number of Trace::Link entries per Span.
-
#sampler ⇒ Object
readonly
The global default sampler (see Samplers).
Instance Method Summary collapse
-
#initialize(sampler: DEFAULT_SAMPLER, max_attributes_count: DEFAULT_MAX_ATTRIBUTES_COUNT, max_events_count: DEFAULT_MAX_EVENTS_COUNT, max_links_count: DEFAULT_MAX_LINKS_COUNT, max_attributes_per_event: DEFAULT_MAX_ATTRIBUTES_PER_EVENT, max_attributes_per_link: DEFAULT_MAX_ATTRIBUTES_PER_LINK) ⇒ TraceConfig
constructor
Returns a TraceConfig with the desired values.
Constructor Details
#initialize(sampler: DEFAULT_SAMPLER, max_attributes_count: DEFAULT_MAX_ATTRIBUTES_COUNT, max_events_count: DEFAULT_MAX_EVENTS_COUNT, max_links_count: DEFAULT_MAX_LINKS_COUNT, max_attributes_per_event: DEFAULT_MAX_ATTRIBUTES_PER_EVENT, max_attributes_per_link: DEFAULT_MAX_ATTRIBUTES_PER_LINK) ⇒ TraceConfig
Returns a OpenTelemetry::SDK::Trace::Config::TraceConfig with the desired values.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/opentelemetry/sdk/trace/config/trace_config.rb', line 49 def initialize(sampler: DEFAULT_SAMPLER, max_attributes_count: DEFAULT_MAX_ATTRIBUTES_COUNT, max_events_count: DEFAULT_MAX_EVENTS_COUNT, max_links_count: DEFAULT_MAX_LINKS_COUNT, max_attributes_per_event: DEFAULT_MAX_ATTRIBUTES_PER_EVENT, max_attributes_per_link: DEFAULT_MAX_ATTRIBUTES_PER_LINK) raise ArgumentError, 'max_attributes_count must be positive' unless max_attributes_count.positive? raise ArgumentError, 'max_events_count must be positive' unless max_events_count.positive? raise ArgumentError, 'max_links_count must be positive' unless max_links_count.positive? raise ArgumentError, 'max_attributes_per_event must be positive' unless max_attributes_per_event.positive? raise ArgumentError, 'max_attributes_per_link must be positive' unless max_attributes_per_link.positive? @sampler = sampler @max_attributes_count = max_attributes_count @max_events_count = max_events_count @max_links_count = max_links_count @max_attributes_per_event = max_attributes_per_event @max_attributes_per_link = max_attributes_per_link end |
Instance Attribute Details
#max_attributes_count ⇒ Object (readonly)
The global default max number of attributes per Span.
31 32 33 |
# File 'lib/opentelemetry/sdk/trace/config/trace_config.rb', line 31 def max_attributes_count @max_attributes_count end |
#max_attributes_per_event ⇒ Object (readonly)
The global default max number of attributes per Event.
40 41 42 |
# File 'lib/opentelemetry/sdk/trace/config/trace_config.rb', line 40 def max_attributes_per_event @max_attributes_per_event end |
#max_attributes_per_link ⇒ Object (readonly)
The global default max number of attributes per Trace::Link.
43 44 45 |
# File 'lib/opentelemetry/sdk/trace/config/trace_config.rb', line 43 def max_attributes_per_link @max_attributes_per_link end |
#max_events_count ⇒ Object (readonly)
34 35 36 |
# File 'lib/opentelemetry/sdk/trace/config/trace_config.rb', line 34 def max_events_count @max_events_count end |
#max_links_count ⇒ Object (readonly)
The global default max number of Trace::Link entries per Span.
37 38 39 |
# File 'lib/opentelemetry/sdk/trace/config/trace_config.rb', line 37 def max_links_count @max_links_count end |
#sampler ⇒ Object (readonly)
The global default sampler (see Samplers).
28 29 30 |
# File 'lib/opentelemetry/sdk/trace/config/trace_config.rb', line 28 def sampler @sampler end |