DataDog StatsD icon

DataDog StatsD

Send metrics, logs and events to DataDog using StatsD protocol

Overview

This node sends metrics, events, and service checks to DataDog using the StatsD protocol. Specifically for the Metric - Set operation, it counts unique occurrences of events by sending a "set" type metric to DataDog. This is useful when you want to track distinct elements, such as unique users or unique error codes, over time.

Common scenarios include:

  • Counting unique visitors to a website.
  • Tracking unique error types in an application.
  • Monitoring distinct transaction IDs processed.

Example: You might send a metric named unique_users with a value representing a user ID to count how many unique users have performed an action.

Properties

Name Meaning
Metric Name The name of the metric to send to DataDog (e.g., unique_users).
Value The value associated with the metric; for "set" operation, typically a unique identifier.
Sample Rate A number between 0 and 1 indicating the fraction of events to send (e.g., 0.5 means 50%).
Tags Comma-separated tags to apply to the metric in the format tag1:value1,tag2:value2.

Output

The node outputs the original input data augmented with additional fields under the json property:

  • dataDogSuccess: Boolean indicating if the metric was sent successfully.
  • dataDogResource: The resource type used (metric).
  • dataDogTarget: The DataDog host and port the metric was sent to.
  • dataDogTimestamp: ISO timestamp of when the metric was sent.
  • dataDogError: Present only if sending failed, contains the error message.

No binary data output is produced by this node.

Dependencies

  • Requires a configured API key credential for authenticating with DataDog.
  • Connects to a DataDog agent via UDP using the StatsD protocol.
  • Needs the DataDog agent running and accessible at the specified host and port.
  • Uses the hot-shots library internally to send metrics.

Troubleshooting

  • Connection Timeout: If the node times out connecting to DataDog, verify network connectivity, UDP port accessibility, and that the DataDog agent is running.
  • Socket Errors: Socket errors indicate issues communicating with the DataDog agent; check agent logs and network policies.
  • Operation Not Supported: Using an unsupported operation will throw an error; ensure the operation is one of the supported metric types.
  • Timeout Sending Metrics: Each metric send has a 3-second timeout; if exceeded, the node reports a timeout error.
  • Tag Formatting: Incorrect tag formatting may cause metrics to be rejected or ignored; use tag:value pairs separated by commas.

Links and References

Discussion