All Projects → getsentry → Sentry Clj

getsentry / Sentry Clj

Licence: epl-1.0
Sentry SDK for Clojure

Programming Languages

clojure
4091 projects

Projects that are alternatives of or similar to Sentry Clj

sentry-spark
Apache Spark Sentry Integration
Stars: ✭ 14 (-77.78%)
Mutual labels:  crash-reporting, sentry
Sentry Go
Official Sentry SDK for Go
Stars: ✭ 415 (+558.73%)
Mutual labels:  sentry, crash-reporting
Sentry Dotnet
Sentry SDK for .NET
Stars: ✭ 280 (+344.44%)
Mutual labels:  sentry, crash-reporting
sentry-android-gradle-plugin
Gradle plugin for Sentry Android. Upload proguard, debug files, and more.
Stars: ✭ 67 (+6.35%)
Mutual labels:  crash-reporting, sentry
Sentry Python
The new Python SDK for Sentry.io
Stars: ✭ 870 (+1280.95%)
Mutual labels:  sentry, crash-reporting
sentry-fastlane-plugin
Official fastlane plugin for Sentry
Stars: ✭ 100 (+58.73%)
Mutual labels:  crash-reporting, sentry
Sentry Cocoa
The official Sentry SDK for iOS, tvOS, macOS, watchOS
Stars: ✭ 370 (+487.3%)
Mutual labels:  sentry, crash-reporting
Raven Python
Raven is the legacy Python client for Sentry (getsentry.com) — replaced by sentry-python
Stars: ✭ 1,677 (+2561.9%)
Mutual labels:  sentry, crash-reporting
Sentry
Sentry is cross-platform application monitoring, with a focus on error reporting.
Stars: ✭ 29,700 (+47042.86%)
Mutual labels:  sentry, crash-reporting
Sentry Cli
A command line utility to work with Sentry.
Stars: ✭ 567 (+800%)
Mutual labels:  sentry, crash-reporting
app
Buggregator is a beautiful, lightweight debug server build on Laravel that helps you catch your smpt, sentry, var-dump, monolog, ray outputs. It runs without installation on multiple platforms.
Stars: ✭ 259 (+311.11%)
Mutual labels:  crash-reporting, sentry
Sentry
Middleware to integrate with sentry crash reporting.
Stars: ✭ 55 (-12.7%)
Mutual labels:  sentry, crash-reporting
Sentry Telegram
Plugin for Sentry which allows sending notification via Telegram messenger.
Stars: ✭ 168 (+166.67%)
Mutual labels:  sentry, crash-reporting
nextcloud sentry
Sentry integration for Nextcloud
Stars: ✭ 26 (-58.73%)
Mutual labels:  crash-reporting, sentry
Raven Weapp
Sentry SDK for WeApp
Stars: ✭ 142 (+125.4%)
Mutual labels:  sentry, crash-reporting
Sentry Kubernetes
Kubernetes event reporter for Sentry
Stars: ✭ 345 (+447.62%)
Mutual labels:  sentry, crash-reporting
Raven.cr
Raven is a Crystal client for Sentry
Stars: ✭ 96 (+52.38%)
Mutual labels:  sentry, crash-reporting
Sentry Php
The official PHP SDK for Sentry (sentry.io)
Stars: ✭ 1,591 (+2425.4%)
Mutual labels:  sentry, crash-reporting
Sentry Dart
Sentry SDK for Dart and Flutter
Stars: ✭ 428 (+579.37%)
Mutual labels:  sentry, crash-reporting
Sentry Javascript
Official Sentry SDKs for JavaScript. We're hiring https://grnh.se/ca81c1701us
Stars: ✭ 6,012 (+9442.86%)
Mutual labels:  sentry, crash-reporting


Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoying technology. If you want to join us Check out our open positions

Sentry SDK for Clojure

Clojars Project

A very thin wrapper around the official Java library for Sentry.

This project follows the version scheme MAJOR.MINOR.COMMITS where MAJOR and MINOR provide some relative indication of the size of the change, but do not follow semantic versioning. In general, all changes endeavour to be non-breaking (by moving to new names rather than by breaking existing names). COMMITS is an ever-increasing counter of commits since the beginning of this repository.

Usage

(require '[sentry-clj.core :as sentry])

; You can initialize Sentry manually by providing a DSN or use one of the
; other optional configuration options supplied as a map (see below).

(sentry/init! "https://public:[email protected]/1")

; Sending a simple message is easy...

(try
  (do-something-risky)
  (catch Exception e
    (sentry/send-event {:message "Something has gone wrong!"}
                        :throwable e})))

If you want an interpolated message, you need to provide the full map, i.e.,

