lib/opentelemetry/sdk/trace/samplers/result.rb in opentelemetry-sdk-0.6.0 vs lib/opentelemetry/sdk/trace/samplers/result.rb in opentelemetry-sdk-0.7.0

- old
+ new

@@ -12,11 +12,11 @@ # boolean values for the sampling decision and whether to record # events, and a collection of attributes to be attached to a sampled # root span. class Result EMPTY_HASH = {}.freeze - DECISIONS = [Decision::RECORD, Decision::NOT_RECORD, Decision::RECORD_AND_SAMPLED].freeze + DECISIONS = [Decision::RECORD_ONLY, Decision::DROP, Decision::RECORD_AND_SAMPLE].freeze private_constant(:EMPTY_HASH, :DECISIONS) # Returns a frozen hash of attributes to be attached span. # # @return [Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>}] @@ -37,17 +37,17 @@ # Returns true if this span should be sampled. # # @return [Boolean] sampling decision def sampled? - @decision == Decision::RECORD_AND_SAMPLED + @decision == Decision::RECORD_AND_SAMPLE end # Returns true if this span should record events, attributes, status, etc. # # @return [Boolean] recording decision def recording? - @decision != Decision::NOT_RECORD + @decision != Decision::DROP end end end end end