Hystrix Dashboard with Turbine issue - spring-boot

I have multiple service that are mapped thru zuul so my turbine project looks for hystrix.stream from the zuul project.
I think i have setup everyting right because I can see the hits getting updated properly. But the below section for Thread Pools keeps on loading what am i missing here and whats the use of it, couldnot find anything that can help me to understand it actual use.Here is the screenshot of my dahsboard.
Hystrix Dashboard Image
Let me know if more info is needed for the same.

Related

Even though the spring application is shut down in the spring eureka server, it routes to the terminated application. how do i solve it?

When I checked the Eureka Dashboard, I confirmed that the application was terminated normally and was not displayed, but after that, it was routed to the terminated Spring application for about 30 seconds and gave a 500 error.
I think it's probably cached in eureka. I'd rather not be routed even for one second rather than a way to reduce the period.
Please let me know if there is any material or method that can help me thank you.
I don't want to be routed any more to Spring applications that are terminated in Spring eureka.

Spring Boot health seems to return health check UP while context not refreshed

While starting a webbapp, we have a S3InboundFileSynchronizer that loads files during a little time.
We would need to don't let the web server available until all files are loaded. However, the /health endpoint seems available and accessed by our cloud manager to admit it can switch between the previous instance and the one that is starting.
How is it possible to block /health actuator access while the files are loading ?
I tried with #EventListener(classes = { ContextRefreshedEvent.class }) but it doesn't seem to have effect on this... :/
Please help

Google Cloud Trace doesn't correlate logs from Spring Boot applications using Sleuth

I've recently upgraded my applications to Spring Boot 2.4.2, Cloud 2020.0.0, changing Spring Cloud GCP dependencies following the migration guide: https://googlecloudplatform.github.io/spring-cloud-gcp/2.0.0/reference/html/index.html#migration-guide-from-spring-cloud-gcp-1-x-to-2-x
Regarding the applications everything seems to be working fine. I can see calls between the microservices propagating the trace-id headers:
gateway:
2021-01-24 20:18:36.471 DEBUG [gateway,0bc6b9664e6604e2,eb9f834718fe33c9] 1 ---
service1:
2021-01-24 20:18:36.700 DEBUG [service1,0bc6b9664e6604e2,570653ac93add270,true]
In the Google Cloud Trace console I can see that the trace id (0bc6b9664e6604e2) was captured (prefixed with 16 extra 0's) and that it shows both microservices (the first post corresponds to gateway and the third call correspons to service1:
However notice the message "No logs found for this trace".
Also the Trace Logs View link complaints about it:
If I open the link it just looks by timestamp, not using the correlation trace id.
The funny thing is if I look for a log statement directly in the GCP Logging view, the trace id is there:
I can then run a GCP Logging query to find all the logs correctly:
Apparently everything seems to be OK. Could you tell why GCP Trace isn't able to correlate with GCP Logging?
For the logs to appear correlated with tracing you need to add the stackdriver log dependency (I think it only works if your log implementation is logback).
Check https://cloud.spring.io/spring-cloud-gcp/reference/html/#integration-with-logging

Multiple services on a Hystrix/Turbine dashboard?

I am trying to get a view on 2 different services that are running using Spring Boot. Both services are nicely registered in Eureka and now i want to get some Hystrix data plotted in the Turbine webapplication.
When testing out the single services using Turbine it works great:
http://localhost:2222/hystrix.stream (service1)
http://localhost:3333/hystrix.stream (service2)
I am trying to get a view on the dashboard which plots both of the services but whatever i try only the first service in the Turbine config is plotted.
turbine:
clusterNameExpression: new String('default')
appConfig: service1,service2
I seem to hit a wall when trying to get the data into the turbine.stream for both of the services.
Any hints or tips?
To answer my own question, it seems that Turbine cannot monitor more services on the same host as it is bound to the hostname. See https://github.com/Netflix/Turbine/issues/88
Turbine has 2 operating models:
pull; data from separate service streams are pulled by Turbine
push; data from separate services are pushed to a Turbine server by using an AMQP broker such as RabbitMQ
A workaround is to use TurbineAMQP that is capable of doing exact the stuff that i needed. It involves a bit more infrastructure but works nicely!
First off, I don't think Turbine is host-exclusive as Marco saying
... it seems that Turbine cannot monitor more services on the same host as it is bound to the hostname
I implemented Turbine with the Hystrix Dashboard App (which is not recommended), aggregating 2 services with same spring.application.name.
I found how Turbine collects hystrix stream is that, each Turbine application will look for services in Eureka Registry with the given name by turbine.appConfig in application.properties, which is the spring.application.name by default or eureka.instance.appname explicitly of your services, regardless of the hosts of them. Till now turbine stream is ready.
A list of names as service IDs from your request in the previous step will be returned, and at least one of them should match the list of names you provide in turbine.aggregator.clusterConfig.
When you type http://[turbine-app-host:port]/turbine.stream?cluster=[cluster name] on the home page of Hystrix Dashboard, the cluster name parameter should be one of the matching names from turbine.aggregator.clusterConfig.

How to configure DS Replicas links in Spring Cloud Eureka Server Dashboard

I setup an Eureka cluster composed of 3 replicas.
I got the nice dashboard which is automatically populated with the instances currently registered with Eureka and the DS Replicas.
However the DS Replicas links seems to point to the value I set as eureka.client.serviceUrl.defaultZone. In my case this value is something similar to http://node-01:8761/eureka/ which in reality returns a 404. Is there a way I could configure the dashboard to strip out the /eureka/ part so when I follow the links I end up in the other dashboards or am I misunderstanding the use of those links?
There is no easy way to alter the link as you ask.
However, the UI part of the Eureka server is a standard Spring MVC #Controller. An instance of it is created by org.springframework.cloud.netflix.eureka.server.EurekaServerConfiguration. Have a look at the current implementation... it shouldn't be too hard to provide your own customized version instead.

Resources