Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gewo/bugsnag.cr
bugsnag exception notifier written in crystal. Supports sidekiq.cr, kemal, HTTP::Server.
https://github.com/gewo/bugsnag.cr
Last synced: about 2 months ago
JSON representation
bugsnag exception notifier written in crystal. Supports sidekiq.cr, kemal, HTTP::Server.
- Host: GitHub
- URL: https://github.com/gewo/bugsnag.cr
- Owner: gewo
- License: mit
- Created: 2017-01-24T10:55:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-08T21:59:54.000Z (over 1 year ago)
- Last Synced: 2024-06-22T02:48:25.945Z (3 months ago)
- Language: Crystal
- Homepage:
- Size: 14.6 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crystal - bugsnag.cr - Bugsnag exception notifier and sidekiq middleware (Third-party APIs)
- awesome-crystal - bugsnag.cr - Bugsnag exception notifier and sidekiq middleware (Third-party APIs)
README
# bugsnag.cr
[![Build
Status](https://travis-ci.org/gewo/bugsnag.cr.svg)](https://travis-ci.org/gewo/bugsnag.cr/)[bugsnag][] exception notifier written in [crystal][]. Supports
[sidekiq.cr][], [kemal][], HTTP::Server.[bugsnag.cr][] is heavily inspired by (read: stolen)
[airbrake-crystal][]. Thanks.## Usage
Reporting handled exceptions:
require "bugsnag"
begin
raise "Something went wrong!"
rescue => exception
Bugsnag.notify(exception)
end### sidekiq
require "bugsnag"
require "bugsnag/sidekiq"cli = Sidekiq::CLI.new
server = cli.configure do |config|
config.server_middleware.add Bugsnag::Sidekiq.new
end### HTTP::Server
require "http/server"
require "bugsnag"
require "bugsnag/http_handler"server = HTTP::Server.new("0.0.0.0", 1337,
[
Bugsnag::HttpHandler.new
]) do |context|
raise "narf"
endserver.listen
### Kemal
require "kemal"
require "bugsnag"
require "bugsnag/http_handler"add_handler Bugsnag::HttpHandler.new
get "/" do |env|
raise "narf"
endKemal.run
## Configuration
require "bugsnag"
Bugsnag.configure do |config|
config.api_key = "YOUR_API_KEY_HERE"
end## Installation
Add [bugsnag.cr][bugsnag.cr] as a dependency in `shards.yml`
dependencies:
bugsnag:
github: gewo/bugsnag.crRun `shards update` to download.
[bugsnag.cr]: https://github.com/gewo/bugsnag.cr/
[bugsnag]: https://bugsnag.com/
[crystal]: https://crystal-lang.org/
[kemal]: http://kemalcr.com
[sidekiq.cr]: https://github.com/mperham/sidekiq.cr/
[airbrake-crystal]: https://github.com/kyrylo/airbrake-crystal/