Sha256: 1108637f5e9441d09f6de0691597b9d2ec08653ad7d8109ee52d6dac8eb4f1ea
Contents?: true
Size: 999 Bytes
Versions: 16
Compression:
Stored size: 999 Bytes
Contents
module Datadog module Tracing module Contrib # Instrument Rails. module Rails # Rails log injection helper methods module LogInjection module_function # Use `app.config.log_tags` to inject propagation tags into the default Rails logger. def configure_log_tags(app_config) # When using SemanticLogger, app_config.log_tags could be a Hash and should not be modified here return unless app_config.log_tags.nil? || app_config.log_tags.respond_to?(:<<) app_config.log_tags ||= [] # Can be nil, we initialized it if so app_config.log_tags << proc { Tracing.log_correlation if Datadog.configuration.tracing.log_injection } rescue StandardError => e Datadog.logger.warn( "Unable to add Datadog Trace context to ActiveSupport::TaggedLogging: #{e.class.name} #{e.message}" ) false end end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems