Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mod] [BREAKING] NB completely refactor core
This is a major update, but mostly focused on internals. A few changes may be necessary when upgrading, sincere apologies! Detailed migration notes will be provided on final release. ** High-level motivation ** Tufte, Timbre, and a new upcoming library (Telemere) all share similar core functionality. Rather than implement that core 3 separate times, I'm aiming to unify them under a single shared core. This'll mean: - Less code to maintain. - Fewer opportunities for bugs. - A unified core feature set and API. - An quick+efficient way for core improvements to flow to all libraries as soon as improvements are ready. While undergoing this work, I took the opportunity to also generally simplify and polish Tufte's codebase. I plan to do the same for Timbre in future. ** Changes ** - All the `add-x-handler!` fns have been deprecated. - Likewise the `add-handler!` API has been updated for much improved flexibility. An `add-legacy-handler!` util has been added to help ease migration. - Removed vars: `*min-level*`, `*ns-filter*`, `may-profile?`. See the `filtering-help` var for more info. - `defnp` and `fnp` no longer add a `defn_`/`fn_` name prefix to pre-named fns. ** New ** - Added `filtering-help` var that describes the new filtering API. - Added `handlers-help` var that describes the new handlers API. - It's now possible to filter profiling by profiling id. - It's now possible to specify minimum levels by namespace. - `profiled` and `profile` now both support a number of new options: {:keys [id level sample rate-limit filter ...]}, see docstrings for details. - Handlers now all support a number of new options: {:keys [async sample rate-limit filter-fn ...]}, see docstrings for details. - Handler fns now support an optional shutdown arity for releasing resources, etc. - A new handler has been added for integration with the upcoming Telemere library. - Both compile-time and runtime filter config can now be specified by system values. - Both Clj and Cljs filter config can now be specified by system values. - Misc docstring improvements and additions. ** Other improvements ** - Significantly simpler, cleaner codebase - easing future maintenance. - Significantly improved performance.
- Loading branch information