GithubHelp home page GithubHelp logo

rollcage's Introduction

Rollcage Circle CI codecov.io

A Clojure client for Rollbar

Usage

Rollcage is available on Clojars. Add the following to your project.clj:

[circleci/rollcage "0.2.3"]

You can send exceptions like this:

user=> (require '[circleci.rollcage.core :as rollcage])

user=> (def r (rollcage/client "access-token" {:environment "staging"}))

user=> (try
  #_=>   (/ 0)
  #_=>   (catch Exception e
  #_=>     (rollcage/error r e)))
{:err 0, :result {:id nil, :uuid "1cb0c8bf-3942-4553-a5c4-8adc5d55ed8f"}}

You can also setup handler for all UncaughtExceptions. Call this fn during start-up procedure to ensure all uncaught exceptions will be sent to Rollbar.

user=> (rollcage/setup-uncaught-exception-handler r)

Testing

A full CI suite is run on CircleCI. You can run the unit-test suite locally by running lein test. Some tests require access to Rollbar, with a valid access token that has permission to post server items. The token should be specified in the ROLLBAR_ACCESS_TOKEN environment variable.

$ ROLLBAR_ACCESS_TOKEN=<your token> lein test

The tests that require access to Rollbar are annotated with the :integration metadata tag. You can exclude these by using the :unit test selector.

$ lein test :unit

Releasing

Releases are published to Clojars under the CircleCI organisation. You can publish new SNAPSHOT version of Rollcage using leiningen:

$ lein deploy clojars

You can release a new version of Rollcage by editing the version string in project.clj according to semver and removing the -SNAPSHOT qualifier. Then run

$ lein deploy clojars

License

Distributed under the Eclipse Public License.

rollcage's People

Contributors

marcomorain avatar projectfrank avatar gordonsyme avatar marketaadamova avatar j0ni avatar kimh avatar notnoopci avatar

Watchers

Jérémy Van de Wyngaert avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.