Sha256: 913b2ab749849b81421fed9409787da1796f1280c27eca086f5a872696c05eab

Contents?: true

Size: 869 Bytes

Versions: 14

Compression:

Stored size: 869 Bytes

Contents

# frozen_string_literal: true

require_relative 'core/deprecations'
require_relative 'core/extensions'

# We must load core extensions to make certain global APIs
# accessible: both for Datadog features and the core itself.
module Datadog
  # Common, lower level, internal code used (or usable) by two or more
  # products. It is a dependency of each product. Contrast with Datadog::Kit
  # for higher-level features.
  module Core
    extend Core::Deprecations
  end

  extend Core::Extensions

  # Add shutdown hook:
  # Ensures the Datadog components have a chance to gracefully
  # shut down and cleanup before terminating the process.
  at_exit do
    if Interrupt === $! # rubocop:disable Style/SpecialGlobalVars is process terminating due to a ctrl+c or similar?
      Datadog.send(:handle_interrupt_shutdown!)
    else
      Datadog.shutdown!
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
datadog-2.12.2 lib/datadog/core.rb
datadog-2.12.1 lib/datadog/core.rb
datadog-2.12.0 lib/datadog/core.rb
datadog-2.11.0 lib/datadog/core.rb
datadog-2.10.0 lib/datadog/core.rb
datadog-2.9.0 lib/datadog/core.rb
datadog-2.8.0 lib/datadog/core.rb
datadog-2.7.1 lib/datadog/core.rb
datadog-2.7.0 lib/datadog/core.rb
datadog-2.6.0 lib/datadog/core.rb
datadog-2.5.0 lib/datadog/core.rb
datadog-2.4.0 lib/datadog/core.rb
datadog-2.3.0 lib/datadog/core.rb
datadog-2.2.0 lib/datadog/core.rb