You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spring Boot Admin shows an increased number of error toasts when cache.size metric is absent after updating to version 2.7.7.
This is a result of the change made in 330252c that surfaces errors that were previously swallowed.
showing a "Request failed" toast with the following error in the console when response is undefined:
Fetching cache EVCACHE_TEST size failed - error is ignored TypeError: Cannot read properties of undefined (reading 'data')
at details-cache.vue:131:1
at l (runtime.js:63:40)
at Generator._invoke (runtime.js:294:22)
at Generator.next (runtime.js:119:21)
at r (asyncToGenerator.js:3:20)
at s (asyncToGenerator.js:25:9)
Unfortunately, I don't have a screenshot right now but the first time the issue was observed the whole screen was flooded with error toasts which is surprising given that shouldFetchCacheSize should get set to false when the 1st issue is observed:
I'm happy to submit a PR if you support the suggestion to handle response being undefined in a way that would disable further cache.size retrieval and do not show error toast at all (even for the 1st error) to not confuse customers.
The text was updated successfully, but these errors were encountered:
we have just released version 2.7.9 of SBA that includes a property to enable toasts spring.boot.admin.ui.enable-toasts. They are disabled by default, now.
We hope that this reduces the confusion.
Appreciate the prompt response. What I was trying to point out is that it's totally valid for cache.size metric to not be emitted and Spring Admin doesn't respect that and as a result breaks contract. Disabling error toasts would hide the issue and as you pointed out would confuse customers less but it doesn't feel like the right fix. Apologies for not clearly explaining what I think the issue is about.
Spring Boot Admin Server information
Version:
2.7.7
Spring Boot version:
2.7.5
Webflux or Servlet application:
Webflux
Description
Spring Boot Admin shows an increased number of error toasts when
cache.size
metric is absent after updating to version 2.7.7.This is a result of the change made in 330252c that surfaces errors that were previously swallowed.
Root cause
Micrometer doesn't emit
cache.size
metric when EVCachesize()
method returnsnull
:but Spring Admin expects metric to be present:
showing a "Request failed" toast with the following error in the console when response is
undefined
:Unfortunately, I don't have a screenshot right now but the first time the issue was observed the whole screen was flooded with error toasts which is surprising given that
shouldFetchCacheSize
should get set tofalse
when the 1st issue is observed:spring-boot-admin/spring-boot-admin-server-ui/src/main/frontend/views/instances/details/details-cache.vue
Line 133 in 4b72b42
Potential solutions
I'm happy to submit a PR if you support the suggestion to handle response being
undefined
in a way that would disable further cache.size retrieval and do not show error toast at all (even for the 1st error) to not confuse customers.The text was updated successfully, but these errors were encountered: