Skip to content

Commit

Permalink
Note about wrapped ExecutorService types
Browse files Browse the repository at this point in the history
It can be unclear why metrics are missing when passing a wrapped type, as the API seems to indicate any `Executor` or `ExecutorService` can be monitored. This makes explicit the types we can monitor and notes unwrapping should be done by the user, since we cannot know wrapper types from external code.

See gh-2443 and gh-2426
  • Loading branch information
shakuzen committed Feb 16, 2021
1 parent 08dee6f commit 3062418
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -37,6 +37,10 @@
* Monitors the status of executor service pools. Does not record timings on operations executed in the {@link ExecutorService},
* as this requires the instance to be wrapped. Timings are provided separately by wrapping the executor service
* with {@link TimedExecutorService}.
* <p>
* Supports {@link ThreadPoolExecutor} and {@link ForkJoinPool} types of {@link ExecutorService}. Some libraries may provide
* a wrapper type for {@link ExecutorService}, like {@link TimedExecutorService}. Make sure to pass the underlying,
* unwrapped ExecutorService to this MeterBinder, if it is wrapped in another type.
*
* @author Jon Schneider
* @author Clint Checketts
Expand Down

0 comments on commit 3062418

Please sign in to comment.