- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
",t};e.buildCustomizationMenuUi=t;function n(e){let t='
",t}function s(e){let n=e.filter.currentValue||e.filter.defaultValue,t='${e.filter.label}
`,e.filter.options.forEach(s=>{let o=s.id===n;t+=``}),t+="${e.filter.label}
`,t+=`The Live Debugger enables you to add temporary log statements to your runtime code to collect information for debugging. The log statements (also referred to as “log probes”) are added dynamically, so there is no need to redeploy your code, allowing you to quickly resolve issues in a running system. You can edit or delete log probes at any time, and they automatically expire after 60 minutes.
The Live Debugger in the Datadog tool window shows the defined log probes and the log output from these probes:
The tree on the left shows all log probes created by the current user. Select a log probe to display the details for that probe, including log messages emitted during the past 24 hours. At the top-right of the panel, View logs in Datadog opens the Log Explorer in Datadog to show log events for the selected probe.
To navigate to the source code location for a probe, right-click and select Jump to Source.
In the source editor, an icon is shown in the gutter for any line that has a log probe defined:
Click the icon to open the Datadog tool window and select the log probe. Right-click the icon for options to enable, disable, edit, and delete the log probe. These actions are described in later sections.
To add a log probe, right-click on a line of code in the source editor and select Add a Log to a Live Service. A dialog appears where you can enter the service name, the environment, and the log message you would like to have emitted at runtime:
The log message field accepts a log template that contains descriptive text and variable references—see the Dynamic Instrumentation expression language documentation for details. The log message is generated using the runtime state immediately prior to the line of code being executed.
Log probes expire automatically after 60 minutes.
Notice that the remote code may be a different version compared to the source code in the IDE. The New Log Probe dialog displays the version of the code that is deployed remotely, if possible, so that you can see exactly where the log probe will be placed. This requires that your application or service is tagged with Git information.
To modify the log message for a probe, right-click the log probe and select Edit:
The service and environment cannot be changed by editing the log probe, only the log message. Changing the service or environment requires deleting the probe and creating a new one.
Note: Applying changes to the log probe also extends the expiration time to 60 minutes.
You can delete log probes by right-clicking the icon in the gutter of the source editor, or the entry in the tool window, and selecting Delete from the context menu.
You can enable or disable log probes by right-clicking and selecting the appropriate context menu item. The icon changes to indicate the current state of the log probe:
Icon | Description |
---|---|
Active: Log events will be generated when the line of code is about to be executed. | |
Disabled: The log probe is inactive, either because it automatically expired or the user disabled it manually. | |
Error: The log probe is not generating log events due to an error. | |
Warning: The log probe may not be generating log events. |
Disabling then re-enabling a log probe extends the expiry time of the probe to 60 minutes.
The Live Debugger feature supports Java and Python and is subject to the same setup requirements as Dynamic Instrumentation.