Commit graph

68 commits

Author SHA1 Message Date
Peter Taoussanis
8a3ae14f45 [fix] Correctly handle nil :run opt
Before commit: {:run nil} didn't    register  as a tracing signal
After  commit: {:run nil} correctly registers as a tracing signal with `nil` form

nil forms aren't typically useful or used, but can come up by accident
so it's important to handle these correctly.

The `trace!` docstring also promises that the return value will always be
equal to the given input. This didn't hold before.
2025-12-04 11:22:52 +01:00
Peter Taoussanis
917b1b408e [doc] Clarify that signal content is lazy 2025-12-04 11:22:52 +01:00
Peter Taoussanis
125e006753 [nop] Housekeeping 2025-12-04 11:22:52 +01:00
Peter Taoussanis
c6a71652d7 v1.2.0-SNAPSHOT 2025-12-04 11:22:52 +01:00
Peter Taoussanis
4cc4f45e7c v1.1.0 (2025-08-22) 2025-08-22 10:35:05 +02:00
Peter Taoussanis
eb28d365a8 [fix] truss/ex-info format 2025-08-22 10:25:47 +02:00
Peter Taoussanis
d9ad1ba379 [nop] Bump deps 2025-08-22 10:25:47 +02:00
Peter Taoussanis
b2a8b66cc0 [fix] :trace level JS console logging
Some checks are pending
Clj tests / tests (21, ubuntu-latest) (push) Waiting to run
Clj tests / tests (17, ubuntu-latest) (push) Waiting to run
Clj tests / tests (19, ubuntu-latest) (push) Waiting to run
Cljs tests / tests (21, ubuntu-latest) (push) Waiting to run
Graal tests / tests (17, macOS-latest) (push) Waiting to run
Graal tests / tests (17, ubuntu-latest) (push) Waiting to run
Graal tests / tests (17, windows-latest) (push) Waiting to run
`js/console.trace` was being misused here and is actually intended
for stacktrace printing, NOT trace-level output.
2025-08-21 12:40:39 +02:00
Peter Taoussanis
1bcd46adf3 [doc] Misc housekeeping
Some checks failed
Clj tests / tests (17, ubuntu-latest) (push) Has been cancelled
Clj tests / tests (19, ubuntu-latest) (push) Has been cancelled
Clj tests / tests (21, ubuntu-latest) (push) Has been cancelled
Cljs tests / tests (21, ubuntu-latest) (push) Has been cancelled
Graal tests / tests (17, macOS-latest) (push) Has been cancelled
Graal tests / tests (17, ubuntu-latest) (push) Has been cancelled
Graal tests / tests (17, windows-latest) (push) Has been cancelled
2025-06-23 13:10:02 +02:00
Peter Taoussanis
b7b3a25a82 [doc] Updates for Trove, simplify examples 2025-06-20 10:53:06 +02:00
Peter Taoussanis
dcfeba5b91 [new] Add :kvs signal option 2025-06-18 23:17:45 +02:00
Peter Taoussanis
269c58d8fe [fix] Clj-kondo warnings for with-signal/s
Some checks failed
Graal tests / test (17, macOS-latest) (push) Has been cancelled
Graal tests / test (17, ubuntu-latest) (push) Has been cancelled
Graal tests / test (17, windows-latest) (push) Has been cancelled
Main tests / tests (17, ubuntu-latest) (push) Has been cancelled
Main tests / tests (19, ubuntu-latest) (push) Has been cancelled
Main tests / tests (21, ubuntu-latest) (push) Has been cancelled
2025-06-09 08:40:15 +02:00
Peter Taoussanis
7603ae2fcf [mod] Tweak format-error spacing
Some checks failed
Graal tests / test (17, macOS-latest) (push) Has been cancelled
Graal tests / test (17, ubuntu-latest) (push) Has been cancelled
Graal tests / test (17, windows-latest) (push) Has been cancelled
Main tests / tests (17, ubuntu-latest) (push) Has been cancelled
Main tests / tests (19, ubuntu-latest) (push) Has been cancelled
Main tests / tests (21, ubuntu-latest) (push) Has been cancelled
2025-05-30 16:28:47 +02:00
Peter Taoussanis
6fb18bd3b9 v1.0.1 (2025-05-27)
Some checks failed
Graal tests / test (17, macOS-latest) (push) Has been cancelled
Graal tests / test (17, ubuntu-latest) (push) Has been cancelled
Graal tests / test (17, windows-latest) (push) Has been cancelled
Main tests / tests (17, ubuntu-latest) (push) Has been cancelled
Main tests / tests (19, ubuntu-latest) (push) Has been cancelled
Main tests / tests (21, ubuntu-latest) (push) Has been cancelled
2025-05-27 09:03:22 +02:00
Peter Taoussanis
d6264afe7c [nop] Bump deps 2025-05-27 08:59:58 +02:00
Peter Taoussanis
f08b60bce4 [fix] [#65] Fix broken callsite :limit option 2025-05-27 08:59:58 +02:00
Peter Taoussanis
3746de8039 [fix] Fix bad signal-content-fn parent formatting 2025-05-27 08:59:58 +02:00
Peter Taoussanis
1bdb667b6c [doc] Add extra docs re: debugging filtering 2025-05-27 08:59:58 +02:00
Mark Sto
2e0a2938b7 [doc] [#64] Hide some unimportant vars from API docs (@marksto)
Motivation:

  These vars aren't used often, are are supplementary rather than
  a key part of Telemere's API.

  Having them listed in the API docs adds to the noise there and makes
  the API seem more overwhelming than necessary.
2025-05-27 08:59:19 +02:00
Peter Taoussanis
475e5ba6c2 v1.0.0 (2025-04-30) 2025-04-30 16:34:22 +02:00
Peter Taoussanis
51e8a1062f [fix] [#61] OpenTelemetry handler not cancelling timer on shutdown 2025-04-30 14:50:40 +02:00
Peter Taoussanis
31a4fc26d2 [new] Support :host, :thread override 2025-04-30 14:50:40 +02:00
Peter Taoussanis
94fec57c9e [doc] Use consistent style for docstring opts 2025-04-30 14:50:40 +02:00
Peter Taoussanis
345b125f6b [new] Add callsite info to compile-time errors 2025-04-30 14:50:40 +02:00
Peter Taoussanis
248e91f982 [nop] Misc improvements 2025-04-30 14:50:40 +02:00
Peter Taoussanis
32e8909e42 [nop] Move docstring resources 2025-04-30 14:50:40 +02:00
Peter Taoussanis
e8f02ac13e [nop] Use pr-edn* for Signal strings 2025-04-30 14:50:40 +02:00
Peter Taoussanis
254cd6471b [fix] [#32] Fix clj-kondo declaration typo (@icp1994) 2025-04-30 14:50:40 +02:00
Peter Taoussanis
c2e7d0c2d6 [nop] Bump deps 2025-04-30 14:50:40 +02:00
Peter Taoussanis
0608d43d44 v1.0.0-RC5 (2025-03-10) 2025-03-10 13:38:49 +01:00
Peter Taoussanis
f37f54e1da [mod] Rename "rate-limit" -> "limit"
Users caught by this change should receive a clear compile-time error.

Apologies for the nuissance!! This change is part of a final review
of names before the release of v1 final.
2025-03-10 13:02:57 +01:00
Peter Taoussanis
1f4b49a21a [mod] Rename "sample-rate" -> "sample"
Users caught by this change should receive a clear compile-time error.

Apologies for the nuissance!! This change is part of a final review
of names before the release of v1 final.
2025-03-10 13:02:57 +01:00
Peter Taoussanis
7cccf672f5 [mod] Rename "middleware" -> "transform" (xfn)
Users caught by this change should receive a clear compile-time error.

Apologies for the nuissance!! This change is part of a final review
of names before the release of v1 final.

Motivations:

  - "xfn" is a lot shorter than "middleware", making it more
    convenient to use at signal calls, compare:

    (log! {:middleware my-fn} "msg")
    (log! {:xfn my-fn} "msg"}

  - "middleware" was originally chosen to match Timbre's terminology,
    but actually carries some misleading connotations that in hindsight
    are probably better avoided while we still have the chance to change
    this.
2025-03-10 13:02:57 +01:00
Peter Taoussanis
c78eb07385 [mod] [#56] utils/clean-signal-fn exclude :schema by default
It's probably more common for users to NOT want the `:schema` key
to be included, so let's make that the default.
2025-03-10 13:02:57 +01:00
Peter Taoussanis
82f4c31651 [new] [#57] File handling: make file stream more robust
1. Check `.canWrite` rather than just `.exists`
2. Recreate file and/or dir/s if needed any time
   file stream is recreated.
2025-03-10 13:02:57 +01:00
Peter Taoussanis
af45ffc396 [fix] [#57] File handling: use nio API to create missing parent dirs
Skimming the docs, it seems that the nio API might be better able to
create dirs for edge cases like symbolic links, etc.?
2025-03-10 13:02:57 +01:00
Peter Taoussanis
c60f33edeb [fix] [#32] Fix clj-kondo warnings
Note also related Encore-side PR:
https://github.com/taoensso/encore/pull/84
2025-03-10 13:02:57 +01:00
Peter Taoussanis
bb3d351be8 [nop] Bump deps 2025-03-10 13:02:57 +01:00
Peter Taoussanis
2510c5dbb9 v1.0.0-SNAPSHOT 2025-03-10 13:02:57 +01:00
Peter Taoussanis
9ba4bd986d v1.0.0-RC4 (2025-03-03) 2025-03-03 16:52:44 +01:00
Peter Taoussanis
b03b06de6a [nop] Housekeeping 2025-03-03 16:52:44 +01:00
Peter Taoussanis
6b0e0b9fff [doc] Mention :inst monotonicity 2025-03-03 11:31:52 +01:00
Peter Taoussanis
bfea51570f [new] Alias keep-callsite, mention in signal! docs 2025-03-03 11:30:10 +01:00
Peter Taoussanis
ac5feb4723 [mod] [#53] Breaking: change return value of log!, event!
This change will only affect rare advanced users that depend on
the return value of `log!` or `event!`. For all other users this
will be a non-breaking change.

Before this commit:
  `log!` and `event!` returned true iff signal was allowed.

After this commit:
  `log!`  and `event!` now ALWAYS return nil.
  `log!?` and `event!?` have been added that keep the old behaviour.

Motivation:
  It's pretty rare to use the return value when generating log or event
  signals. I originally included the return value since it CAN be handy,
  and I figured it could just be ignored by those that don't need it.

  But #53 showed that there's a downside I hadn't anticipated - some
  users may actually depend on / prefer a nil return to prevent
  accidentally affecting program flow.

  I think that's a legitimate enough concern to still make a change now
  before v1 final.

  Apologies for the nuissance!
2025-03-03 11:19:36 +01:00
Peter Taoussanis
e32ed8deb5 [new] Add base-opts arg to impl signal creator 2025-03-03 11:01:39 +01:00
Peter Taoussanis
46e82f0816 [nop] Callsite housekeeping 2025-03-03 11:01:39 +01:00
Peter Taoussanis
ea20f6836b [nop] Un-alias public signal-allowed?, signal! macros 2025-03-03 11:01:39 +01:00
Peter Taoussanis
634cc53405 [mod] [#52] signal-preamble-fn should ignore nil :kind (@marksto)
Before this commit: A nil signal `:kind` renders as "DEFAULT".
After  this commit: A nil signal `:kind` isn't rendered at all.

The previous behaviour wasn't particularly useful, and as Mark
helpfully pointed out - makes it difficult to skip `:kind` rendering.

The new behaviour also better matches the behaviour for other signal
keys, which can mostly be dissoc'ed to skip rendering.
2025-03-03 11:01:39 +01:00
Peter Taoussanis
410ed8914c [fix] [#52] signal-preamble-fn should use host info in signal (@marksto) 2025-03-03 11:01:39 +01:00
Peter Taoussanis
78ed4d7f14 [mod] [#51] Make default console handler synchronous by default
This might be less surprising for beginners and new users, so
should probably be the default.
2025-03-03 11:01:39 +01:00