lib/ddtrace/diagnostics/environment_logger.rb in ddtrace-0.45.0 vs lib/ddtrace/diagnostics/environment_logger.rb in ddtrace-0.46.0
- old
+ new
@@ -5,17 +5,17 @@
module Datadog
module Diagnostics
# A holistic collection of the environment in which ddtrace is running.
# This logger should allow for easy reporting by users to Datadog support.
#
- # rubocop:disable Style/DoubleNegation
module EnvironmentLogger
class << self
# Outputs environment information to {Datadog.logger}.
# Executes only for the lifetime of the program.
def log!(transport_responses)
return if @executed || !log?
+
@executed = true
data = EnvironmentCollector.new.collect!(transport_responses)
data.reject! { |_, v| v.nil? } # Remove empty values from hash output
@@ -163,9 +163,10 @@
# @return [Hash, nil] concatenated list of global tracer tags configured
def tags
tags = Datadog.configuration.tags
return nil if tags.empty?
+
hash_serializer(tags)
end
# @return [Boolean, nil] runtime metrics enabled in configuration
def runtime_metrics_enabled