Sha256: 8c3984a4682733a9edbbac0cb073fce16f0e4e692053defb24963a15e5d02846

Contents?: true

Size: 931 Bytes

Versions: 56

Compression:

Stored size: 931 Bytes

Contents

# Instrumentation

Flipper comes with automatic instrumentation. By default these work with ActiveSupport::Notifications, but only require the pieces of ActiveSupport that are needed and only do so if you actually attempt to require the instrumentation files listed below.

To use the log subscriber:

```ruby
# Gemfile
gem "activesupport"

# config/initializers/flipper.rb (or wherever you want it)
require "flipper/instrumentation/log_subscriber"
```

To use the statsd instrumentation:

```ruby
# Gemfile
gem "activesupport"
gem "statsd-ruby"

# config/initializers/flipper.rb (or wherever you want it)
require "flipper/instrumentation/statsd"
Flipper::Instrumentation::StatsdSubscriber.client = Statsd.new # or whatever your statsd instance is
```

You can also do whatever you want with the instrumented events. Check out [this example](https://github.com/jnunemaker/flipper/blob/master/examples/instrumentation.rb) for more.

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
flipper-0.16.1 docs/Instrumentation.md
flipper-0.16.0 docs/Instrumentation.md
flipper-0.15.0 docs/Instrumentation.md
flipper-0.14.0 docs/Instrumentation.md
flipper-0.13.0 docs/Instrumentation.md
flipper-0.13.0.beta1 docs/Instrumentation.md
flipper-0.12.2 docs/Instrumentation.md
flipper-0.12.1 docs/Instrumentation.md
flipper-0.12.0 docs/Instrumentation.md
flipper-0.11.0 docs/Instrumentation.md
flipper-0.11.0.rc1 docs/Instrumentation.md
flipper-0.11.0.beta9 docs/Instrumentation.md
flipper-0.11.0.beta8 docs/Instrumentation.md
flipper-0.11.0.beta7 docs/Instrumentation.md
flipper-0.11.0.beta6 docs/Instrumentation.md
flipper-0.11.0.beta5 docs/Instrumentation.md
flipper-0.11.0.beta4 docs/Instrumentation.md
flipper-0.11.0.beta3 docs/Instrumentation.md
flipper-0.11.0.beta1 docs/Instrumentation.md
flipper-0.10.2 docs/Instrumentation.md