Package ratpack.hystrix
Class HystrixMetricsEventStreamHandler
- java.lang.Object
-
- ratpack.hystrix.HystrixMetricsEventStreamHandler
-
- All Implemented Interfaces:
Handler
public class HystrixMetricsEventStreamHandler extends java.lang.Object implements Handler
A Handler that streams Hystrix metrics in text/event-stream format.This handler should be bound to an application path, and most likely only for the GET method…
import ratpack.hystrix.HystrixMetricsEventStreamHandler; import static org.junit.Assert.*; assertTrue(chain instanceof ratpack.handling.Chain); chain.get("admin/hystrix.stream", new HystrixMetricsEventStreamHandler());
This handler can be used in conjunction with Server Sent Event based clients such as the Hystrix Dashboard and Turbine to consume the metrics being reported by your application in realtime.
- See Also:
- Hystrix,
ServerSentEvents
-
-
Constructor Summary
Constructors Constructor Description HystrixMetricsEventStreamHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handle(Context context)
Handles the context.
-
-
-
Method Detail
-
handle
public void handle(Context context) throws java.lang.Exception
Description copied from interface:Handler
Handles the context.- Specified by:
handle
in interfaceHandler
- Parameters:
context
- The context to handle- Throws:
java.lang.Exception
- if anything goes wrong (exception will be implicitly passed to the context'sContext.error(Throwable)
method)
-
-