diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md index b6c12f92411..224d18818bc 100644 --- a/docs/GettingStarted.md +++ b/docs/GettingStarted.md @@ -2505,10 +2505,23 @@ In many cases, such as logging, it may be useful to correlate trace IDs to other ##### Automatic -For Rails applications using the default logger (`ActiveSupport::TaggedLogging`), `lograge` or `semantic_logger`, trace correlation injection is enabled by default. +For Rails applications using the default logger (`ActiveSupport::TaggedLogging`), `lograge`, or `semantic_logger`, trace correlation injection is enabled by default. It can be disabled by setting the environment variable `DD_LOGS_INJECTION=false`. +
+If using lograge, disable ActiveSupport::TaggedLogging to prevent plain-text TaggedLogging tags from polluting the log lines. +
+ +To disable `ActiveSupport::TaggedLogging`, in your Rails configuration, set: + +```ruby +config.logger = ActiveSupport::Logger.new(STDOUT) +config.active_job.logger = ActiveSupport::Logger.new(STDOUT) +``` + +This is not necessary when using `semantic_logger`. + #### For logging in Ruby applications To add correlation IDs to your logger, add a log formatter which retrieves the correlation IDs with `Datadog::Tracing.correlation`, then add them to the message.