Sha256: a223ab56299fb96ac99b610825815f29c189652ffe62b66215e8ae09bed5c7df

Contents?: true

Size: 1.21 KB

Versions: 1

Compression:

Stored size: 1.21 KB

Contents

# PeakflowUtils

Various tools to use with www.peakflow.io.

## Installation
Add this line to your application's Gemfile:

```ruby
gem "peak_flow_utils"
```

And then execute:
```bash
$ bundle
```

Or install it yourself as:
```bash
$ gem install peak_flow_utils
```

Add this to `config/peakflow.rb`:
```ruby
PeakFlowUtils::Notifier.configure(auth_token: "your-token")
```

## Usage

### Reporting errors manually

```ruby
PeakFlowUtils::Notifier.notify(error: error)
```

### Reporting Rails errors

Add this to `config/peakflow.rb`:
```ruby
PeakFlowUtils::NotifierRails.configure
```

### Reporting ActiveJob errors in Rails:

If you want the job name and its arguments logged in parameters you can execute this service:
```ruby
PeakFlowUtils::ActiveJobParametersLogging.execute!
```

### Reporting Sidekiq errors in Rails:

Add this to `config/peakflow.rb`:
```ruby
PeakFlowUtils::NotifierSidekiq.configure
```

If you want the job name and its arguments logged in parameters you can execute this service:
```ruby
PeakFlowUtils::SidekiqParametersLogging.execute!
```

## Contributing
Contribution directions go here.

## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
peak_flow_utils-0.1.17 README.md