Commit graph

100 commits

Author SHA1 Message Date
Peter Taoussanis
ebe8a957f5 [new] Add experimental :thread key to Clj signals
Only downside/hesitation is that this info *must* be collected at the callsite,
which means that it affects the performance of *all* created signals.

Adds ~30-50 nsecs per signal.
2024-05-05 13:58:16 +02:00
Peter Taoussanis
839143167b [mod] Simplify middleware - don't auto compose
Previously:

  It was possible to provide a vector of middleware fns when creating
  signals or adding handlers, e.g.:

    (event! ::ev-id1 {:middleware [fn1 fn2 ...]}),
    (add-handler! ::handler-id1 <handler-fn> {:middleware [fn1 fn2 ...]})

After this commit:

  Middleware is always expected to be a single fn, or nil.
  A `comp-middleware` util has been added to make it easy to compose multiple
  middleware fns into one.

Motivation:

  The previous (auto-composition) behaviour was nice when adding handlers,
  but incurred a (small but non-trivial) runtime cost when creating signals.

  The actual benefit (convenience) of auto-composition is very small, so
  I've decided to just remove this feature and add the `comp-middleware` util.

  Note that I ruled out the option of doing auto-comp only when adding handlers
  since that've meant an inconsistency and so complexity for little benefit.
2024-05-05 13:58:16 +02:00
Peter Taoussanis
63f488082b [nop] Housekeeping 2024-05-05 13:58:16 +02:00
Peter Taoussanis
378465b373 [nop] Disable AOT tests
These seem to cause intermittent issues with GitHub actions. Seems like GHA might
be caching builds somehow, even when a caching action isn't present?

Can't reproduce locally, and haven't had an opportunity yet to identify or fix the
underlying cause, so just disabling these for now.
2024-05-02 09:39:48 +02:00
Peter Taoussanis
a47d2db99e v1.0.0-beta5 (2024-04-29) 2024-04-29 12:16:54 +02:00
Peter Taoussanis
12f4b35d71 [doc] Documentation improvements 2024-04-29 12:15:19 +02:00
Peter Taoussanis
c4d9dd09a3 [mod] Don't include user-level kvs in default signal content handler 2024-04-29 12:15:19 +02:00
Peter Taoussanis
2ba23ee7f7 [new] Add postal (email) handler 2024-04-29 12:15:19 +02:00
Peter Taoussanis
1d4cdb8a3c [nop] Misc housekeeping 2024-04-29 12:15:19 +02:00
Peter Taoussanis
b937631a23 v1.0.0-beta3 (2024-04-24) 2024-04-24 13:30:45 +02:00
Peter Taoussanis
e222297a2b [fix] SLF4J broken timestamps, add tests
Thanks to @AdamFrey for reporting this issue!
Ref. <https://clojurians.slack.com/archives/C06ALA6EEUA/p1713900525964169?thread_ts=1713805333.272469&cid=C06ALA6EEUA>
2024-04-24 13:22:31 +02:00
Peter Taoussanis
d04f6d8e5b [nop] Misc housekeeping 2024-04-24 13:22:31 +02:00
Peter Taoussanis
6d545dfcef [mod] Move (simplify) OpenTelemetry ns
Now that there's need for users to interact with the OpenTelemetry ns directly,
a shorter ns name is preferable.
2024-04-24 13:22:31 +02:00
Peter Taoussanis
d0a15bac6b [mod] Don't auto add OpenTelemetry handler
Adding this manually is easy, and it's probably better to ask users
to do this explicitly since auto config won't always be successful.
2024-04-24 13:22:31 +02:00
Peter Taoussanis
d3c63e17a9 [mod] Rename clojure.tools.logging sys val
The change avoids any chars that could cause a problem, e.g. for
classpath resource names.
2024-04-24 13:22:31 +02:00
Peter Taoussanis
ffea1a30ed [fix] Fix broken AOT support, add AOT tests
Thanks to @AdamFrey for reporting this issue!
Ref. <https://clojurians.slack.com/archives/C06ALA6EEUA/p1713805333272469>

Previously:

  Attempting to run AOT'd code using Telemere would result in errors like:
  "Attempting to call unbound fn: #'taoensso.telemere.handlers.open-telemetry/handler:open-telemetry-logger"

The approach I was using of conditionally requiring namespaces and then aliasing vars seems to be inherently
fragile under AOT, and was leading to the remote source var being unbound.

