devops:monitoring:datadog:ddtrace
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| devops:monitoring:datadog:ddtrace [2025/02/14 14:07] – created 85.219.17.206 | devops:monitoring:datadog:ddtrace [2025/02/14 14:11] (current) – 85.219.17.206 | ||
|---|---|---|---|
| Line 9: | Line 9: | ||
| pip install ddtrace | pip install ddtrace | ||
| + | |||
| + | Once installed, you can begin instrumenting your application. | ||
| + | |||
| + | ==== Basic Usage ==== | ||
| + | |||
| + | After installation, | ||
| + | |||
| + | < | ||
| + | from ddtrace import tracer | ||
| + | |||
| + | # Example: tracing a simple function | ||
| + | @tracer.wrap() | ||
| + | def my_function(): | ||
| + | # Function logic | ||
| + | pass | ||
| + | </ | ||
| + | |||
| + | Alternatively, | ||
| + | |||
| + | < | ||
| + | from ddtrace import patch_all | ||
| + | patch_all() | ||
| + | </ | ||
| + | |||
| + | ==== Configuration ==== | ||
| + | |||
| + | The Datadog tracer can be configured with several options, such as setting the agent host, enabling/ | ||
| + | |||
| + | Here are some common configuration options: | ||
| + | |||
| + | * Datadog Agent Host: | ||
| + | * Set the Datadog Agent host to which traces should be sent. | ||
| + | < | ||
| + | from ddtrace import tracer | ||
| + | tracer.configure(hostname=' | ||
| + | </ | ||
| + | |||
| + | ==== Supported Libraries ==== | ||
| + | |||
| + | ddtrace supports a wide range of libraries and frameworks out of the box. Some popular integrations include: | ||
| + | |||
| + | | ||
| + | * | ||
| + | * | ||
| + | * | ||
| + | * | ||
| + | |||
| + | To enable tracing for these frameworks, simply import the relevant module, and ddtrace will automatically instrument them. | ||
devops/monitoring/datadog/ddtrace.1739542023.txt.gz · Last modified: 2025/02/14 14:07 by 85.219.17.206
