- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
A flare allows you to send necessary troubleshooting information to the Datadog support team, including tracer logs, with sensitive data removed. Flares are useful for troubleshooting issues like high CPU usage, high memory usage, and missing spans.
1.26.0
or greater2.11.0
or greater5.15.0
or greater, or 4.39.0
or greater2.46.0
or greaterTo send a flare from the Datadog site, make sure you’ve enabled Fleet Automation and Remote Configuration on the Agent. To send a remote flare:
For example:
Use Datadog debug settings to diagnose issues or audit trace data. Datadog does not recommend that you enable debug mode in production systems because it increases the number of events that are sent to your loggers. Use debug mode for debugging purposes only.
Debug mode is disabled by default. To enable it, follow the corresponding language tracer instructions:
The steps for enabling debug mode in the Datadog Python Tracer depends on the version of the tracer your application is using. Choose the scenario that applies:
To enable debug mode: DD_TRACE_DEBUG=true
To route debug logs to a log file, set DD_TRACE_LOG_FILE
to the filename of that log file, relative to the current working directory. For example, DD_TRACE_LOG_FILE=ddtrace_logs.log
.
By default, the file size is 15728640 bytes (about 15MB), and one backup log file is created. To increase the default log file size, specify the size in bytes with the DD_TRACE_LOG_FILE_SIZE_BYTES
setting.
Note: If the application uses the root logger and changes log level to DEBUG
, debug tracer logs are enabled. If you want to override this behavior, override the ddtrace
logger as follows:
import logging
# root logger configuration
root_logger = logging.getLogger()
root_logger.setLevel(logging.DEBUG)
# override the ddtrace configuration to WARNING log level
logging.getLogger("ddtrace").setLevel(logging.WARNING)
To enable debug mode: DD_TRACE_DEBUG=true
To route debug logs to a log file, set DD_TRACE_LOG_FILE
with a filename that tracer logs should be written to, relative to the current working directory. For example, DD_TRACE_LOG_FILE=ddtrace_logs.log
.
By default, the file size is 15728640 bytes (about 15MB) and one backup log file is created. To increase the default log file size, specify the size in bytes with the DD_TRACE_LOG_FILE_SIZE_BYTES
setting.
To route logs to the console, for Python 2 applications, configure logging.basicConfig()
or similar. Logs are automatically sent to the console for Python 3 applications.
To enable debug mode: DD_TRACE_DEBUG=true
To route logs to the console, for Python 2 or Python 3 applications, configure logging.basicConfig()
or use DD_CALL_BASIC_CONFIG=true
.
To enable debug mode: DD_TRACE_DEBUG=true
To route logs to the console, for Python 2 or Python 3 applications, configure logging.basicConfig()
or use DD_CALL_BASIC_CONFIG=true
.
For any version of ddtrace, rather than setting the DD_TRACE_DEBUG
tracer environment variable, you can enable debug logging in the application code by using the logging
standard library directly:
log = logging.getLogger("ddtrace.tracer")
log.setLevel(logging.DEBUG)
When debug mode for your tracer is enabled, tracer-specific log messages report how the tracer was initialized and whether traces were sent to the Agent. Debug logs are stored in a separate path depending on your logging configuration. If you enable application-level tracer information, debug logs are also sent in the flare for supported languages. The following log examples show what might appear in your log file.
If there are errors that you don’t understand, or if traces are reported as flushed to Datadog but you cannot see them in the Datadog UI, contact Datadog support and provide the relevant log entries with a flare.
Logs generated by the Python Tracer have the logging handler name ddtrace
.
Traces were generated:
<YYYY-MM-DD> 19:51:22,262 DEBUG [ddtrace.internal.processor.trace] [trace.py:211] - trace <TRACE ID> has 8 spans, 7 finished
Span generated by the Python tracer:
<YYYY-MM-DD> 19:51:22,251 DEBUG [ddtrace.tracer] [tracer.py:715] - finishing span name='flask.process_response' id=<SPAN ID> trace_id=<TRACE ID> parent_id=<PARENT ID> service='flask' resource='flask.process_response' type=None start=1655495482.2478693 end=1655495482.2479873 duration=0.000118125 error=0 tags={} metrics={} (enabled:True)
0.0:5050/
Traces were sent to the Datadog Agent:
<YYYY-MM-DD> 19:59:19,657 DEBUG [ddtrace.internal.writer] [writer.py:405] - sent 1.57KB in 0.02605s to http://localhost:8126/v0.4/traces
Traces failed to be sent to the Datadog Agent:
<YYYY-MM-DD> 19:51:23,249 ERROR [ddtrace.internal.writer] [writer.py:567] - failed to send traces to Datadog Agent at http://localhost:8126/v0.4/traces
추가 유용한 문서, 링크 및 기사: