mirror of
https://github.com/taoensso/telemere.git
synced 2025-12-18 02:01:11 +00:00
[new] Add :kvs signal option
Some checks are pending
Graal tests / test (17, macOS-latest) (push) Waiting to run
Graal tests / test (17, ubuntu-latest) (push) Waiting to run
Graal tests / test (17, windows-latest) (push) Waiting to run
Main tests / tests (17, ubuntu-latest) (push) Waiting to run
Main tests / tests (19, ubuntu-latest) (push) Waiting to run
Main tests / tests (21, ubuntu-latest) (push) Waiting to run
Some checks are pending
Graal tests / test (17, macOS-latest) (push) Waiting to run
Graal tests / test (17, ubuntu-latest) (push) Waiting to run
Graal tests / test (17, windows-latest) (push) Waiting to run
Main tests / tests (17, ubuntu-latest) (push) Waiting to run
Main tests / tests (19, ubuntu-latest) (push) Waiting to run
Main tests / tests (21, ubuntu-latest) (push) Waiting to run
This commit is contained in:
parent
9d655bb9ce
commit
dd22c7602b
1 changed files with 22 additions and 15 deletions
|
|
@ -391,7 +391,7 @@
|
||||||
:signal! ; opts => allowed? / run result (value or throw)
|
:signal! ; opts => allowed? / run result (value or throw)
|
||||||
'( [& opts-kvs]
|
'( [& opts-kvs]
|
||||||
[{:as opts-map :keys
|
[{:as opts-map :keys
|
||||||
[elidable? coords inst uid xfn xfn+,
|
[elidable? coords inst uid xfn xfn+ kvs+,
|
||||||
sample kind ns id level when limit limit-by,
|
sample kind ns id level when limit limit-by,
|
||||||
ctx ctx+ parent root trace?, do let data msg error run & kvs]}])
|
ctx ctx+ parent root trace?, do let data msg error run & kvs]}])
|
||||||
|
|
||||||
|
|
@ -399,7 +399,7 @@
|
||||||
'([opts-or-msg]
|
'([opts-or-msg]
|
||||||
[level msg]
|
[level msg]
|
||||||
[{:as opts-map :keys
|
[{:as opts-map :keys
|
||||||
[elidable? coords inst uid xfn xfn+,
|
[elidable? coords inst uid xfn xfn+ kvs+,
|
||||||
sample kind ns id level when limit limit-by,
|
sample kind ns id level when limit limit-by,
|
||||||
ctx ctx+ parent root trace?, do let data msg error #_run & kvs]}
|
ctx ctx+ parent root trace?, do let data msg error #_run & kvs]}
|
||||||
msg])
|
msg])
|
||||||
|
|
@ -409,7 +409,7 @@
|
||||||
[id level]
|
[id level]
|
||||||
[id
|
[id
|
||||||
{:as opts-map :keys
|
{:as opts-map :keys
|
||||||
[elidable? coords inst uid xfn xfn+,
|
[elidable? coords inst uid xfn xfn+ kvs+,
|
||||||
sample kind ns id level when limit limit-by,
|
sample kind ns id level when limit limit-by,
|
||||||
ctx ctx+ parent root trace?, do let data msg error #_run & kvs]}])
|
ctx ctx+ parent root trace?, do let data msg error #_run & kvs]}])
|
||||||
|
|
||||||
|
|
@ -417,7 +417,7 @@
|
||||||
'([opts-or-run]
|
'([opts-or-run]
|
||||||
[id run]
|
[id run]
|
||||||
[{:as opts-map :keys
|
[{:as opts-map :keys
|
||||||
[elidable? coords inst uid xfn xfn+,
|
[elidable? coords inst uid xfn xfn+ kvs+,
|
||||||
sample kind ns id level when limit limit-by,
|
sample kind ns id level when limit limit-by,
|
||||||
ctx ctx+ parent root trace?, do let data msg error run & kvs]}
|
ctx ctx+ parent root trace?, do let data msg error run & kvs]}
|
||||||
run])
|
run])
|
||||||
|
|
@ -426,7 +426,7 @@
|
||||||
'([opts-or-run]
|
'([opts-or-run]
|
||||||
[level run]
|
[level run]
|
||||||
[{:as opts-map :keys
|
[{:as opts-map :keys
|
||||||
[elidable? coords inst uid xfn xfn+,
|
[elidable? coords inst uid xfn xfn+ kvs+,
|
||||||
sample kind ns id level when limit limit-by,
|
sample kind ns id level when limit limit-by,
|
||||||
ctx ctx+ parent root trace?, do let data msg error run & kvs]}
|
ctx ctx+ parent root trace?, do let data msg error run & kvs]}
|
||||||
run])
|
run])
|
||||||
|
|
@ -435,7 +435,7 @@
|
||||||
'([opts-or-error]
|
'([opts-or-error]
|
||||||
[id error]
|
[id error]
|
||||||
[{:as opts-map :keys
|
[{:as opts-map :keys
|
||||||
[elidable? coords inst uid xfn xfn+,
|
[elidable? coords inst uid xfn xfn+ kvs+,
|
||||||
sample kind ns id level when limit limit-by,
|
sample kind ns id level when limit limit-by,
|
||||||
ctx ctx+ parent root trace?, do let data msg error #_run & kvs]}
|
ctx ctx+ parent root trace?, do let data msg error #_run & kvs]}
|
||||||
error])
|
error])
|
||||||
|
|
@ -445,7 +445,7 @@
|
||||||
[id run]
|
[id run]
|
||||||
[{:as opts-map :keys
|
[{:as opts-map :keys
|
||||||
[catch-val,
|
[catch-val,
|
||||||
elidable? coords inst uid xfn xfn+,
|
elidable? coords inst uid xfn xfn+ kvs+,
|
||||||
sample kind ns id level when limit limit-by,
|
sample kind ns id level when limit limit-by,
|
||||||
ctx ctx+ parent root trace?, do let data msg error #_run & kvs]}
|
ctx ctx+ parent root trace?, do let data msg error #_run & kvs]}
|
||||||
run])
|
run])
|
||||||
|
|
@ -454,7 +454,7 @@
|
||||||
'([]
|
'([]
|
||||||
[opts-or-id]
|
[opts-or-id]
|
||||||
[{:as opts-map :keys
|
[{:as opts-map :keys
|
||||||
[elidable? coords inst uid xfn xfn+,
|
[elidable? coords inst uid xfn xfn+ kvs+,
|
||||||
sample kind ns id level when limit limit-by,
|
sample kind ns id level when limit limit-by,
|
||||||
ctx ctx+ parent root trace?, do let data msg error #_run & kvs]}])
|
ctx ctx+ parent root trace?, do let data msg error #_run & kvs]}])
|
||||||
|
|
||||||
|
|
@ -602,13 +602,20 @@
|
||||||
(get opts :xfn `taoensso.telemere/*xfn*))
|
(get opts :xfn `taoensso.telemere/*xfn*))
|
||||||
|
|
||||||
kvs-form
|
kvs-form
|
||||||
(not-empty
|
(let [base
|
||||||
(dissoc opts
|
(not-empty
|
||||||
:elidable? :coords :inst :uid :xfn :xfn+,
|
(dissoc opts
|
||||||
:sample :ns :kind :id :level :filter :when #_:limit #_:limit-by,
|
:elidable? :coords :inst :uid :xfn :xfn+ :kvs+,
|
||||||
:ctx :ctx+ :parent #_:trace?, :do :let :data :msg :error,
|
:sample :ns :kind :id :level :filter :when #_:limit #_:limit-by,
|
||||||
:run :run-form :run-val, :elide? :allow? #_:callsite-id,
|
:ctx :ctx+ :parent #_:trace?, :do :let :data :msg :error,
|
||||||
:host :thread :otel/context))
|
:run :run-form :run-val, :elide? :allow? #_:callsite-id,
|
||||||
|
:host :thread :otel/context))]
|
||||||
|
|
||||||
|
(if-let [kvs+ (get opts :kvs+)] ; Undocumented
|
||||||
|
(if base
|
||||||
|
`(not-empty (conj ~base ~kvs+))
|
||||||
|
`(not-empty ~kvs+))
|
||||||
|
base))
|
||||||
|
|
||||||
_ ; Compile-time validation
|
_ ; Compile-time validation
|
||||||
(do
|
(do
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue