Skip to content

Commit

Permalink
Reactor module readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
meiao committed Mar 6, 2025
1 parent 074363b commit a517054
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions instrumentation/reactor-3.3.0/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
# Reactor Instrumentation

Instrumentation for Reactor Core library code.
Instrumentation for Reactor Core library code. This module provides mostly the same functionality of `netty-reactor-0.9.0`, but this will only apply when netty
is not being used.

This instrumentation module is a subset of the `netty-reactor-0.9.0` instrumentation. It does not contain anything related to HTTP nor starting transactions and has added Skips for when `reactor-netty` classes are present.

The contents of the `netty-reactor` module were not moved to this module because it would cause the `tokenLift` to register twice in the `Hooks` class.
Changes to `netty-reactor` should be mirrored here and vice-versa.

## Why not separate the functionality?
`netty-reactor` modules register the `tokenLift` in the Hooks class from two different code paths, one from reactor and another from netty. To make sure that
`tokenLift` is registered only once, an AtomicBoolean new field is added to the `Hooks` class. Before registering, that field is checked and if false,
`tokenLift` is registered and the field is set to true.

The code cannot be separated in modules because the new field is not visible across modules, so there would be no way to make sure that `tokenLift` gets
registered only once.

## Notice
This module will only properly link the code if the Mono/Flux is subscribed on a scheduler.
Expand Down

0 comments on commit a517054

Please sign in to comment.