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

Issue with Caffeine integration #1272

Open
Yomanz opened this issue Apr 4, 2023 · 4 comments
Open

Issue with Caffeine integration #1272

Yomanz opened this issue Apr 4, 2023 · 4 comments

Comments

@Yomanz
Copy link

Yomanz commented Apr 4, 2023

WARNING: Exception thrown by stats counter
java.lang.IllegalAccessError: class kamon.instrumentation.caffeine.KamonStatsCounter tried to access private method 'void com.github.benmanes.caffeine.cache.stats.CacheStats.<init>(long, long, long, long, long, long, long)' (kamon.instrumentation.caffeine.KamonStatsCounter and com.github.benmanes.caffeine.cache.stats.CacheStats are in unnamed module of loader 'app')
	at kamon.instrumentation.caffeine.KamonStatsCounter.snapshot(KamonStatsCounter.scala:46)
	at com.github.benmanes.caffeine.cache.stats.GuardedStatsCounter.snapshot(GuardedStatsCounter.java:90)
	at com.github.benmanes.caffeine.cache.LocalAsyncCache$AbstractCacheView.stats(LocalAsyncCache.java:569)

image
(Image of the private method)

I am getting this exception thrown when using kamon and caffeine together, specifically I am using Akka HTTP Prometheus metrics package which seems to be automatically hooked into by kamon.

I can provide any extra additional information as required

@ivantopo
Copy link
Contributor

ivantopo commented Apr 4, 2023

Hey @Yomanz, can you please share what exact Kamon/Caffeine/Java versions are you using here? Thanks!

@Yomanz
Copy link
Author

Yomanz commented Apr 4, 2023

Hey @Yomanz, can you please share what exact Kamon/Caffeine/Java versions are you using here? Thanks!

Absolutely!

Java: Corretto 17 (Scala 2.13.7)
Kamon: 2.6.0
Caffeine: 3.1.1 (Scaffeine 5.2.1)

@Yomanz
Copy link
Author

Yomanz commented Apr 5, 2023

@ivantopo I've just noticed that Kamon doesn't monitor async caffeine caches, is there a specific reason for this?

@Yomanz
Copy link
Author

Yomanz commented May 17, 2023

Hi @ivantopo, are there any updates here?
I can always take a peek at fixing it.

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

No branches or pull requests

2 participants