Sha256: a629cb4f6f34edbe89ff85ef1676af29aafe3b5dc3673c304ad07a0c61acfeb1

Contents?: true

Size: 489 Bytes

Versions: 4

Compression:

Stored size: 489 Bytes

Contents

# encoding: utf-8
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.

require 'new_relic/agent/event_aggregator'

# Stateless calculation of priority for a given log event
module NewRelic
  module Agent
    module LogPriority
      extend self

      def priority_for(txn)
        return txn.priority if txn

        rand.round(NewRelic::PRIORITY_PRECISION)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
newrelic_rpm-8.9.0 lib/new_relic/agent/log_priority.rb
newrelic_rpm-8.8.0 lib/new_relic/agent/log_priority.rb
newrelic_rpm-8.7.0 lib/new_relic/agent/log_priority.rb
newrelic_rpm-8.6.0 lib/new_relic/agent/log_priority.rb