With this commit I've now switched to a simpler approach - where we conditionally require namespaces *without*
the need for any aliasing.
2024-04-24 13:22:30 +02:00
Peter Taoussanis
b98e492071 [fix] Bad default OpenTelemetry handler constructor call 2024-04-24 12:41:56 +02:00
Peter Taoussanis
2597106d6b [nop] Bump deps 2024-04-24 12:41:50 +02:00
Peter Taoussanis
10fcf20958 v1.0.0-beta1 (2024-04-19) 2024-04-19 13:04:47 +02:00
Peter Taoussanis
5484f13481 [doc] Documentation work 2024-04-19 12:41:11 +02:00
Peter Taoussanis
2bf8e1c5bd [mod] Rename clojure.tools.logging sys val
Better to avoid characters that could cause trouble
2024-04-18 12:05:32 +02:00
Peter Taoussanis
a00291085e [nop] Misc housekeeping 2024-04-18 12:05:32 +02:00
Peter Taoussanis
79dff8918e v1.0.0-alpha6 (2024-04-17) 2024-04-17 15:51:24 +02:00
Peter Taoussanis
ee8505933c [doc] Documentation work 2024-04-17 15:51:24 +02:00
Peter Taoussanis
356a7f97b6 [new] Aliad error-signal? in main ns 2024-04-17 15:51:24 +02:00
Peter Taoussanis
6fcec0a0ae [new] Expand Timbre shim 2024-04-17 15:51:24 +02:00
Peter Taoussanis
7f16266699 [new] Incl. sig filter system val info in internal docs 2024-04-17 15:51:24 +02:00
Peter Taoussanis
5690bfe11a [mod] Rename "interop" -> "intake" 2024-04-17 15:51:24 +02:00
Peter Taoussanis
e84ef6ba35 [doc] Update images 2024-04-17 11:00:27 +02:00
Peter Taoussanis
536f5edf10 [nop] Misc housekeeping 2024-04-17 11:00:27 +02:00
Peter Taoussanis
c0ff55ab0c v1.0.0-alpha5 (2024-04-12) 2024-04-12 17:51:28 +02:00
Peter Taoussanis
39e16cfb3d [doc] Additional README info 2024-04-12 17:50:06 +02:00
Peter Taoussanis
614e2a2b03 [new] Additional examples 2024-04-12 17:50:06 +02:00
Peter Taoussanis
46a468d329 [doc] Expand, polish documentation 2024-04-12 17:50:06 +02:00
Peter Taoussanis
f5f5daeb29 [nop] Update, relocate imgs 2024-04-12 17:50:06 +02:00
Peter Taoussanis
37b400ff18 [new] Prevent common signal opts errors 2024-04-12 17:50:06 +02:00
Peter Taoussanis
3d66cad4e6 [mod] Change default min-level: nil->:info 2024-04-12 17:49:55 +02:00
Peter Taoussanis
65e1c68ea7 [new] Document env config for tools-logging->telemere! 2024-04-12 16:54:13 +02:00
Peter Taoussanis
1b41bf2336 [mod] Rename OpenTelemetry handler option: :extra-attrs-key -> :attrs-key 2024-04-12 16:54:13 +02:00
Peter Taoussanis
5f98e7304f [mod] Rename signal field: :extra-kvs -> :kvs 2024-04-12 16:54:13 +02:00
Peter Taoussanis
b56f7c4908 [nop] Misc housekeeping 2024-04-12 16:54:13 +02:00
Peter Taoussanis
847781e1e8 v1.0.0-alpha4 (2024-04-10) 2024-04-10 18:42:09 +02:00
Peter Taoussanis
be4644220c [new] Add basic OpenTelemetry handler 2024-04-10 18:40:33 +02:00
Peter Taoussanis
2abb9de61b [nop] Collect handler namespaces 2024-04-10 18:40:33 +02:00
Peter Taoussanis
99402b07cd [mod] Rename timbre-shim ns -> timbre 2024-04-10 18:40:33 +02:00
Peter Taoussanis
8d815a101c [doc] README tweaks 2024-04-10 18:40:33 +02:00
Peter Taoussanis
0c3f685734 [nop] Misc housekeeping 2024-04-10 18:40:33 +02:00
Peter Taoussanis
23492530b6 [nop] Bump deps 2024-04-10 18:40:33 +02:00
Peter Taoussanis
066afe7cec [mod] Drop Clojure v1.9 testing 2024-04-09 19:32:22 +02:00
Peter Taoussanis
803b4a3017 v1.0.0-alpha3 (2024-04-05) 2024-04-05 18:24:11 +02:00