Closed iuliiasobolevska closed 1 year ago
Hi,
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.
@SteKoe, I would appreciate your thoughts on my last comment and wondering this issue should be reopened.
Hi @iuliiasobolevska,
sorry for closing the issue, we would love to see a PR fixing the issue in the frontend! :)
Kind regards SteKoe
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 https://github.com/codecentric/spring-boot-admin/commit/330252c385d93a1902dbcb131b848b81623086a5 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: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.