lib/opentelemetry/sdk/trace/span_limits.rb in opentelemetry-sdk-1.0.2 vs lib/opentelemetry/sdk/trace/span_limits.rb in opentelemetry-sdk-1.0.3

- old
+ new

@@ -30,10 +30,11 @@ # Returns a {SpanLimits} with the desired values. # # @return [SpanLimits] with the desired values. # @raise [ArgumentError] if any of the max numbers are not positive. def initialize(attribute_count_limit: Integer(ENV.fetch('OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT', 128)), # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity - attribute_length_limit: ENV['OTEL_RUBY_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT'], + attribute_length_limit: ENV.fetch('OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT', + ENV['OTEL_RUBY_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT']), event_count_limit: Integer(ENV.fetch('OTEL_SPAN_EVENT_COUNT_LIMIT', 128)), link_count_limit: Integer(ENV.fetch('OTEL_SPAN_LINK_COUNT_LIMIT', 128)), event_attribute_count_limit: Integer(ENV.fetch('OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT', 128)), link_attribute_count_limit: Integer(ENV.fetch('OTEL_LINK_ATTRIBUTE_COUNT_LIMIT', 128))) raise ArgumentError, 'attribute_count_limit must be positive' unless attribute_count_limit.positive?