devops:monitoring:datadog:dogstatsd
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| devops:monitoring:datadog:dogstatsd [2025/02/14 14:14] – created 85.219.17.206 | devops:monitoring:datadog:dogstatsd [2025/02/14 14:18] (current) – [DogStatsD Features] 85.219.17.206 | ||
|---|---|---|---|
| Line 9: | Line 9: | ||
| DogStatsD is bundled with the Datadog Agent, so no separate installation is required if you have the Agent running. To use DogStatsD in your application, | DogStatsD is bundled with the Datadog Agent, so no separate installation is required if you have the Agent running. To use DogStatsD in your application, | ||
| - | - **Python:** `pip install datadog` | + | * - **Python:** `pip install datadog` |
| - | - **Go:** `go get github.com/ | + | |
| - | - **Node.js: | + | |
| You can find the official client libraries for various languages in the [Datadog documentation](https:// | You can find the official client libraries for various languages in the [Datadog documentation](https:// | ||
| Line 21: | Line 21: | ||
| Example usage in **Python**: | Example usage in **Python**: | ||
| - | ```python | + | <code:python> |
| + | |||
| from datadog import DogStatsd | from datadog import DogStatsd | ||
| Line 35: | Line 37: | ||
| # Send a timer metric | # Send a timer metric | ||
| statsd.timer(' | statsd.timer(' | ||
| + | </ | ||
| + | |||
| Example usage in Node.js: | Example usage in Node.js: | ||
| + | < | ||
| const dogstatsd = require(' | const dogstatsd = require(' | ||
| Line 51: | Line 56: | ||
| // Send a timer metric | // Send a timer metric | ||
| statsd.timing(' | statsd.timing(' | ||
| + | </ | ||
| ==== DogStatsD Features ==== | ==== DogStatsD Features ==== | ||
| - | | + | Types of Metrics: |
| - | Counters: Count occurrences of an event (e.g., my_app.requests.count). | + | * |
| - | Gauges: Measure a value at a specific point in time (e.g., my_app.memory.usage). | + | |
| - | Timers: Measure the time it takes to perform an operation (e.g., my_app.response.time). | + | |
| - | Histograms: Collect distribution statistics (e.g., request duration or response sizes). | + | |
| - | | + | Tags: DogStatsD supports adding custom tags to metrics for more detailed filtering and grouping in Datadog. For example, you can track metrics by region or host: |
| - | statsd.increment(' | + | |
| - | | + | Multi-dimensional Aggregation: |
| - | | + | Real-time Metrics: DogStatsD reports metrics in real time, which can be visualized in Datadog dashboards, monitors, and alerts. |
| ==== DogStatsD with Datadog Agent ==== | ==== DogStatsD with Datadog Agent ==== | ||
devops/monitoring/datadog/dogstatsd.1739542453.txt.gz · Last modified: 2025/02/14 14:14 by 85.219.17.206
