Unfortunately, there are still various edge-cases where things randomly
break due to TruffleRuby differences or incompatibilities to other gems.
This time, it was an incompatibility with a json gem update described in
https://github.com/oracle/truffleruby/issues/1857.
We will still try to keep Rackstash compatible with TruffleRuby but will
not consider full support for it release-critical for now.
This reduces the change of a Hash argument being interpreted as keyword
argument inadvertently and clarifies the interface. If a resolver scope
is required, you can also call
delayed_tag = ->{ |request| request.host }
logger.tags.merge!(delayed_tag, scope: request)
Since these platforms don't support the File::SHARE_DELETE flag on
files, Windows rejects any attempts to delete or rename a file opened
by us. There's nothing we can do here unfortunately...
This is required on Windows (where we enable this feature by default)
since they don't support concurrent atomic writes above the drive's
sector size (usually between 512 Bytes and 4 KiBytes). Without an
explicit lock, concurrent writes can be interleaved or be partially
lost.
Since fork is not available on some platforms (aka. Windows), we
avoid it and use normal Threads instead. We have fail saves in place to
ensure that tests are still valid even on MRI with its GIL.
With the release of Bundler 2.0, things got a bit messy. Since both
bundler and rake are very likely to retain backwards compatibility due
to their wide use in the wild, this is likely safe enough.
In any case, these are "only" development dependencies which do not
affect any production users of Rackstash but merely people running the
tests.
Each flow now has an associated executor which performs all actions
(writing events, closing, reopening) asynchronously by default using a
Concurrent::SingleThreadExecutor.
This improves the responsiveness of the application by performing the
(usually) IO-bound task of writing the logs to a background thread.
By creating a flow with `synchronous: true`, all actions are run in the
calling thread as before, making the flow blocking.
With this, we also drop the ability to define conditions in the filter
itself. When adding a filter, users can still setup a condition using
the common functionality of all filters.
This takes care of edge-cases and ensures that multiple loads of
`lib/rackstash.rb` do not fail on an attempted second initialization of
the UndefinedClass.