Module: Datadog::Core

Defined in:
lib/datadog/core.rb,
lib/datadog/core/pin.rb,
lib/datadog/core/error.rb,
lib/datadog/core/utils.rb,
lib/datadog/core/logger.rb,
lib/datadog/core/remote.rb,
lib/datadog/core/worker.rb,
lib/datadog/core/chunker.rb,
lib/datadog/core/git/ext.rb,
lib/datadog/core/backport.rb,
lib/datadog/core/encoding.rb,
lib/datadog/core/utils/url.rb,
lib/datadog/core/extensions.rb,
lib/datadog/core/remote/ext.rb,
lib/datadog/core/remote/tie.rb,
lib/datadog/core/utils/hash.rb,
lib/datadog/core/utils/time.rb,
lib/datadog/core/logging/ext.rb,
lib/datadog/core/metrics/ext.rb,
lib/datadog/core/runtime/ext.rb,
lib/datadog/core/buffer/cruby.rb,
lib/datadog/core/buffer/random.rb,
lib/datadog/core/configuration.rb,
lib/datadog/core/remote/client.rb,
lib/datadog/core/remote/worker.rb,
lib/datadog/core/telemetry/ext.rb,
lib/datadog/core/transport/ext.rb,
lib/datadog/core/utils/forking.rb,
lib/datadog/core/utils/network.rb,
lib/datadog/core/vendor/ipaddr.rb,
lib/datadog/core/workers/async.rb,
lib/datadog/core/workers/queue.rb,
lib/datadog/core/environment/gc.rb,
lib/datadog/core/metrics/client.rb,
lib/datadog/core/metrics/metric.rb,
lib/datadog/core/utils/duration.rb,
lib/datadog/core/utils/safe_dup.rb,
lib/datadog/core/utils/sequence.rb,
lib/datadog/core/environment/ext.rb,
lib/datadog/core/environment/git.rb,
lib/datadog/core/metrics/helpers.rb,
lib/datadog/core/metrics/logging.rb,
lib/datadog/core/metrics/options.rb,
lib/datadog/core/runtime/metrics.rb,
lib/datadog/core/telemetry/event.rb,
lib/datadog/core/utils/only_once.rb,
lib/datadog/core/workers/polling.rb,
lib/datadog/core/environment/yjit.rb,
lib/datadog/core/remote/component.rb,
lib/datadog/core/telemetry/worker.rb,
lib/datadog/core/transport/parcel.rb,
lib/datadog/core/configuration/ext.rb,
lib/datadog/core/header_collection.rb,
lib/datadog/core/remote/dispatcher.rb,
lib/datadog/core/telemetry/emitter.rb,
lib/datadog/core/telemetry/request.rb,
lib/datadog/core/transport/request.rb,
lib/datadog/core/utils/compression.rb,
lib/datadog/core/buffer/thread_safe.rb,
lib/datadog/core/configuration/base.rb,
lib/datadog/core/diagnostics/health.rb,
lib/datadog/core/environment/cgroup.rb,
lib/datadog/core/environment/socket.rb,
lib/datadog/core/remote/negotiation.rb,
lib/datadog/core/remote/tie/tracing.rb,
lib/datadog/core/telemetry/http/env.rb,
lib/datadog/core/telemetry/http/ext.rb,
lib/datadog/core/transport/http/env.rb,
lib/datadog/core/transport/response.rb,
lib/datadog/core/telemetry/component.rb,
lib/datadog/core/configuration/option.rb,
lib/datadog/core/environment/identity.rb,
lib/datadog/core/environment/platform.rb,
lib/datadog/core/environment/vm_cache.rb,
lib/datadog/core/remote/configuration.rb,
lib/datadog/core/configuration/options.rb,
lib/datadog/core/environment/container.rb,
lib/datadog/core/environment/execution.rb,
lib/datadog/core/remote/transport/http.rb,
lib/datadog/core/workers/interval_loop.rb,
lib/datadog/core/configuration/settings.rb,
lib/datadog/core/transport/http/api/map.rb,
lib/datadog/core/environment/class_count.rb,
lib/datadog/core/remote/transport/config.rb,
lib/datadog/core/telemetry/http/response.rb,
lib/datadog/core/transport/http/response.rb,
lib/datadog/core/workers/runtime_metrics.rb,
lib/datadog/core/configuration/components.rb,
lib/datadog/core/environment/thread_count.rb,
lib/datadog/core/telemetry/http/transport.rb,
lib/datadog/core/remote/configuration/path.rb,
lib/datadog/core/remote/transport/http/api.rb,
lib/datadog/core/remote/client/capabilities.rb,
lib/datadog/core/utils/only_once_successful.rb,
lib/datadog/core/remote/configuration/digest.rb,
lib/datadog/core/remote/configuration/target.rb,
lib/datadog/core/telemetry/http/adapters/net.rb,
lib/datadog/core/transport/http/adapters/net.rb,
lib/datadog/core/transport/http/api/endpoint.rb,
lib/datadog/core/environment/variable_helpers.rb,
lib/datadog/core/remote/configuration/content.rb,
lib/datadog/core/remote/transport/http/client.rb,
lib/datadog/core/remote/transport/http/config.rb,
lib/datadog/core/remote/transport/negotiation.rb,
lib/datadog/core/transport/http/adapters/test.rb,
lib/datadog/core/transport/http/api/fallbacks.rb,
lib/datadog/core/remote/transport/http/builder.rb,
lib/datadog/core/diagnostics/environment_logger.rb,
lib/datadog/core/remote/transport/http/api/spec.rb,
lib/datadog/core/configuration/option_definition.rb,
lib/datadog/core/remote/configuration/repository.rb,
lib/datadog/core/vendor/multipart-post/multipart.rb,
lib/datadog/core/transport/http/adapters/registry.rb,
lib/datadog/core/remote/transport/http/negotiation.rb,
lib/datadog/core/remote/transport/http/api/instance.rb,
lib/datadog/core/transport/http/adapters/unix_socket.rb,
lib/datadog/core/vendor/multipart-post/multipart/post.rb,
lib/datadog/core/configuration/agent_settings_resolver.rb,
lib/datadog/core/vendor/multipart-post/multipart/post/parts.rb,
lib/datadog/core/vendor/multipart-post/multipart/post/version.rb,
lib/datadog/core/vendor/multipart-post/net/http/post/multipart.rb,
lib/datadog/core/vendor/multipart-post/multipart/post/multipartable.rb,
lib/datadog/core/vendor/multipart-post/multipart/post/composite_read_io.rb

Overview

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.

Defined Under Namespace

Modules: BackportFrom24, BackportFrom25, Buffer, Chunker, Configuration, Diagnostics, Encoding, Environment, Extensions, Git, Logging, Metrics, Remote, Runtime, Telemetry, Transport, Utils, Vendor, Workers Classes: Error, HashHeaderCollection, HeaderCollection, Logger, Pin, Worker

Class Method Summary collapse

Class Method Details

.log_deprecation(disallowed_next_major: true) ⇒ Object

Records the occurrence of a deprecated operation in this library.

Currently, these operations are logged to ‘Datadog.logger` at `warn` level.

‘disallowed_next_major` adds a message informing that the deprecated operation won’t be allowed in the next major release.

Parameters:

  • disallowed_next_major (Boolean) (defaults to: true)

    whether this deprecation will be enforced in the next major release.

Yield Returns:

  • (String)

    a String with the lazily evaluated deprecation message.



22
23
24
25
26
27
28
29
# File 'lib/datadog/core.rb', line 22

def log_deprecation(disallowed_next_major: true)
  Datadog.logger.warn do
    message = yield
    message += ' This will be enforced in the next major release.' if disallowed_next_major
    message
  end
  nil
end