GraphiteD.cfc is a simplicit exploration of the Graphite SaaS - - that implements StatsD-like behavior inside of a set of ColdFusion components.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

GraphiteD - An Exploration of Using ColdFusion

by Ben Nadel (on Google+)

GraphiteD is a dumbed-down exploration of the Graphite SaaS,, written in ColdFusion. The root component, GraphiteD.cfc, buffers metrics (somewhat similar to the way that StatsD would) before flushing them to over UDP (with a fallback to HTTP). Since there is no external service running, GraphiteD.cfc depends on continuous use in order to flush the buffered metrics.

To instantiate the GraphiteD component, all you need to do is pass it your API key:

  • GraphiteD( apiKey [, interval [, maxUdpPayloadSize ] ] );

... then, to start logging metrics, you can use one of the three recording methods:

  • recordCounterMetric( name, value );
  • recordGaugeMetric( name, value );
  • recordTimerMetric( name, value );

Why This Is Not As Good As StatsD

This was intended as an exploration of the Graphite SaaS; it was not intended to replace the use of the StatsD Node.js daemon (by Etsy). This ColdFusion component has a number of inherit limitations:

  1. Due to the use of shared memory space, it has to implement locking. Granted, the locking is extremely light-weight; but, it is locking nonetheless. It would be better to defer locking to a Node.js daemon outside of the ColdFusion workflow.
  2. Since the metrics cache is inside of a ColdFusion component instance, it cannot aggregate stats across different instances of ColdFusion on different machines in the same application.

That said, I guess the benefit of GraphiteD is that you don't have to have Node.js installed in order to run StatsD.