Unsure how to hook newrelic-erlang into statman using project based on docs. #11

blt opened this Issue Sep 27, 2013 · 1 comment


None yet
1 participant

blt commented Sep 27, 2013

From the README:

If you happen to be using statman you can use the included newrelic_statman transformer. It is fairly easy to transform the metrics, so if you're using Folsom, estatsd or your own tools, have a look at newrelic_statman to see how it's done.

However, newrelic_statman.erl does not supply a parse_transform/2 so it's not clear how this is meant to be hooked up. Doing this in a rebar.config certainly fails:

{erl_opts, [{parse_transform, newrelic_statman}]}.

blt commented Sep 29, 2013

Oh, okay, I think I get it. When the README said "transformer" I took that to mean that this library would act as a parse transformer, but that's not the case. Instead, you have to:

  1. start the statman application,
  2. start the newrelic application on a node acting as a statman aggregator,
  3. run newrelic_poller:start_link(fun newrelic_statman:poll/0) somewhere in the node's startup sequence.

The README makes clear which environment variables must be set.

@blt blt closed this Sep 29, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment