- Change the format of
$trace_begin
event from #{?snk_kind => '$trace_begin', ts => ...}
to #{?snk_kind => '$trace_begin', ?snk_meta => #{time => ...}}
- Add timestamp of the trace events in the trace dump
- Show timestamp and code location (
file:line
) of the trace events by default (environment variable SNK_PRETTY_PRINT_DUMP
is not used anymore).
- OTP25 support
- Show code location (
file:line
) of the trace events in the trace dump (optional feature, enabled by setting environment variable SNK_PRETTY_PRINT_DUMP
)
- Fix timestamps of the log messages corresponding to the trace event in test mode (no more logs from 70s)
- Clean stack traces from entries related to the test framework internals (can be disabled with
tidy_stacktrace => false
config)
- Fix unused variables compilation warnings for
?tp(kind, _)
macro in prod mode
snabbkaffe_collector:subscribe
and receive_events
have been moved to snabbkaffe
module
- Fix off-by-one error in
snabbkaffe_nemesis:periodic_crash/3
- Introduce
snabbkaffe:increasing
and snabbkaffe:check_conseq_relation
functions
- Introduce
snabbkaffe:dump_trace/1
function that saves trace to a file
- Allow to change behavior of trace points by defining
SNK_COLLECTOR
macro as true
or false
(the latter means log trace points instead of collecting them)
- Fix compilation warnings
- Improve output of
snabbkaffe:strictly_increasing
function
- API of
find_pairs
function and macro are heavily reworked: Strict
flag has been removed and the return type has been changed.
Now they don't crash when they find an effect without a cause, but instead add it to the list.
- Passing return value to the check stage callback is made optional:
?check_trace(
RunStage,
fun(Trace) ->
...
end)
- Check stage supports a list of callbacks in the following form:
?check_trace(
RunStage,
[ fun trace_check/1
, fun another_trace_check/2
, {"There are no crashes", fun(Trace) -> ... end}
, {"Another important check", fun(Return, Trace) -> ... end}
])
- Fix timetrap while waiting for the silence interval
- The check stage now must return ok or true to indicate success
- Fix race condition in the injected fault
- Improved event subscription mechanism using new APIs:
snabbkaffe_collector:subscribe
and receive_events
, that aim to replace the ?wait_async_action
macro:
{ok, Sub} = snabbkaffe_collector:subscribe( ?match_event(#{?snk_kind := foo})
, _Quantity = 2
, _Timeout = infinity
, _BackInTime = 0
),
... trigger async action ...
?assertMatch( {ok, [ #{?snk_kind := foo, n := 1}
, #{?snk_kind := foo, n := 2}
]}
, snabbkaffe_collector:receive_events(Sub)),
- Error injection uses
erlang:exit
instead of erlang:error
. This
may affect a small portion of testcases that specifically expect
certain errors
- Fix
?of_kind
and ?of_domain
macros
- Timetrap: fail a testcase and dump the trace if the run stage takes too long to complete
- Allow user to redefine the values of
?snk_kind
, ?snk_span
and ?snk_meta
macros
- Allow to specify severity for
?tp_span
macro
- Move MFA tuple to the log metadata in the prod mode
?split_trace_at
, ?splitl_trace
and ?splitr_trace
macros now use inverse matching.
It was the original intention, but the fix is non-BWC
snabbkaffe.hrl
has been split into parts related to tracing and
running the tests
snabbkaffe:strictly_increasing
function returns false when the
list is empty
- Add
?tp_span
macro that wraps around a piece of code and emits
trance events when entering and completing it
- Any term can be used as metric name
- snabbkaffe:push_stat work on remote nodes
- Don't filter out metrics that have less than 5 samples
- Tracepoints without severity no longer appear in the release build
as debug logs. Old behavior can be emulated by explicitly specifying
debug severity using
?tp(debug, Kind, Data)
macro
- Timestamp field (
tp
) has been moved to the metadata and renamed to
time
. Its resolution has been changed to microsecond.
- Add
logger
process metadata to the trace events
- Add
?of_domain
and ?of_node
macros
- Severity level of tracepoints affects severity of logs in the debug mode
- Fix execution of tracepoints in TEST profile while snabbkaffe collector is not running
- Change return type of
?causality
and ?strict_causality
macros to boolean
- Introduce
?force_ordering
macro
- Introduce support for distributed tracing.
snabbkaffe:forward_trace/1
function.
- Remove dependency on
bear
- Drop support for OTP releases below 21
- Drop
hut
dependency, now in the release profile snabbkaffe always uses kernel
logger
- Kind of the trace point now can be a string
- Concuerror support
?projection_complete
and ?projection_is_subset
macros now support multiple fields
- Allow usage of guards in the match patterns in all macros