Module: Datadog::Tracing::Contrib::SemanticLogger::Instrumentation::InstanceMethods
- Defined in:
- lib/datadog/tracing/contrib/semantic_logger/instrumentation.rb
Overview
Instance methods for configuration
Instance Method Summary collapse
Instance Method Details
#log(log, message = nil, progname = nil, &block) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/datadog/tracing/contrib/semantic_logger/instrumentation.rb', line 15 def log(log, = nil, progname = nil, &block) return super unless Datadog.configuration.tracing.log_injection return super unless Datadog.configuration.tracing[:semantic_logger].enabled return super unless log.is_a?(::SemanticLogger::Log) = log. || {} # Retrieves trace information for current thread correlation = Tracing.correlation # if the user already has conflicting log_tags # we want them to clobber ours, because we should allow them to override if needed. log. = correlation.to_h.merge() super(log, , progname, &block) end |