Sha256: f56d48c0b93ebd25653870b7f9dbd006a5f513911ffa8a466592e828f594c9d1

Contents?: true

Size: 1015 Bytes

Versions: 31

Compression:

Stored size: 1015 Bytes

Contents

# frozen_string_literal: true

require "datadog/tracing/metadata/ext"
require "datadog/tracing/flush"

module Datadog
  module CI
    module TestVisibility
      module Flush
        # Common behavior for CI flushing
        module Tagging
          # Decorate a trace with CI tags
          def get_trace(trace_op)
            trace = trace_op.flush!

            # Origin tag is required on every span
            trace.spans.each do |span|
              span.set_tag(
                Tracing::Metadata::Ext::Distributed::TAG_ORIGIN,
                trace.origin
              )
            end

            trace
          end
        end

        # Consumes only completed traces (where all spans have finished)
        class Finished < Tracing::Flush::Finished
          prepend Tagging
        end

        # Performs partial trace flushing to avoid large traces residing in memory for too long
        class Partial < Tracing::Flush::Partial
          prepend Tagging
        end
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
datadog-ci-1.11.0 lib/datadog/ci/test_visibility/flush.rb
datadog-ci-1.10.0 lib/datadog/ci/test_visibility/flush.rb
datadog-ci-1.9.0 lib/datadog/ci/test_visibility/flush.rb
datadog-ci-1.8.1 lib/datadog/ci/test_visibility/flush.rb
datadog-ci-1.8.0 lib/datadog/ci/test_visibility/flush.rb
datadog-ci-1.7.0 lib/datadog/ci/test_visibility/flush.rb
datadog-ci-1.6.0 lib/datadog/ci/test_visibility/flush.rb
datadog-ci-1.5.0 lib/datadog/ci/test_visibility/flush.rb
datadog-ci-1.4.1 lib/datadog/ci/test_visibility/flush.rb
datadog-ci-1.4.0 lib/datadog/ci/test_visibility/flush.rb
datadog-ci-1.3.0 lib/datadog/ci/test_visibility/flush.rb
datadog-ci-1.2.0 lib/datadog/ci/test_visibility/flush.rb
datadog-ci-1.1.0 lib/datadog/ci/test_visibility/flush.rb
datadog-ci-1.0.1 lib/datadog/ci/test_visibility/flush.rb
datadog-ci-1.0.0 lib/datadog/ci/test_visibility/flush.rb
datadog-ci-1.0.0.beta6 lib/datadog/ci/test_visibility/flush.rb
datadog-ci-1.0.0.beta3 lib/datadog/ci/test_visibility/flush.rb
datadog-ci-1.0.0.beta2 lib/datadog/ci/test_visibility/flush.rb
datadog-ci-1.0.0.beta1 lib/datadog/ci/test_visibility/flush.rb
datadog-ci-0.8.3 lib/datadog/ci/test_visibility/flush.rb