Skip to content

Commit

Permalink
some links add.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur Aliiev authored and Arthur Aliiev committed Mar 7, 2024
1 parent 04708e0 commit fa85dfe
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/spootnik/reporter/impl.clj
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,11 @@
(defn parse-pggrouping-keys [grouping-keys]
(into {} (for [[k v] grouping-keys] [(csk/->snake_case_string k) v])))

;; "sentry" is a configuration map sent to sentry.io on initialisation
;; https://github.com/getsentry/sentry-clj/tree/master?tab=readme-ov-file#additional-initialisation-options
(defrecord Reporter [rclient raven-options reporters registry sentry metrics riemann prevent-capture? prometheus
;; Reporter configuration specs:
;; https://github.com/exoscale/reporter/blob/master/src/spootnik/reporter/specs.clj

(defrecord Reporter [rclient raven-options reporters registry sentry
metrics riemann prevent-capture? prometheus
started? pushgateway]
c/Lifecycle
(start [this]
Expand Down
16 changes: 14 additions & 2 deletions src/spootnik/reporter/sentry.clj
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@
:query-string (-> payload :query-string)
:headers (-> payload :headers)})

(defn e->sentry-event [e options tags]
(defn e->sentry-event
"
Supported event keys:
https://github.com/getsentry/sentry-clj/tree/master?tab=readme-ov-file#supported-event-keys
"

[e options tags]
(let [{:keys [message extra throwable]} e
message (or message (ex-message e))
user (some-> extra :org/uuid str)
Expand Down Expand Up @@ -92,7 +98,13 @@

(swap! http-requests-payload-stub conj event))))

(defn init! [{:keys [dsn] :as sentry}]
(defn init!
"
Additional options can be found here:
https://github.com/getsentry/sentry-clj/tree/master?tab=readme-ov-file#additional-initialisation-options
"

[{:keys [dsn] :as sentry}]
(if-not (in-memory? dsn)
(sentry-io/init! dsn sentry)
(reset! http-requests-payload-stub [])))
Expand Down

0 comments on commit fa85dfe

Please sign in to comment.