Bonus: Telemetry

Pronghorn provides awesome automatically generated graphs of your application that you can view in your web browser. It updates live, displaying data flow, volume, and more.

Enable Telemetry in HelloWorldPronghorn

To enable telemetry in our HelloWorld app, go to HelloWorldPronghorn.java and edit the start method to look like this:

private static void start(GraphManager gm) {
    gm.enableTelemetry(8000);
    StageScheduler.defaultScheduler(gm).startup();
}

Run the app, and observe the output on the console:

[main] INFO com.ociweb.pronghorn.stage.scheduling.StageScheduler - Targeted threads in use 8, fixed limit with fixed script. NOTE: More threads may be used use to graph complexity and telemetry usage.
[main] INFO com.ociweb.pronghorn.network.NetGraphBuilder - building server graph
[main] INFO com.ociweb.pronghorn.stage.scheduling.GraphManager - total count of stages including telemetry 12 
[main] INFO com.ociweb.pronghorn.stage.scheduling.ScriptedFixedThreadsScheduler - actual thread count 6
[main] INFO com.ociweb.pronghorn.stage.scheduling.ScriptedFixedThreadsScheduler - priority thread 11:HTTP1xRouter,6:ResourceM,12:Order,4:SSocketW,9:DotM,10:SummaryM

Telemetry Server is now ready on http://172.16.10.28:8000/
Telemetry Server max connections: 4096
Telemetry Server max concurrent inputs: 8
Telemetry Server concurrent tracks: 1
Telemetry Server max concurrent outputs: 2
0672 ms total startup time.

Hello World, Jon Snow!

It provides you with a link containing the telemetry. Open up the URL in your web browser:

Does this look familiar?

Last updated