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.22.2 docs/Instrumentation.md
flipper-0.22.1 docs/Instrumentation.md
flipper-0.22.0 docs/Instrumentation.md
flipper-0.21.0 docs/Instrumentation.md
flipper-0.21.0.rc2 docs/Instrumentation.md
flipper-0.21.0.rc1 docs/Instrumentation.md
flipper-0.20.4 docs/Instrumentation.md
flipper-0.20.3 docs/Instrumentation.md
flipper-0.20.2 docs/Instrumentation.md
flipper-0.20.1 docs/Instrumentation.md
flipper-0.20.0 docs/Instrumentation.md
flipper-0.20.0.beta3 docs/Instrumentation.md
flipper-0.20.0.beta2 docs/Instrumentation.md
flipper-0.20.0.beta1 docs/Instrumentation.md
flipper-0.19.1 docs/Instrumentation.md
flipper-0.19.0 docs/Instrumentation.md
flipper-0.18.0 docs/Instrumentation.md
flipper-0.17.2 docs/Instrumentation.md
flipper-0.17.1 docs/Instrumentation.md
flipper-0.16.2 docs/Instrumentation.md