def values
      begin
        @collector.call(self).tap do |results|
          unless results.is_a?(Hash)
            @logger.error(progname) { "Collector proc did not return a hash, got #{results.inspect}" }
            @errors_metric.increment(class: "NotAHashError")
            return {}
          end
          results.keys.each { |labelset| @validator.validate(labelset) }
        end
      rescue StandardError => ex
        @logger.error(progname) { (["Exception in collection: #{ex.message} (#{ex.class})"] + ex.backtrace).join("\n  ") }
        @errors_metric.increment(class: ex.class.to_s)

        {}
      end
    end
def values
      begin
        @collector.call(self).tap do |results|
          unless results.is_a?(Hash)
            @logger.error(progname) { "Collector proc did not return a hash, got #{results.inspect}" }
            @errors_metric.increment(class: "NotAHashError")
            return {}
          end
          results.keys.each { |labelset| @validator.validate(labelset) }
        end
      rescue StandardError => ex
        @logger.error(progname) { (["Exception in collection: #{ex.message} (#{ex.class})"] + ex.backtrace).join("\n  ") }
        @errors_metric.increment(class: ex.class.to_s)

        {}
      end
    end
Retrieve a complete set of labels and values for the metric.