이 페이지는 아직 영어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우 언제든지 연락주시기 바랍니다.

Automated debug log collection

Automated debug logs are supported for Node.js and .NET only. For other languages, use manual debug log collection instead.

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.

Prerequisites

  • Remote Configuration must be enabled.
  • Your API key must be configured for Remote Configuration.
  • You must have a supported tracer version:
    • Java: 1.26.0 or greater
    • Python: 2.11.0 or greater
    • Node.js: 5.15.0 or greater, or 4.39.0 or greater
    • .NET: 2.46.0 or greater

Send a flare

To 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:

  1. From the Fleet Automation page, select an Agent that requires support.
  2. Click Support.
  3. Click Send Support Ticket.
  4. Provide an existing Zendesk support ticket number. If you don’t provide a ticket number, one is created on your behalf.
  5. Enable Debug mode to allow Datadog support staff to troubleshoot your issue faster. The log level is reset to its previous configuration after you send the flare.
  6. If you are troubleshooting your application, enable application tracer level logs to be included in the flare.
  7. Click Send Ticket.

For example:

The Send Ticket button launches a form to send a flare for an existing or new support ticket

Enable debug mode

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:

To enable debug mode for the Datadog Go Tracer, set the environment variable DD_TRACE_DEBUG=true, or enable the debug mode during the Start config:

package main

import (
  "gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer" // 1.x
  // "github.com/DataDog/dd-trace-go/v2/ddtrace/tracer" // 2.x
)

func main() {
    tracer.Start(tracer.WithDebugMode(true))
    defer tracer.Stop()
}

Abandoned span logs

The Datadog Go Tracer also supports logging for potentially abandoned spans. To enable this debug mode in Go, set the environment variable DD_TRACE_DEBUG_ABANDONED_SPANS=true. To change the duration after which spans are considered abandoned (default=10m), set the environment variable DD_TRACE_ABANDONED_SPAN_TIMEOUT to the desired time duration. Abandoned span logs appear at the Info level.

You can also enable debugging abandoned spans during the Start config:

package main

import (
  "time"

  "gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer" // 1.x
  // "github.com/DataDog/dd-trace-go/v2/ddtrace/tracer" // 2.x
)

func main() {
    tracer.Start(tracer.WithDebugSpansMode(10 * time.Minute))
    defer tracer.Stop()
}

Review debug logs

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.

Trace submission attempt to the Agent:

YYYY/MM/DD 16:06:35 Datadog Tracer <version> DEBUG: Sending payload: size: <size of traces> traces: <number of traces>.

Trace failed to send to the Agent:

2019/08/07 16:12:27 Datadog Tracer <version> ERROR: lost <number of traces> traces: Post http://localhost:8126/v0.4/traces: dial tcp 127.0.0.1:8126: connect: connection refused, 4 additional messages skipped (first occurrence: DD MM YY 16:11 UTC)

Further Reading

추가 유용한 문서, 링크 및 기사:

PREVIEWING: ida.adjivon/DOCS-9781-V2
Your Privacy Choices