Periodic metric reader causing 1,000 object references to be read when calculating the size of the object graph #4671
Answered
by
nluk
JBodkin-Amphora
asked this question in
Q&A
-
I've been seeing the following log being output in the periodic metric reader thread, however I'm unsure if this is actually a problem?
|
Beta Was this translation helpful? Give feedback.
Answered by
nluk
Nov 23, 2023
Replies: 1 comment 3 replies
-
I'm not familiar with Ehcache, and nothing in the metrics SDK uses it. Not sure why it would be traversing object graphs in |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jack-berg I don't know why a
PeriodicMetricReader
thread performed the read - in my case it'sprometheus-http-%d
threads doing that, but that's withOTEL_METRICS_EXPORTER=prometheus
set on the java agent. Regardless, I encountered kind of the same behaviour - I didn't reach the warning, because theObjectGraphWalker
failed reflection on unopenedjava.util
module. The culprit was this micrometer metric for ehcache, which is reported by OpenTelemetry on behalf of micrometer.As this is a Spring-specific thing, the required properties to disable it are for example:
as mentioned here.