In Raven 1.7.0 capture is:
|
(defn capture |
|
"Send a message to a Sentry server. |
|
event-info is a map that should contain a :message key and optional |
|
keys found at https://docs.getsentry.com/hosted/clientdev/#building-the-json-packet" |
|
[dsn event-info] |
|
(send-packet |
|
(merge (parse-dsn dsn) |
|
{:level "error" |
|
:platform "clojure" |
|
:server_name (.getHostName (InetAddress/getLocalHost)) |
|
:ts (.getTime (Date.))} |
|
event-info |
|
{:event_id (generate-uuid)}))) |
Raven always overrides event_id. Thus retrying capture (e.g. in case of network errors) would create additional events, making capture not idempotent.
It would we nice if the event_id could be passed in by the caller, so the caller could safely retry capture in case of e.g. network errors.
In Raven 1.7.0
captureis:raven-clj/src/raven_clj/core.clj
Lines 61 to 73 in 6a5fada
Raven always overrides
event_id. Thus retryingcapture(e.g. in case of network errors) would create additional events, makingcapturenot idempotent.It would we nice if the
event_idcould be passed in by the caller, so the caller could safely retrycapturein case of e.g. network errors.