(try
  (do-something-risky)
  (catch Exception e
    (sentry/send-event {:message {:message "Something %s has gone %s!"
                                  :params ["foo" "bar"]}
                        :throwable e})))

Additional Initialisation Options

key description default
:environment Set the environment on which Sentry events will be logged, e.g., "staging" production
:debug Enable SDK logging at the debug level false
:release All events are assigned to a particular release
:shutdown-timeout Wait up to X milliseconds before shutdown if there are events to send 2000ms
:in-app-excludes A seqable collection (vector for example) containing package names to ignore when sending events
:enable-uncaught-exception-handler Enables the uncaught exception handler true
:before-send-fn A function (taking an event and a hint)
The body of the function must not be lazy (i.e., don't use filter on its own!) and must return an event or nil
If a nil is returned, the event will not be sent to Sentry
More Information
:before-breadcrumb-fn A function (taking a breadcrumb and a hint)
The body of the function must not be lazy (i.e., don't use filter on its own!) and must return a breadcrumb or nil
If a nil is returned, the breadcrumb will not be sent to Sentry
More Information
:contexts A map of key/value pairs to attach to every Event that is sent.
More Information

Some examples:

Basic Initialisation (using defaults):

(sentry/init! "https://public:[email protected]/1")

Initialisation with additional options:

(sentry/init! "https://public:[email protected]/1" {:environment "staging" :debug true :release "[email protected]" :in-app-excludes ["foo.bar"])
(sentry/init! "https://public:[email protected]/1" {:before-send-fn (fn [event _] (when-not (= (.. event getMessage getMessage "foo")) event))})
(sentry/init! "https://public:[email protected]/1" {:before-send-fn (fn [event _] (.setServerName event "fred") event)})
(sentry/init! "https://public:[email protected]/1" {:contexts {:foo "bar" :baz "wibble"}})

Supported event keys

API Documentation

  • :breadcrumbs - a collection of Breadcrumb maps. See below.
  • :dist - a String which identifies the distribution.
  • :environment - a String which identifies the environment.
  • :event-id - a String id to use for the event. If not provided, one will be automatically generated.
  • :extra - a map with Keyword or String keys (or anything for which clojure.core/name can be invoked) and values which can be JSON-ified. If :throwable is given, this will automatically include its ex-data.
    • note: :extra has been deprecated in favour of :contexts upon initialisation
  • :fingerprint - a sequence of Strings that Sentry should use as a fingerprint.
  • :level - a Keyword. One of :debug, :info, :warning, :error, :fatal. Probably most useful in conjunction with :message if you need to report an exceptional condition that's not an exception.
  • :logger - a String which identifies the logger.
  • :message - a map or String containing Message information. See below.
  • :platform - a String which identifies the platform.
  • :release - a String which identifies the release.
  • :request - a map containing Request information. See below.
  • :server-name - a String which identifies the server name.
  • :tags - a map with Keyword or String keys (or anything for which clojure.core/name can be invoked) and values which can be coerced to Strings with clojure.core/str.
  • :throwable - a Throwable object. Sentry's bread and butter.
  • :transaction - a String which identifies the transaction.
  • :user - a map containing User information. See below.

Breadcrumbs

API Documentation

When an event has a :breadcrumbs key, each element of the value collection should be a map. Each key is optional.

  • :type - A String
  • :level - a String
  • :message - a String
  • :category - a String
  • :data - a map with String keys and String values

Message

API Documentation

When an event has a :message key, either a simple string can be used, or if you require a parameterised message, the following data should be contained within a map, thus:

  • :formatted - A String containing the fully formatted message. If missing, Sentry will try to interpolate the message.
  • :message - An optional String containing the raw message. If there are params, it will be interpolated.
  • :params - An optional sequence of String's containing parameters for interpolation, e.g., `["foo" "bar"]

User

API Documentation

When an event has a :user key, the data following should be contained within a map. You should provide at either the id or the ip-address.

  • :email - A String
  • :id - A String
  • :username - A String
  • :ip-address - A String
  • :other - A map containing key/value pairs of Strings, i.e., {"a" "b" "c" "d"}

Request

API Documentation

When an event has a :request key, the data should be contained within a map. Each key is optional.

  • :url - A String
  • :method - A String
  • :query-string - A String
  • :data - An arbitrary value (e.g., a number, a string, a blob...)
  • :cookies - A String
  • :headers - A map containing key/value pairs of Strings, i.e., {"a" "b" "c" "d"}
  • :env - A map containing key/value pairs of Strings, i.e., {"a" "b" "c" "d"}
  • :other - A map containing key/value pairs of Strings, i.e., {"a" "b" "c" "d"}

License

Copyright © 2021 Coda Hale, Sentry

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].