2024-03-28 12:18:00 +00:00
|
|
|
Signals are initially maps with {:keys [inst id ns level data msg_ ...]},
|
2024-03-11 08:49:56 +00:00
|
|
|
though they can be modified by call and/or handler middleware.
|
|
|
|
|
|
|
|
|
|
Default keys:
|
|
|
|
|
|
2024-03-28 12:18:00 +00:00
|
|
|
`:schema` - Int version of signal schema (current: 1)
|
|
|
|
|
`:inst` - Platform instant [1] when signal was created
|
|
|
|
|
`:level` - Signal level ∈ #{<int> :trace :debug :info :warn :error :fatal :report ...}
|
|
|
|
|
`:kind` - Signal ?kind ∈ #{nil :event :error :log :trace :spy <user-val> ...}
|
|
|
|
|
`:id` - ?id of signal call (common to all signals created by signal call, contrast with `:uid`)
|
|
|
|
|
`:uid` - ?id of signal instance (unique to each signal created by signal call, contrast with `:id`)
|
2024-03-11 08:49:56 +00:00
|
|
|
|
|
|
|
|
`:msg` - Arb user-level message ?str given to signal call
|
2024-03-14 10:18:29 +00:00
|
|
|
`:data` - Arb user-level data ?val (usu. a map) given to signal call
|
2024-03-11 08:49:56 +00:00
|
|
|
`:error` - Arb user-level platform ?error [2] given to signal call
|
|
|
|
|
|
2024-03-28 12:18:00 +00:00
|
|
|
`:run-form` - Unevaluated ?form given to signal call as `:run`
|
|
|
|
|
`:run-val` - Successful return ?val of `:run` ?form
|
|
|
|
|
`:run-nsecs`- ?int nanosecs runtime of `:run` ?form
|
|
|
|
|
`:end-inst` - Platform ?instant [1] when `:run` ?form completed
|
2024-03-11 08:49:56 +00:00
|
|
|
|
|
|
|
|
`:ctx` - ?val of `*ctx*` (arb user-level state) when signal was created
|
|
|
|
|
`:parent` - ?{:keys [id uid]} of parent signal, present in nested signals when tracing
|
|
|
|
|
`:location` - ?{:keys [ns file line column]} signal call location
|
|
|
|
|
`:ns` - ?str namespace of signal call, same as (:ns location)
|
|
|
|
|
`:line` - ?int line of signal call, same as (:line location)
|
|
|
|
|
`:column` - ?int column of signal call, same as (:column location)
|
2024-03-14 10:18:29 +00:00
|
|
|
`:file` - ?str filename of signal call, same as (:file location)
|
2024-03-11 08:49:56 +00:00
|
|
|
|
|
|
|
|
`:sample-rate` - ?rate ∈ℝ[0,1] for combined call AND handler sampling (0.75 => allow 75% of signals, nil => allow all)
|
|
|
|
|
|
2024-04-10 17:34:22 +00:00
|
|
|
<kvs> - Arb other user-level ?kvs given to signal call
|
2024-03-14 10:18:29 +00:00
|
|
|
|
2024-03-11 08:49:56 +00:00
|
|
|
If anything is unclear, please ping me (@ptaoussanis) so that I can improve these docs!
|
|
|
|
|
|
2024-03-28 12:18:00 +00:00
|
|
|
[1] `java.time.Instant` or `js/Date`
|
|
|
|
|
[2] `java.lang.Throwable` or `js/Error`
|