Commit graph

285 commits

Author SHA1 Message Date
Vladimir Pouzanov
750b2d43c9 Add support for otel span kind 2025-01-03 14:55:25 +00:00
lvh
db0498b22c [doc] [#43] Note that ns filters work for SLF4J logger names (@lvh) 2024-12-31 16:16:36 +01:00
Peter Taoussanis
0e642ba21f [fix] Timbre shim: don't attach empty :vargs data 2024-12-31 12:28:22 +01:00
Peter Taoussanis
1517f30abf [doc] [#42] Timbre shim: document different spy error handling 2024-12-31 12:28:22 +01:00
Peter Taoussanis
3a9ffc6206 [fix] [#42] Timbre shim: rename spy! -> spy (@lvh) 2024-12-31 12:17:43 +01:00
Peter Taoussanis
8c7caf45fa v1.0.0-SNAPSHOT 2024-12-31 09:46:02 +01:00
Peter Taoussanis
17dcde97aa v1.0.0-RC2 (2024-12-24) 2024-12-24 11:19:33 +01:00
Peter Taoussanis
a04f255146 [new] Add & opts support to signal!, signal-allowed? 2024-12-24 10:35:11 +01:00
Peter Taoussanis
8cd4ca97e6 [doc] [#33] Add community examples link to Bling Gist 2024-12-24 10:35:07 +01:00
Peter Taoussanis
8412ac29f2 [nop] Tests: remove unnecessary submap pred 2024-12-23 23:04:40 +01:00
Peter Taoussanis
cb6a5d9e1b [mod] NB Change return value of experimental with-signals
The old (deeply-nested) return value seemed to be difficult
for users to read, and prone to mistakes when destructuring.

The new (map) return value is a little more verbose, but
more obvious and less error-prone. Overall a good trade-off
given that this util is anyway used mostly for debugging
or unit tests.
2024-12-23 23:04:40 +01:00
Peter Taoussanis
5c977a348b [doc] Better document pattern of using trace!/spy! with catch->error! 2024-12-23 23:04:40 +01:00
Peter Taoussanis
0de5c094e5 [mod] Remove advanced options from catch->error!
`catch->error!` with default opts is quite handy for use with `trace!`/`spy!`.

But there's a lot that users might want to customize, including:

  - Exactly what error type to catch.
  - Whether or not to rethrow on catch.
  - Error binding sym to enable use within signal message, data, etc.

We could support all of this via `catch->error!` opts but there's not much
point. If anyway customizing such behaviour, it'd be better for the user to just
use an appropriate `try/catch`.

So I've now documented this recommendation, and removed all but the most basic
(:catch-val) options.

This is a BREAKING change for anyone that was previously using any of the
following options:

  :rethrow?
  :catch-sym

Note that `:rethrow?` was never particularly helpful (independently of
`:catch-val` anyway), and the removal of `:catch-sym` will throw a compile-time
error for any existing users.
2024-12-23 23:04:40 +01:00
Peter Taoussanis
d2386d62f1 [new] Refactor impln of common signal creators
Objectives:

  - Support single map opts arg in all cases.

  - Make it easier for folks to inspect the source to understand how
    the common creators use/wrap underlying `signal!`.

Also updated relevant docstrings, etc.
2024-12-23 12:30:00 +01:00
Peter Taoussanis
ace6e2dd2c [new] Add timbre->telemere appender and update docs 2024-12-23 11:19:05 +01:00
Peter Taoussanis
d563ac1259 [new] Better error message when signal! given non-map arg 2024-12-22 13:58:03 +01:00
Peter Taoussanis
f522307ee0 [fix] Trace formatting: always include root info 2024-12-22 13:58:03 +01:00
Peter Taoussanis
68a894edab [fix] Trace formatting: properly format nil ids 2024-12-22 13:58:03 +01:00
Peter Taoussanis
d61f6c25e3 [mod] Remove "- " msg separator from default preamble output
Better to make this optional through the new `:format-msg-fn` option
available for `signal-preamble-fn`
2024-12-22 13:58:03 +01:00
Damiano Ruehl
0822217480 [new] [#34] Add new signal-preamble-fn opts (@Knotschi)
New opts:

  - `:format-id-fn`
  - `:format-msg-fn`

This way its easier to reuse signal-preamble-fn for custom handlers.
If nil is passed as any format fn: value won't be logged.
The `-` char before the msg is now part of the formatter fn.
2024-12-22 13:58:03 +01:00
Peter Taoussanis
9dc9a4645b [new] Alias low-level formatters in utils ns 2024-12-22 13:58:03 +01:00
Peter Taoussanis
096c432eff [mod] [#39] Remove shell API 2024-12-22 13:58:03 +01:00
Peter Taoussanis
706a8b6d37 [mod] Postal handler now uses default preamble fn for email subject 2024-12-22 13:58:03 +01:00
Peter Taoussanis
55323f1f54 [mod] Default signal-content-fn: omit redundant parent/root id namespaces 2024-12-22 13:58:03 +01:00
Peter Taoussanis
b208532788 [mod] Default signal-content-fn: swap ctx, kvs position 2024-12-22 13:58:03 +01:00
Peter Taoussanis
0464285ce1 [mod] Default signal-content-fn: omit :root if it's same as parent 2024-12-22 13:58:03 +01:00
Peter Taoussanis
7eb46ff555 [nop] Misc housekeeping 2024-12-22 13:58:03 +01:00
Peter Taoussanis
cca8bb33ff [doc] Misc improvements 2024-12-22 13:58:03 +01:00
Peter Taoussanis
55720aca54 [doc] [#35] Emphasize that opts need to be a compile-time map 2024-12-22 13:58:03 +01:00
Peter Taoussanis
822032de13 [doc] Add FAQ item re: event! arg order 2024-12-22 13:50:01 +01:00
Peter Taoussanis
13d9dbfc62 [doc] Document that :msg may be a delay 2024-12-22 13:50:01 +01:00
Peter Taoussanis
484b3df122 [new] Improve error info on worst-case handler errors 2024-12-22 13:50:01 +01:00
Peter Taoussanis
7532c2eca5 [new] Give signal! a default kind and level 2024-12-22 13:49:53 +01:00
Peter Taoussanis
9dc883dce9 [new] Allow manual :run-val override
Useful for eliding noisy/long vals from tracing, etc.
2024-12-20 15:49:53 +01:00
Peter Taoussanis
d78663a528 [new] Omit empty :data, :ctx from signal content output 2024-12-20 15:49:53 +01:00
Peter Taoussanis
385c671756 [new] Add private format-location util 2024-12-20 15:49:53 +01:00
Peter Taoussanis
b58ec7359d [fix] [#36] Fix missing cljdoc docstrings
These remote declarations were unnecessary (vestigial), and seemed
to be causing issues with cljdoc's analysis.
2024-12-20 15:49:53 +01:00
Peter Taoussanis
8c701d4df5 [fix] Signal string representation 2024-12-20 14:38:40 +01:00
Peter Taoussanis
70ccfcfd80 [nop] Bump deps 2024-12-20 14:38:40 +01:00
Peter Taoussanis
69e8ed19b8 v1.0.0-RC1 (2024-10-29) 2024-10-29 10:48:41 +01:00
Peter Taoussanis
b5680c5cb7 [nop] Housekeeping 2024-10-29 10:11:13 +01:00
Peter Taoussanis
e1dcdc8257 [doc] Misc improvements 2024-10-29 10:02:13 +01:00
Peter Taoussanis
e60dde03eb [doc] Add community example for GCP (@xlfe) 2024-10-29 10:02:13 +01:00
Peter Taoussanis
5528102f80 [doc] Restructure community examples 2024-10-29 10:02:13 +01:00
Peter Taoussanis
280ad0823f [doc] Collapsible examples in README 2024-10-29 10:02:13 +01:00
Peter Taoussanis
4f5eda0489 [doc] Fix incorrect :msg_ key info 2024-10-29 10:02:13 +01:00
Peter Taoussanis
3d71b70503 [doc] [#27] Typo in link (@blnote) 2024-10-29 10:02:13 +01:00
Peter Taoussanis
2d8c528a6a [doc] [#25] Expand info on IoC tracing, etc. 2024-10-29 10:02:13 +01:00
Peter Taoussanis
c5c8a188c1 [doc] [#25] Add extra info re: async tracing 2024-10-29 10:02:13 +01:00
Peter Taoussanis
0ca48fa6a1 [doc] Misc improvements 2024-10-29 10:02:13 +01:00