Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove reflective access from the executors instrumentation, fixes #641 #1136

Conversation

ivantopo
Copy link
Contributor

@ivantopo ivantopo commented Mar 4, 2022

We are finally getting rid of reflective access on JDK classes! This should remove the annoying warning (that turned into an error by default in Java 17:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by kamon.instrumentation.executor.ExecutorInstrumentation$ (file:/home/xxxx/.ivy2/cache/io.kamon/kamon-bundle_2.12/jars/kamon-bundle_2.12-2.4.8.jar) to field java.util.concurrent.Executors$DelegatedExecutorService.e
WARNING: Please consider reporting this to the maintainers of kamon.instrumentation.executor.ExecutorInstrumentation$
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

A side effect of this is that we no longer can instrument certain executors returned by java.util.concurrent.Executors), including the ones from:

  • newSingleThreadExecutor
  • newSingleThreadScheduledExecutor
  • unconfigurableExecutorService
  • unconfigurableScheduledExecutorService

That shouldn't be a big issue, I hope.

@dpsoft
Copy link
Contributor

dpsoft commented Mar 5, 2022

I think that the only metric that could be important is the queue-size in the newSingle*, but I agree that shouldn't be an issue(big).

@ivantopo ivantopo merged commit 2a916af into kamon-io:master Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants