User Tools

Site Tools


devops:monitoring:datadog:dogstatsd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
devops:monitoring:datadog:dogstatsd [2025/02/14 14:14] – created 85.219.17.206devops: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, you need to install the appropriate client libraries based on your programming language. 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, you need to install the appropriate client libraries based on your programming language.
  
-- **Python:** `pip install datadog` +  * - **Python:** `pip install datadog` 
-- **Go:** `go get github.com/DataDog/datadog-go/statsd` +  - **Go:** `go get github.com/DataDog/datadog-go/statsd` 
-- **Node.js:** `npm install dogstatsd-client`+  - **Node.js:** `npm install dogstatsd-client`
  
 You can find the official client libraries for various languages in the [Datadog documentation](https://docs.datadoghq.com/developers/dogstatsd/). You can find the official client libraries for various languages in the [Datadog documentation](https://docs.datadoghq.com/developers/dogstatsd/).
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('my_app.response.time', 123) statsd.timer('my_app.response.time', 123)
 +</code>
 +
  
 Example usage in Node.js: Example usage in Node.js:
 +<code:node.js>
  
 const dogstatsd = require('dogstatsd-client'); const dogstatsd = require('dogstatsd-client');
Line 51: Line 56:
 // Send a timer metric // Send a timer metric
 statsd.timing('my_app.response.time', 123); statsd.timing('my_app.response.time', 123);
 +</code>
 ==== DogStatsD Features ==== ==== DogStatsD Features ====
  
-    Types of Metrics: +Types of Metrics: 
-        Counters: Count occurrences of an event (e.g., my_app.requests.count). +         *  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). +          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). +          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).+          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:+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('my_app.requests.count', tags=["env:production", "region:us-west"])+    statsd.increment('my_app.requests.count', tags=["env:production", "region:us-west"])
  
-    Multi-dimensional Aggregation: DogStatsD supports the aggregation of metrics by multiple dimensions (e.g., by host, service, or other attributes) to provide more granular insights.+Multi-dimensional Aggregation: DogStatsD supports the aggregation of metrics by multiple dimensions (e.g., by host, service, or other attributes) to provide more granular insights.
  
-    Real-time Metrics: DogStatsD reports metrics in real time, which can be visualized in Datadog dashboards, monitors, and alerts.+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