Skip to content

Commit

Permalink
raven-options -> sentry-options
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur Aliiev authored and Arthur Aliiev committed Mar 18, 2024
1 parent fa85dfe commit ff34689
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ Reporter provides a [component](https://github.com/stuartsierra/component) in or

### Changelog

#### 1.0.0

- Migrating from `exoscale/raven` to `io.sentry/sentry-clj`
- `raven-options` renamed to `sentry-options` within `spootnik.reporter.impl/Reporter` signature

#### 0.2.0

- Allow arbitray values for counter
- Allow arbitray values for counter

#### 0.1.60

Expand Down
12 changes: 6 additions & 6 deletions src/spootnik/reporter/impl.clj
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@
;; Reporter configuration specs:
;; https://github.com/exoscale/reporter/blob/master/src/spootnik/reporter/specs.clj

(defrecord Reporter [rclient raven-options reporters registry sentry
(defrecord Reporter [rclient sentry-options reporters registry sentry
metrics riemann prevent-capture? prometheus
started? pushgateway]
c/Lifecycle
Expand All @@ -389,7 +389,7 @@
pgmetrics (when pushgateway (build-collectors! pgregistry (get-in metrics [:reporters :pushgateway])))
rclient (when riemann (riemann-client riemann))
[reg reps] (build-metrics metrics rclient prometheus-registry pgregistry)
options (when sentry (or raven-options {}))
options (when sentry (or sentry-options {}))
prometheus-server (when prometheus
(let [tls (:tls prometheus)
opts (cond-> {:port (:port prometheus)}
Expand All @@ -410,12 +410,12 @@

(when-not prevent-capture?
(with-uncaught e
(capture! (assoc this :raven-options options) e)))
(capture! (assoc this :sentry-options options) e)))
(cond-> (assoc this
:registry reg
:reporters reps
:rclient rclient
:raven-options options
:sentry-options options
:started? true)
prometheus (assoc :prometheus {:server prometheus-server
:registry prometheus-registry})
Expand Down Expand Up @@ -444,7 +444,7 @@
(rs/close! sentry))

(assoc this
:raven-options nil
:sentry-options nil
:reporters nil
:registry nil
:rclient nil
Expand Down Expand Up @@ -523,7 +523,7 @@
(capture! [this e]
(capture! this e {}))
(capture! [_this e tags]
(rs/send-event! (:dsn sentry) raven-options e tags))
(rs/send-event! (:dsn sentry) sentry-options e tags))
RiemannSink
(send! [_this ev]
(when rclient
Expand Down

0 comments on commit ff34689

Please sign in to comment.