README.md in harness-0.4.0 vs README.md in harness-0.5.0
- old
+ new
@@ -1,7 +1,17 @@
# Harness
+[][travis]
+[][gem]
+[][codeclimate]
+[][gemnasium]
+[gem]: https://rubygems.org/gems/harness
+[travis]: http://travis-ci.org/twinturbo/harness
+[gemnasium]: https://gemnasium.com/twinturbo/harness
+[codeclimate]: https://codeclimate.com/github/twinturbo/harness
+[coveralls]: https://coveralls.io/r/twinturbo/harness
+
Harness connects measurements coming from `ActiveSupport::Notifications`
to external metric tracking services. Counters are stored locally with
redis before being sent to the service.
Currently Supported Services:
@@ -45,25 +55,25 @@
## Installation
Add this line to your application's Gemfile:
-```
+```ruby
gem 'harness'
```
And then execute:
+```shell
+bundle
```
-$ bundle
-```
Or install it yourself as:
+```shell
+gem install harness
```
-$ gem install harness
-```
## Usage
In the metrics world there are two types of things: Gauges and Counters.
Gauges are time sensitive and represent something at a specific point in
@@ -212,11 +222,14 @@
```
## Configuration
### Librato
+
```ruby
+require 'harness/adapters/librato_adapter'
+
Harness.config.adapter = :librato
Harness.config.librato.email = 'example@example.com'
Harness.config.librato.token = 'your-api-key'
@@ -229,10 +242,12 @@
If not, you can use the configuration proxy as described below. You
must also add `statsd-instrument` to your `Gemfile`. This is a soft
dependency that is not installed for you.
```ruby
+require 'harness/adapters/statsd_adapter'
+
Harness.config.adapter = :statsd
# Harness.config.statsd is a proxy for the StatsD class
Harness.config.statsd.host = 'localhost'
Harness.config.statsd.port = '8080'
@@ -245,19 +260,31 @@
```
### Stathat
```ruby
+require 'harness/adapters/statsd_adapter'
+
Harness.config.adapter = :stathat
Harness.config.stathat.ezkey = 'example@example.com'
```
## Rails Integration
Harness will automatically log metrics coming from `ActionPack`,
`ActiveRecord`, and `ActionMailer`. `ActiveSupport` instrumentation is
-disabled by default. Also, custom integrations are disabled by default.
+disabled by default. First require your adapter in an initializer
+Harness no longer requires adapters with external dependencies for
+you. Create a `config/initializers/harness.rb` and require your
+adapter in it:
+
+```ruby
+require 'harness/adapters/statsd_adapter'
+# other configuration
+```
+
+Also, custom integrations are disabled by default.
You can turn on instrumentation for specific components like so:
```ruby
config.harness.instrument.action_controller = false
config.harness.instrument.active_support = true