Skip to content

Commit ae882a6

Browse files
Update lograge compatibility for Ruby logging (#30998)
* Update lograge compatibility for Ruby logging * Apply suggestion from @drichards-87 Co-authored-by: DeForest Richards <[email protected]> * Apply suggestion from @drichards-87 Co-authored-by: DeForest Richards <[email protected]> * Apply suggestion from @drichards-87 Co-authored-by: DeForest Richards <[email protected]> --------- Co-authored-by: DeForest Richards <[email protected]>
1 parent 5180093 commit ae882a6

File tree

1 file changed

+7
-2
lines changed
  • content/en/tracing/other_telemetry/connect_logs_and_traces

1 file changed

+7
-2
lines changed

content/en/tracing/other_telemetry/connect_logs_and_traces/ruby.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ In many cases, such as logging, it may be useful to correlate trace IDs to other
2323

2424
#### Automatic injection
2525

26-
For Rails applications using the default logger (`ActiveSupport::TaggedLogging`), `lograge`, or `semantic_logger`, trace ID injection is automatically configured. You need to add a [trace remapper][1] to connect the relevant logs with the traces.
26+
For Rails applications using `ActiveSupport::TaggedLogging` (default), `semantic_logger`, or `lograge`, trace ID injection is configured automatically.
27+
28+
<div class="alert alert-warning">
29+
When using <code>lograge</code>, you must <a href="/tracing/trace_collection/automatic_instrumentation/dd_libraries/ruby/#for-logging-in-rails-applications">disable <code>TaggedLogging</code></a>.
30+
</div>
31+
32+
You must also add a [trace remapper][1] to link the relevant logs to their corresponding traces.
2733

2834
#### Manual injection
2935

@@ -72,4 +78,3 @@ Datadog::Tracing.trace('my.operation') { logger.warn('This is a traced operation
7278
{{< partial name="whats-next/whats-next.html" >}}
7379

7480
[1]: /logs/log_configuration/processors/?tab=ui#trace-remapper
75-

0 commit comments

Comments
 (0)