lib/opentelemetry/sdk/trace/samplers/result.rb in opentelemetry-sdk-0.2.0 vs lib/opentelemetry/sdk/trace/samplers/result.rb in opentelemetry-sdk-0.3.0

- old
+ new

@@ -17,19 +17,20 @@ DECISIONS = [Decision::RECORD, Decision::NOT_RECORD, Decision::RECORD_AND_SAMPLED].freeze private_constant(:EMPTY_HASH, :DECISIONS) # Returns a frozen hash of attributes to be attached span. # - # @return [Hash<String, Object>] + # @return [Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>}] attr_reader :attributes # Returns a new sampling result with the specified decision and # attributes. # # @param [Symbol] decision Whether or not a span should be sampled # and/or record events. - # @param [optional Hash<String, Object>] attributes A frozen or freezable hash - # containing attributes to be attached to the span. + # @param [optional Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>}] + # attributes A frozen or freezable hash containing attributes to be + # attached to the span. def initialize(decision:, attributes: nil) @decision = decision @attributes = attributes.freeze || EMPTY_HASH end