reactor / BlockHound

Java agent to detect blocking calls from non-blocking threads.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

3rd party threads

bsideup opened this issue · comments

We should support checking threads originated from the 3rd party reactive libraries (RxJava, Cassandra, etc).

Some thoughts:

  • the easiest option would be to check their names, although it is not 100% reliable.
  • there might be something on the stacktrace to determine whenever the operation can be blocking or not

Is that simpler to mandate users to impl NonBlocking interface to track their thread as non blicking

@OlegDokuka only works when the thread is started by Reactor ecosystem. But if we have something like Flux.from(rxJavaObservable) then processing will run on RxJava's thread and we will not be able to detect it (unless we do something special for it)

After #2, we got another option. Something like:

BlockHound.builder()
    .blockingThreadPredicate(thread -> ...)
    .install();