Sha256: c0ec5476d5b67e19b4bb5510a7107327cb9b2c6e856e214db15b978f807ec7e5
Contents?: true
Size: 1.4 KB
Versions: 26
Compression:
Stored size: 1.4 KB
Contents
# frozen_string_literal: true module Aws module Telemetry # Represents the status of a finished span. class SpanStatus class << self private :new # Returns a newly created {SpanStatus} with code, `UNSET` # and an optional description. # # @param [optional String] description # @return [SpanStatus] def unset(description = '') new(UNSET, description: description) end # Returns a newly created {SpanStatus} with code, `OK` # and an optional description. # # @param [optional String] description # @return [SpanStatus] def ok(description = '') new(OK, description: description) end # Returns a newly created {SpanStatus} with code, `ERROR` # and an optional description. # # @param [optional String] description # @return [SpanStatus] def error(description = '') new(ERROR, description: description) end end def initialize(code, description: '') @code = code @description = description end # @return [Integer] code attr_reader :code # @return [String] description attr_reader :description # The operation completed successfully. OK = 0 # The default status. UNSET = 1 # An error. ERROR = 2 end end end
Version data entries
26 entries across 26 versions & 1 rubygems