diff --git a/lib/datadog/core/configuration/ext.rb b/lib/datadog/core/configuration/ext.rb new file mode 100644 index 0000000000..eacbbded6d --- /dev/null +++ b/lib/datadog/core/configuration/ext.rb @@ -0,0 +1,16 @@ +# typed: true + +module Datadog + module Core + module Configuration + module Ext + # @public_api + module Diagnostics + ENV_DEBUG_ENABLED = 'DD_TRACE_DEBUG'.freeze + ENV_HEALTH_METRICS_ENABLED = 'DD_HEALTH_METRICS_ENABLED'.freeze + ENV_STARTUP_LOGS_ENABLED = 'DD_TRACE_STARTUP_LOGS'.freeze + end + end + end + end +end diff --git a/lib/datadog/core/configuration/settings.rb b/lib/datadog/core/configuration/settings.rb index 906e434098..c7a3b150f5 100644 --- a/lib/datadog/core/configuration/settings.rb +++ b/lib/datadog/core/configuration/settings.rb @@ -3,6 +3,7 @@ require 'logger' require_relative 'base' +require_relative 'ext' require_relative '../environment/ext' require_relative '../runtime/ext' require_relative '../telemetry/ext' @@ -99,7 +100,7 @@ def initialize(*_) # @default `DD_TRACE_DEBUG` environment variable, otherwise `false` # @return [Boolean] option :debug do |o| - o.default { env_to_bool(Datadog::Core::Diagnostics::Ext::DD_TRACE_DEBUG, false) } + o.default { env_to_bool(Datadog::Core::Configuration::Ext::Diagnostics::ENV_DEBUG_ENABLED, false) } o.lazy o.on_set do |enabled| # Enable rich debug print statements. @@ -110,7 +111,6 @@ def initialize(*_) # Internal {Datadog::Statsd} metrics collection. # - # The list of metrics collected can be found in {Datadog::Core::Diagnostics::Ext::Health::Metrics}. # @public_api settings :health_metrics do # Enable health metrics collection. @@ -118,7 +118,7 @@ def initialize(*_) # @default `DD_HEALTH_METRICS_ENABLED` environment variable, otherwise `false` # @return [Boolean] option :enabled do |o| - o.default { env_to_bool(Datadog::Core::Diagnostics::Ext::Health::Metrics::ENV_ENABLED, false) } + o.default { env_to_bool(Datadog::Core::Configuration::Ext::Diagnostics::ENV_HEALTH_METRICS_ENABLED, false) } o.lazy end @@ -144,7 +144,7 @@ def initialize(*_) # @return [Boolean,nil] option :enabled do |o| # Defaults to nil as we want to know when the default value is being used - o.default { env_to_bool(Datadog::Core::Diagnostics::Ext::DD_TRACE_STARTUP_LOGS, nil) } + o.default { env_to_bool(Datadog::Core::Configuration::Ext::Diagnostics::ENV_STARTUP_LOGS_ENABLED, nil) } o.lazy end end diff --git a/lib/datadog/core/diagnostics/health.rb b/lib/datadog/core/diagnostics/health.rb index ca5810d73c..f9ce12270c 100644 --- a/lib/datadog/core/diagnostics/health.rb +++ b/lib/datadog/core/diagnostics/health.rb @@ -1,7 +1,7 @@ -# typed: strict +# typed: ignore -require_relative 'ext' require_relative '../metrics/client' +require_relative '../../tracing/diagnostics/health' module Datadog module Core @@ -10,26 +10,8 @@ module Diagnostics module Health # Health metrics for diagnostics class Metrics < Core::Metrics::Client - count :api_errors, Ext::Health::Metrics::METRIC_API_ERRORS - count :api_requests, Ext::Health::Metrics::METRIC_API_REQUESTS - count :api_responses, Ext::Health::Metrics::METRIC_API_RESPONSES - count :error_context_overflow, Ext::Health::Metrics::METRIC_ERROR_CONTEXT_OVERFLOW - count :error_instrumentation_patch, Ext::Health::Metrics::METRIC_ERROR_INSTRUMENTATION_PATCH - count :error_span_finish, Ext::Health::Metrics::METRIC_ERROR_SPAN_FINISH - count :error_unfinished_spans, Ext::Health::Metrics::METRIC_ERROR_UNFINISHED_SPANS - count :instrumentation_patched, Ext::Health::Metrics::METRIC_INSTRUMENTATION_PATCHED - count :queue_accepted, Ext::Health::Metrics::METRIC_QUEUE_ACCEPTED - count :queue_accepted_lengths, Ext::Health::Metrics::METRIC_QUEUE_ACCEPTED_LENGTHS - count :queue_dropped, Ext::Health::Metrics::METRIC_QUEUE_DROPPED - count :traces_filtered, Ext::Health::Metrics::METRIC_TRACES_FILTERED - count :transport_trace_too_large, Ext::Health::Metrics::METRIC_TRANSPORT_TRACE_TOO_LARGE - count :transport_chunked, Ext::Health::Metrics::METRIC_TRANSPORT_CHUNKED - count :writer_cpu_time, Ext::Health::Metrics::METRIC_WRITER_CPU_TIME - - gauge :queue_length, Ext::Health::Metrics::METRIC_QUEUE_LENGTH - gauge :queue_max_length, Ext::Health::Metrics::METRIC_QUEUE_MAX_LENGTH - gauge :queue_spans, Ext::Health::Metrics::METRIC_QUEUE_SPANS - gauge :sampling_service_cache_length, Ext::Health::Metrics::METRIC_SAMPLING_SERVICE_CACHE_LENGTH + # TODO: Don't reference this. Have tracing add its metrics behavior. + extend Tracing::Diagnostics::Health::Metrics end end end diff --git a/lib/datadog/core/diagnostics/ext.rb b/lib/datadog/tracing/diagnostics/ext.rb similarity index 90% rename from lib/datadog/core/diagnostics/ext.rb rename to lib/datadog/tracing/diagnostics/ext.rb index c83d42393b..244e79afce 100644 --- a/lib/datadog/core/diagnostics/ext.rb +++ b/lib/datadog/tracing/diagnostics/ext.rb @@ -1,19 +1,14 @@ # typed: true module Datadog - module Core + module Tracing module Diagnostics # @public_api module Ext - DD_TRACE_STARTUP_LOGS = 'DD_TRACE_STARTUP_LOGS'.freeze - DD_TRACE_DEBUG = 'DD_TRACE_DEBUG'.freeze - # Health module Health # Metrics module Metrics - ENV_ENABLED = 'DD_HEALTH_METRICS_ENABLED'.freeze - METRIC_API_ERRORS = 'datadog.tracer.api.errors'.freeze METRIC_API_REQUESTS = 'datadog.tracer.api.requests'.freeze METRIC_API_RESPONSES = 'datadog.tracer.api.responses'.freeze diff --git a/lib/datadog/tracing/diagnostics/health.rb b/lib/datadog/tracing/diagnostics/health.rb new file mode 100644 index 0000000000..3460a87ac2 --- /dev/null +++ b/lib/datadog/tracing/diagnostics/health.rb @@ -0,0 +1,40 @@ +# typed: ignore + +require_relative 'ext' + +module Datadog + module Tracing + module Diagnostics + # Health-related diagnostics + module Health + # Health metrics for diagnostics + module Metrics + def self.extended(base) + base.class_eval do + count :api_errors, Ext::Health::Metrics::METRIC_API_ERRORS + count :api_requests, Ext::Health::Metrics::METRIC_API_REQUESTS + count :api_responses, Ext::Health::Metrics::METRIC_API_RESPONSES + count :error_context_overflow, Ext::Health::Metrics::METRIC_ERROR_CONTEXT_OVERFLOW + count :error_instrumentation_patch, Ext::Health::Metrics::METRIC_ERROR_INSTRUMENTATION_PATCH + count :error_span_finish, Ext::Health::Metrics::METRIC_ERROR_SPAN_FINISH + count :error_unfinished_spans, Ext::Health::Metrics::METRIC_ERROR_UNFINISHED_SPANS + count :instrumentation_patched, Ext::Health::Metrics::METRIC_INSTRUMENTATION_PATCHED + count :queue_accepted, Ext::Health::Metrics::METRIC_QUEUE_ACCEPTED + count :queue_accepted_lengths, Ext::Health::Metrics::METRIC_QUEUE_ACCEPTED_LENGTHS + count :queue_dropped, Ext::Health::Metrics::METRIC_QUEUE_DROPPED + count :traces_filtered, Ext::Health::Metrics::METRIC_TRACES_FILTERED + count :transport_trace_too_large, Ext::Health::Metrics::METRIC_TRANSPORT_TRACE_TOO_LARGE + count :transport_chunked, Ext::Health::Metrics::METRIC_TRANSPORT_CHUNKED + count :writer_cpu_time, Ext::Health::Metrics::METRIC_WRITER_CPU_TIME + + gauge :queue_length, Ext::Health::Metrics::METRIC_QUEUE_LENGTH + gauge :queue_max_length, Ext::Health::Metrics::METRIC_QUEUE_MAX_LENGTH + gauge :queue_spans, Ext::Health::Metrics::METRIC_QUEUE_SPANS + gauge :sampling_service_cache_length, Ext::Health::Metrics::METRIC_SAMPLING_SERVICE_CACHE_LENGTH + end + end + end + end + end + end +end diff --git a/spec/datadog/core/configuration/settings_spec.rb b/spec/datadog/core/configuration/settings_spec.rb index f33033fae3..678a79398a 100644 --- a/spec/datadog/core/configuration/settings_spec.rb +++ b/spec/datadog/core/configuration/settings_spec.rb @@ -6,7 +6,6 @@ require 'logger' require 'datadog/core/configuration/settings' -require 'datadog/core/diagnostics/ext' require 'datadog/core/environment/ext' require 'datadog/core/runtime/ext' require 'datadog/core/utils/time' @@ -64,9 +63,9 @@ it { is_expected.to be false } - context "when #{Datadog::Core::Diagnostics::Ext::DD_TRACE_DEBUG}" do + context "when #{Datadog::Core::Configuration::Ext::Diagnostics::ENV_DEBUG_ENABLED}" do around do |example| - ClimateControl.modify(Datadog::Core::Diagnostics::Ext::DD_TRACE_DEBUG => environment) do + ClimateControl.modify(Datadog::Core::Configuration::Ext::Diagnostics::ENV_DEBUG_ENABLED => environment) do example.run end end @@ -121,9 +120,11 @@ describe '#enabled' do subject(:enabled) { settings.diagnostics.health_metrics.enabled } - context "when #{Datadog::Core::Diagnostics::Ext::Health::Metrics::ENV_ENABLED}" do + context "when #{Datadog::Core::Configuration::Ext::Diagnostics::ENV_HEALTH_METRICS_ENABLED}" do around do |example| - ClimateControl.modify(Datadog::Core::Diagnostics::Ext::Health::Metrics::ENV_ENABLED => environment) do + ClimateControl.modify( + Datadog::Core::Configuration::Ext::Diagnostics::ENV_HEALTH_METRICS_ENABLED => environment + ) do example.run end end diff --git a/spec/datadog/core/diagnostics/health_spec.rb b/spec/datadog/core/diagnostics/health_spec.rb deleted file mode 100644 index c01512df07..0000000000 --- a/spec/datadog/core/diagnostics/health_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -# typed: false - -require 'spec_helper' -require 'ddtrace' -require 'datadog/core/diagnostics/health' - -RSpec.describe Datadog::Core::Diagnostics::Health::Metrics do - subject(:health_metrics) { described_class.new } - - shared_examples_for 'a health metric' do |type, name, stat| - subject(:health_metric) { health_metrics.send(name, *args, &block) } - - let(:args) { [1] } - let(:block) { proc {} } - - it 'sends a measurement of the designated type' do - expect(health_metrics).to receive(type) do |*received_args, &received_block| - expect(received_args).to eq([stat, *args]) - expect(received_block).to be block - end - - health_metric - end - end - - # rubocop:disable Layout/LineLength - it_behaves_like 'a health metric', :count, :api_errors, Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_API_ERRORS - it_behaves_like 'a health metric', :count, :api_requests, Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_API_REQUESTS - it_behaves_like 'a health metric', :count, :api_responses, Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_API_RESPONSES - it_behaves_like 'a health metric', :count, :error_context_overflow, Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_ERROR_CONTEXT_OVERFLOW - it_behaves_like 'a health metric', :count, :error_instrumentation_patch, Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_ERROR_INSTRUMENTATION_PATCH - it_behaves_like 'a health metric', :count, :error_span_finish, Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_ERROR_SPAN_FINISH - it_behaves_like 'a health metric', :count, :error_unfinished_spans, Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_ERROR_UNFINISHED_SPANS - it_behaves_like 'a health metric', :count, :instrumentation_patched, Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_INSTRUMENTATION_PATCHED - it_behaves_like 'a health metric', :count, :queue_accepted, Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_ACCEPTED - it_behaves_like 'a health metric', :count, :queue_accepted_lengths, Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_ACCEPTED_LENGTHS - it_behaves_like 'a health metric', :count, :queue_dropped, Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_DROPPED - it_behaves_like 'a health metric', :count, :traces_filtered, Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_TRACES_FILTERED - it_behaves_like 'a health metric', :count, :writer_cpu_time, Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_WRITER_CPU_TIME - - it_behaves_like 'a health metric', :gauge, :queue_length, Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_LENGTH - it_behaves_like 'a health metric', :gauge, :queue_max_length, Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_MAX_LENGTH - it_behaves_like 'a health metric', :gauge, :queue_spans, Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_SPANS - it_behaves_like 'a health metric', :gauge, :sampling_service_cache_length, Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_SAMPLING_SERVICE_CACHE_LENGTH - # rubocop:enable Layout/LineLength -end diff --git a/spec/datadog/tracing/diagnostics/health_spec.rb b/spec/datadog/tracing/diagnostics/health_spec.rb new file mode 100644 index 0000000000..d55f969835 --- /dev/null +++ b/spec/datadog/tracing/diagnostics/health_spec.rb @@ -0,0 +1,50 @@ +# typed: ignore + +require 'spec_helper' +require 'ddtrace' +require 'datadog/core/diagnostics/health' +require 'datadog/tracing/diagnostics/health' + +RSpec.describe Datadog::Tracing::Diagnostics::Health::Metrics do + # TODO: Core::Health::Metrics directly extends Tracing::Health::Metrics + # In the future, have tracing add this behavior itself. For now, + # just use the core metrics class to drive the tests. + subject(:health_metrics) { Datadog::Core::Diagnostics::Health::Metrics.new } + + shared_examples_for 'a health metric' do |type, name, stat| + subject(:health_metric) { health_metrics.send(name, *args, &block) } + + let(:args) { [1] } + let(:block) { proc {} } + + it 'sends a measurement of the designated type' do + expect(health_metrics).to receive(type) do |*received_args, &received_block| + expect(received_args).to eq([stat, *args]) + expect(received_block).to be block + end + + health_metric + end + end + + # rubocop:disable Layout/LineLength + it_behaves_like 'a health metric', :count, :api_errors, Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_API_ERRORS + it_behaves_like 'a health metric', :count, :api_requests, Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_API_REQUESTS + it_behaves_like 'a health metric', :count, :api_responses, Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_API_RESPONSES + it_behaves_like 'a health metric', :count, :error_context_overflow, Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_ERROR_CONTEXT_OVERFLOW + it_behaves_like 'a health metric', :count, :error_instrumentation_patch, Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_ERROR_INSTRUMENTATION_PATCH + it_behaves_like 'a health metric', :count, :error_span_finish, Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_ERROR_SPAN_FINISH + it_behaves_like 'a health metric', :count, :error_unfinished_spans, Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_ERROR_UNFINISHED_SPANS + it_behaves_like 'a health metric', :count, :instrumentation_patched, Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_INSTRUMENTATION_PATCHED + it_behaves_like 'a health metric', :count, :queue_accepted, Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_ACCEPTED + it_behaves_like 'a health metric', :count, :queue_accepted_lengths, Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_ACCEPTED_LENGTHS + it_behaves_like 'a health metric', :count, :queue_dropped, Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_DROPPED + it_behaves_like 'a health metric', :count, :traces_filtered, Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_TRACES_FILTERED + it_behaves_like 'a health metric', :count, :writer_cpu_time, Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_WRITER_CPU_TIME + + it_behaves_like 'a health metric', :gauge, :queue_length, Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_LENGTH + it_behaves_like 'a health metric', :gauge, :queue_max_length, Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_MAX_LENGTH + it_behaves_like 'a health metric', :gauge, :queue_spans, Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_SPANS + it_behaves_like 'a health metric', :gauge, :sampling_service_cache_length, Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_SAMPLING_SERVICE_CACHE_LENGTH + # rubocop:enable Layout/LineLength +end diff --git a/spec/support/health_metric_helpers.rb b/spec/support/health_metric_helpers.rb index b87d871331..7c5ec229e9 100644 --- a/spec/support/health_metric_helpers.rb +++ b/spec/support/health_metric_helpers.rb @@ -2,43 +2,49 @@ require 'support/metric_helpers' require 'ddtrace' -require 'datadog/core/diagnostics/ext' +require 'datadog/tracing/diagnostics/ext' module HealthMetricHelpers include RSpec::Mocks::ArgumentMatchers METRICS = { - api_errors: { type: :count, name: Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_API_ERRORS }, - api_requests: { type: :count, name: Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_API_REQUESTS }, - api_responses: { type: :count, name: Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_API_RESPONSES }, + api_errors: { type: :count, name: Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_API_ERRORS }, + api_requests: { type: :count, name: Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_API_REQUESTS }, + api_responses: { type: :count, name: Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_API_RESPONSES }, error_context_overflow: { - type: :count, name: Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_ERROR_CONTEXT_OVERFLOW + type: :count, name: Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_ERROR_CONTEXT_OVERFLOW }, error_instrumentation_patch: { - type: :count, name: Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_ERROR_INSTRUMENTATION_PATCH + type: :count, name: Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_ERROR_INSTRUMENTATION_PATCH + }, + error_span_finish: { + type: :count, name: Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_ERROR_SPAN_FINISH }, - error_span_finish: { type: :count, name: Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_ERROR_SPAN_FINISH }, error_unfinished_spans: { - type: :count, name: Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_ERROR_UNFINISHED_SPANS + type: :count, name: Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_ERROR_UNFINISHED_SPANS }, instrumentation_patched: { - type: :count, name: Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_INSTRUMENTATION_PATCHED + type: :count, name: Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_INSTRUMENTATION_PATCHED }, - queue_accepted: { type: :count, name: Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_ACCEPTED }, + queue_accepted: { type: :count, name: Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_ACCEPTED }, queue_accepted_lengths: { - type: :count, name: Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_ACCEPTED_LENGTHS + type: :count, name: Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_ACCEPTED_LENGTHS + }, + queue_dropped: { type: :count, name: Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_DROPPED }, + transport_trace_too_large: { + type: :count, + name: Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_TRANSPORT_TRACE_TOO_LARGE + }, + transport_chunked: { + type: :count, name: Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_TRANSPORT_CHUNKED }, - queue_dropped: { type: :count, name: Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_DROPPED }, - transport_trace_too_large: { type: :count, - name: Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_TRANSPORT_TRACE_TOO_LARGE }, - transport_chunked: { type: :count, name: Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_TRANSPORT_CHUNKED }, - traces_filtered: { type: :count, name: Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_TRACES_FILTERED }, - writer_cpu_time: { type: :count, name: Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_WRITER_CPU_TIME }, - queue_length: { type: :gauge, name: Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_LENGTH }, - queue_max_length: { type: :gauge, name: Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_MAX_LENGTH }, - queue_spans: { type: :gauge, name: Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_SPANS }, + traces_filtered: { type: :count, name: Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_TRACES_FILTERED }, + writer_cpu_time: { type: :count, name: Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_WRITER_CPU_TIME }, + queue_length: { type: :gauge, name: Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_LENGTH }, + queue_max_length: { type: :gauge, name: Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_MAX_LENGTH }, + queue_spans: { type: :gauge, name: Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_QUEUE_SPANS }, sampling_service_cache_length: { - type: :gauge, name: Datadog::Core::Diagnostics::Ext::Health::Metrics::METRIC_SAMPLING_SERVICE_CACHE_LENGTH + type: :gauge, name: Datadog::Tracing::Diagnostics::Ext::Health::Metrics::METRIC_SAMPLING_SERVICE_CACHE_LENGTH } }.freeze