From 03b73bea193945565ef0f0a21aff4091016607c8 Mon Sep 17 00:00:00 2001 From: Marco Costa Date: Fri, 15 Dec 2023 12:36:15 -0800 Subject: [PATCH] Remove ddtrace transport constants --- lib/ddtrace/transport/ext.rb | 47 ----------------------------------- sig/ddtrace/transport/ext.rbs | 39 ----------------------------- 2 files changed, 86 deletions(-) delete mode 100644 lib/ddtrace/transport/ext.rb delete mode 100644 sig/ddtrace/transport/ext.rbs diff --git a/lib/ddtrace/transport/ext.rb b/lib/ddtrace/transport/ext.rb deleted file mode 100644 index 09fcd8f5573..00000000000 --- a/lib/ddtrace/transport/ext.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -require_relative '../../datadog/core/transport/ext' -# DEV(2.0): This file should be replaced by /datadog/core/transport/ext.rb. -module Datadog - module Transport - # @public_api - module Ext - # @public_api - module HTTP - ADAPTER = Datadog::Core::Transport::Ext::HTTP::ADAPTER - DEFAULT_HOST = Datadog::Core::Transport::Ext::HTTP::DEFAULT_HOST - DEFAULT_PORT = Datadog::Core::Transport::Ext::HTTP::DEFAULT_PORT - - HEADER_CONTAINER_ID = Datadog::Core::Transport::Ext::HTTP::HEADER_CONTAINER_ID - HEADER_DD_API_KEY = Datadog::Core::Transport::Ext::HTTP::HEADER_DD_API_KEY - # Tells agent that `_dd.top_level` metrics have been set by the tracer. - # The agent will not calculate top-level spans but instead trust the tracer tagging. - # - # This prevents partially flushed traces being mistakenly marked as top-level. - # - # Setting this header to any non-empty value enables this feature. - HEADER_CLIENT_COMPUTED_TOP_LEVEL = Datadog::Core::Transport::Ext::HTTP::HEADER_CLIENT_COMPUTED_TOP_LEVEL - HEADER_META_LANG = Datadog::Core::Transport::Ext::HTTP::HEADER_META_LANG - HEADER_META_LANG_VERSION = Datadog::Core::Transport::Ext::HTTP::HEADER_META_LANG_VERSION - HEADER_META_LANG_INTERPRETER = Datadog::Core::Transport::Ext::HTTP::HEADER_META_LANG_INTERPRETER - HEADER_META_TRACER_VERSION = Datadog::Core::Transport::Ext::HTTP::HEADER_META_TRACER_VERSION - - # Header that prevents the Net::HTTP integration from tracing internal trace requests. - # Set it to any value to skip tracing. - HEADER_DD_INTERNAL_UNTRACED_REQUEST = Datadog::Core::Transport::Ext::HTTP::HEADER_DD_INTERNAL_UNTRACED_REQUEST - end - - # @public_api - module Test - ADAPTER = Datadog::Core::Transport::Ext::Test::ADAPTER - end - - # @public_api - module UnixSocket - ADAPTER = Datadog::Core::Transport::Ext::UnixSocket::ADAPTER - DEFAULT_PATH = Datadog::Core::Transport::Ext::UnixSocket::DEFAULT_PATH - DEFAULT_TIMEOUT_SECONDS = Datadog::Core::Transport::Ext::UnixSocket::DEFAULT_TIMEOUT_SECONDS - end - end - end -end diff --git a/sig/ddtrace/transport/ext.rbs b/sig/ddtrace/transport/ext.rbs deleted file mode 100644 index 33a8c8b4a8b..00000000000 --- a/sig/ddtrace/transport/ext.rbs +++ /dev/null @@ -1,39 +0,0 @@ -module Datadog - module Transport - module Ext - module HTTP - ADAPTER: :net_http - - DEFAULT_HOST: "127.0.0.1" - - DEFAULT_PORT: 8126 - - HEADER_CONTAINER_ID: ::String - - HEADER_DD_API_KEY: ::String - - HEADER_CLIENT_COMPUTED_TOP_LEVEL: ::String - - HEADER_META_LANG: ::String - - HEADER_META_LANG_VERSION: ::String - - HEADER_META_LANG_INTERPRETER: ::String - - HEADER_META_TRACER_VERSION: ::String - end - - module Test - ADAPTER: :test - end - - module UnixSocket - ADAPTER: :unix - - DEFAULT_PATH: "/var/run/datadog/apm.socket" - - DEFAULT_TIMEOUT_SECONDS: 1 - end - end - end -end