<commit_before>= Instrumental Agent

Instrument anything.

== Setup

Add the gem to your Gemfile.

  gem 'instrumental_agent'

Visit instrumentalapp.com[instrumentalapp.com] and create an account, then 
initialize the agent with your API key, found in the Docs section.

  I = Instrumental::Agent.new('YOUR_API_KEY', :enabled => Rails.env.production?)

If you're already using EventMachine elsewhere, or are hosted on Heroku, then you will need to disable the reactor loop startup.

  I = Instrumental::Agent.new('YOUR_API_KEY', :enabled => Rails.env.production?, :start_reactor => false)

Now you can begin to use Instrumental to track your application.

  I.gauge('load', 1.23)
  I.increment('signups')

Data without historical context sucks. Instrumental lets you 
backfill data, allowing you to see deep into your project's past.

  User.find_each do |user|
    I.increment('signups', 1, user.created_at)
  end

Running under Rails? You can also give our experimental Rack middleware 
a shot by initializing it with:

  Instrumental::Middleware.boot<commit_msg>Noting the instrument_server command.<commit_after>= Instrumental Agent

Instrument anything.

== Setup

Add the gem to your Gemfile.

  gem 'instrumental_agent'

Visit instrumentalapp.com[instrumentalapp.com] and create an account, then 
initialize the agent with your API key, found in the Docs section.

  I = Instrumental::Agent.new('YOUR_API_KEY', :enabled => Rails.env.production?)

If you're already using EventMachine elsewhere, or are hosted on Heroku, then you will need to disable the reactor loop startup.

  I = Instrumental::Agent.new('YOUR_API_KEY', :enabled => Rails.env.production?, :start_reactor => false)

Now you can begin to use Instrumental to track your application.

  I.gauge('load', 1.23)
  I.increment('signups')

Data without historical context sucks. Instrumental lets you 
backfill data, allowing you to see deep into your project's past.

  User.find_each do |user|
    I.increment('signups', 1, user.created_at)
  end

Want some general server stats (load, memory, etc.)? Run this command, sorry not daemonized yet :)

  instrument_server

Running under Rails? You can also give our experimental Rack middleware 
a shot by initializing it with:

  Instrumental::Middleware.boot
{'fraction_non_alphanumeric': 0.08175824175824176, 'fraction_numerical': 0.0035164835164835165, 'mean_word_length': 4.704260651629073, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '44312', 'n_tokens_mistral': 694, 'n_tokens_neox': 646, 'n_words': 262}