Skip to content

Commit

Permalink
filters priority
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Shevchenko authored Jul 22, 2019
1 parent 8d79fdf commit 5513a30
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,31 +46,31 @@ end

# <img src='https://github.com/kirillshevch/query_track/blob/master/examples/console.jpg' alt='Log Example' />

### Slack Notifications
### Filters

To receive notifications about slow queries into Slack, you need to install [incoming-webhooks](https://reflow-files.slack.com/apps/A0F7XDUAZ-incoming-webhooks) and put link into config file:
To avoid noisy warnings from used gems, and places where fat queries are justified, you can filters SQL by backtrace.
For example, you have installed `activeadmin` and want to skip everything from `app/admin`:

```ruby
QueryTrack::Settings.configure do |config|
config.duration = 0.5
config.notifications.slack = 'https://hooks.slack.com/services/T0000000/B0000000/C0000000'
config.filters = ['app/admin']
end
```

# <img src='https://github.com/kirillshevch/query_track/blob/master/examples/slack.jpg' alt='Incoming Hook Example' />

### Filters
### Slack Notifications

To avoid noisy warnings from used gems, and places where fat queries are justified, you can filters SQL by backtrace.
For example, you have installed `activeadmin` and want to skip everything from `app/admin`:
To receive notifications about slow queries into Slack, you need to install [incoming-webhooks](https://reflow-files.slack.com/apps/A0F7XDUAZ-incoming-webhooks) and put link into config file:

```ruby
QueryTrack::Settings.configure do |config|
config.duration = 0.5
config.filters = ['app/admin']
config.notifications.slack = 'https://hooks.slack.com/services/T0000000/B0000000/C0000000'
end
```

# <img src='https://github.com/kirillshevch/query_track/blob/master/examples/slack.jpg' alt='Incoming Hook Example' />

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/kirillshevch/query_track.
Expand Down

0 comments on commit 5513a30

Please sign in to comment.