Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Simple Example #91

Closed
ryanb opened this issue Sep 4, 2012 · 4 comments
Closed

Fix Simple Example #91

ryanb opened this issue Sep 4, 2012 · 4 comments

Comments

@ryanb
Copy link

ryanb commented Sep 4, 2012

The simple example in the README raises this exception: undefined method map for nil:NilClass (NoMethodError)

The problem seems to be that a :series option is not given to the timeseries_gauge. Here is a working version (taken from doc/minimal_example.rb).

require "fnordmetric"

FnordMetric.namespace :simple do
  timeseries_gauge :unicorns_seen,
    :tick => 30.seconds,
    :calculate => :average,
    :series => [:num_unicorns]

  event :unicorn_seen do
    incr :unicorns_seen, :num_unicorns, rand(5)
  end
end

FnordMetric.standalone
@mcfiredrill
Copy link
Contributor

👍

@skorfmann
Copy link
Contributor

Why is this still not updated in the Readme? Just ran into this issue :-/

@skorfmann
Copy link
Contributor

this can be closed as the referenced pull request was merged in.

@asmuth
Copy link
Owner

asmuth commented Jan 18, 2013

Thanks, closed! :)

@asmuth asmuth closed this as completed Jan 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants