Sha256: a57cfd92344a92d78407d8eeb1e32b85d14865c0673ddaecc9080790429b1e84

Contents?: true

Size: 654 Bytes

Versions: 2

Compression:

Stored size: 654 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.
# frozen_string_literal: true

module NewRelic
  module Agent
    class Transaction
      class Segment
        def segment_complete
          record_span_event
        end

        def record_span_event
          # don't record a span event if the transaction is ignored
          return if transaction.ignore?

          tracer = ::NewRelic::Agent.agent.infinite_tracer
          tracer << Proc.new { SpanEventPrimitive.for_segment(self) }
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
newrelic-infinite_tracing-8.10.1 lib/infinite_tracing/agent_integrations/segment.rb
newrelic-infinite_tracing-8.10.0 lib/infinite_tracing/agent_integrations/segment.rb