File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 11"""
2- Datadog APM traces can be integrated with Logs by:
2+ Datadog APM traces can be integrated with the logs product by:
33
441. Having ``ddtrace`` patch the ``logging`` module. This will add trace
55attributes to the log record.
@@ -40,15 +40,15 @@ def hello():
4040If you prefer to instrument manually, patch the logging library then update the
4141log formatter as in the following example
4242
43- Note that ``dd.trace_id`` and ``dd.span_id`` must come last ::
43+ Make sure that your log format exactly matches the following ::
4444
4545 from ddtrace import patch_all; patch_all(logging=True)
4646 import logging
4747 from ddtrace import tracer
4848
4949 FORMAT = ('%(asctime)s %(levelname)s [%(name)s] [%(filename)s:%(lineno)d] '
5050 '[dd.service=%(dd.service)s dd.env=%(dd.env)s '
51- 'dd.version=%(dd.version)s] '
51+ 'dd.version=%(dd.version)s '
5252 'dd.trace_id=%(dd.trace_id)s dd.span_id=%(dd.span_id)s]'
5353 '- %(message)s')
5454 logging.basicConfig(format=FORMAT)
You can’t perform that action at this time.
0 commit comments