DataDog icon

DataDog

Send metrics, logs and events to DataDog using StatsD protocol

Overview

This node sends metrics, events, or service checks to DataDog using the StatsD protocol. It is useful for monitoring and observability workflows where you want to push custom telemetry data from n8n into DataDog for analysis, alerting, and visualization.

For the Metric resource with the Default operation, the node allows sending various types of metrics such as counters, gauges, histograms, sets, and distributions. This can be used to track application performance, count occurrences, measure values over time, or record statistical distributions.

Practical examples:

  • Increment a counter metric each time a user signs up.
  • Record the response time of an API call as a gauge.
  • Track unique visitors using a set metric.
  • Send histogram data for request latency distribution.

Properties

Name Meaning
Metric Name The name of the metric to send to DataDog.
Value The numeric value associated with the metric (e.g., increment amount, gauge value).
Sample Rate A number between 0 and 1 representing the sample rate to apply when sending the metric.
Tags Comma-separated list of tags in tag:value format to associate with the metric.

Output

The node outputs the original input items enriched with additional JSON fields indicating the result of the DataDog operation:

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

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential configured for authenticating with DataDog's StatsD endpoint.
  • Needs network access to the specified DataDog StatsD host and UDP port.
  • Uses the hot-shots npm package internally to communicate via StatsD protocol.
  • Node configuration requires specifying DataDog host, port, prefix, environment, and global tags.

Troubleshooting

  • Connection timeout or failure: Ensure that the DataDog agent or server is reachable at the configured host and port. Check network policies, DNS resolution, VPN connectivity, and that the DataDog agent is running and accepting StatsD metrics.
  • Operation timed out: Sending metrics has a 3-second timeout. If your network is slow or unstable, consider verifying connectivity or increasing timeout in code (not exposed in UI).
  • Invalid operation: Only the operations "counter", "gauge", "histogram", "set", and "distribution" are supported for metrics. Using unsupported operations will cause errors.
  • Tag formatting: Tags must be comma-separated and in key:value format. Incorrect tag formatting may cause metrics to be rejected or ignored.
  • Socket errors: These are logged and cause the node to fail. Verify that no firewall or network device blocks UDP traffic to the DataDog StatsD port.

Links and References

Discussion