post-photo

Gradle + Kamon + Prometheus: A Complete Guide

Alex Sükein ,

2019-04-08

I hope you have read my coworker’s post about DevOps tools and it raised your interest. My post has some in common with that one. I’ll tell you some DevOps stuff also, but only with a specific build tool (Gradle) and a specific monitoring toolkit (Kamon + Prometheus).

Okay, so you can find the solution how to use Kamon with Gradle (or even SBT or Maven) in the official tutorial. You just import it into your project, add the necessary lines so Kamon can gather information about your application, add your favourite reporter (as I mentioned before we’ll use Prometheus), and you are done.

But what if you want to add the automatized kamon-akka? If you go to the official website, it says ‘You must start your application with the AspectJ Weaver agent when using any Akka module.’ Okay let’s do this… Adding AspectJ for SBT and Play applications is as easy as you see it here. But what about Gradle?

First, let’s create our actors. We’ll have two pretty simple actors, PingActor, and PongActor.

import actor.PingActor;
import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;
import message.Tick;
 
import java.time.Duration;
 
public class Main {
 
    private static Duration initialDelay = Duration.ofSeconds(3);
    private static Duration interval = Duration.ofSeconds(1);
 
    private static ActorSystem system;
    private static ActorRef pingActor;
 
    public static void main(String[] args) {
        System.out.println("I'm running");
        initializeActors();
        scheduleTick();
        System.out.println("=======================");
    }
 
    private static void initializeActors() {
        System.out.println("Initializing actors...");
 
        system = ActorSystem.create("my-actor-system");
        pingActor = system.actorOf(Props.create(PingActor.class));
 
        System.out.println("Done!");
    }
 
    private static void scheduleTick() {
        System.out.println("Scheduling tick message...");
 
        system.scheduler().schedule(initialDelay, interval, pingActor, new Tick(), system.dispatcher(), ActorRef.noSender());
 
        System.out.println("Done!");
    }
}
package actor;
 
import akka.actor.AbstractActor;
import akka.actor.ActorRef;
import akka.actor.Props;
import message.Ping;
import message.Pong;
import message.Tick;
 
public class PingActor extends AbstractActor {
 
    private final ActorRef pongActor = getContext().actorOf(Props.create(PongActor.class));
    private int count = 0;
 
    @Override
    public Receive createReceive() {
        return receiveBuilder()
            .match(Tick.class, this::handleTick)
            .match(Pong.class, this::handlePong)
            .build();
    }
 
    private void handleTick(Tick tick) {
        System.out.println(count + " - Sending PING");
        pongActor.tell(Ping.from(count, System.currentTimeMillis()), getSelf());
    }
 
    private void handlePong(Pong msg) {
        System.out.println(msg.getCount() + " - Got PONG");
        System.out.println(msg.getCount() + " - Diff was " + msg.diffInMillis() + "ms");
        System.out.println("=======================");
        count++;
    }
}
package actor;
 
import akka.actor.AbstractActor;
import message.Ping;
import message.Pong;
 
public class PongActor extends AbstractActor {
    @Override
    public Receive createReceive() {
        return receiveBuilder()
            .match(Ping.class, this::handlePing)
            .build();
    }
 
    private void handlePing(Ping msg) {
        System.out.println(msg.getCount() + " - Got PING");
        System.out.println(msg.getCount() + " - Sending PONG");
        sender().tell(Pong.from(msg, System.currentTimeMillis()), getSelf());
    }
}
package actor;
 
import akka.actor.AbstractActor;
import message.Ping;
import message.Pong;
 
public class PongActor extends AbstractActor {
    @Override
    public Receive createReceive() {
        return receiveBuilder()
            .match(Ping.class, this::handlePing)
            .build();
    }
 
    private void handlePing(Ping msg) {
        System.out.println(msg.getCount() + " - Got PING");
        System.out.println(msg.getCount() + " - Sending PONG");
        sender().tell(Pong.from(msg, System.currentTimeMillis()), getSelf());
    }
}
package message;
 
public class Tick {
}
 
// ---------------------------
 
package message;
 
public class Ping {
    private final long count;
    private final long start;
 
    private Ping(long count, long start) {
        this.count = count;
        this.start = start;
    }
 
    public static Ping from(long count, long start) {
        return new Ping(count, start);
    }
 
    public long getCount() {
        return count;
    }
 
    public long getStart() {
        return start;
    }
}
 
// ---------------------------
 
package message;
 
public class Pong {
    private final long count;
    private final long start;
    private final long end;
 
    private Pong(Ping pingMsg, long end) {
        this.count = pingMsg.getCount();
        this.start = pingMsg.getStart();
        this.end = end;
    }
 
    public static Pong from(Ping pingMsg, long end) {
        return new Pong(pingMsg, end);
    }
 
    public long getCount() {
        return count;
    }
 
    public long diffInMillis() {
        return end - start;
    }
}

If you run this application, you can see the Ping-Pong actors sending messages to each other, and logging stuff to the console, like how long the operation took. No big deal. Okay, next let’s track our messages with Kamon.

First, you need to add the gradle dependencies…

dependencies {
    compile(
            "io.kamon:kamon-core_2.12:1.1.3",
            "io.kamon:kamon-logback_2.12:1.0.0",
            "io.kamon:kamon-prometheus_2.12:1.1.1",
    )
}

… and before initializing the actors in the main function, let’s initialize Kamon with the following function call.

private static void initializeKamon() {
    System.out.println("Initializing Kamon...");
 
    Kamon.addReporter(new PrometheusReporter());
 
    System.out.println("Done!");
}

So now if you start your application, you can see logs at http://localhost:9095/

# TYPE manual_log_ping_actor_tick_message_received_total counter
manual_log_ping_actor_tick_message_received_total 43.0
# TYPE manual_log_ping_actor_pong_message_received_total counter
manual_log_ping_actor_pong_message_received_total 43.0
# TYPE manual_log_pong_actor_ping_message_received_total counter
manual_log_pong_actor_ping_message_received_total 43.0

Since it was pretty easy, now comes the tricky ‘You must start your application with the AspectJ Weaver agent when using any Akka module.’ part. I googled a lot, tried out a lot of suggestions on how I should start my application with the AspectJ Weaver, but none of them worked (more specially none of them was full). If you do the following, it works though! Trust me, I’m an engineer :D

First, you have to add the aspectj plugin by adding the following lines to your build.gradle.

buildscript {
    repositories {
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }
    dependencies {
        classpath "gradle.plugin.aspectj:gradle-aspectj:0.1.6"
    }
}
 
project.ext {
    aspectjVersion = '1.8.12'
}
 
apply plugin: 'aspectj.gradle'

The next thing you have to do is add the AspectJ Weaver as a Java Agent by adding this to your build.gradle file.

run.doFirst {
    jvmArgs = [
            '-javaagent:' + projectDir + '/aspectj-weaver/aspectjweaver-1.9.1.jar'
    ]
}

As you see the passes an argument to the JVM with the full path to the AspectJ Weaver jar. The only thing you have to do is download the ‘aspectjweaver-1.9.1.jar’ (for example from my example code).

And lastly, you should add the Akka Kamon dependency (with the akka slf4j) to your build.gradle file, and configure it.

dependencies {
    compile(
            "com.typesafe.akka:akka-slf4j_2.12:2.5.17",
            "io.kamon:kamon-akka-2.5_2.12:1.1.0",
    )
}

After doing this, if you run your application and go to http://localhost:9095/, you can see the logs generated by Akka Kamon.

# TYPE manual_log_ping_actor_pong_message_received_total counter
manual_log_ping_actor_pong_message_received_total 3.0
# TYPE akka_system_dead_letters_total counter
akka_system_dead_letters_total{system="my-actor-system"} 0.0
# TYPE akka_system_processed_messages_total counter
akka_system_processed_messages_total{system="my-actor-system",tracked="true"} 9.0
akka_system_processed_messages_total{system="my-actor-system",tracked="false"} 3.0
# TYPE akka_system_unhandled_messages_total counter
akka_system_unhandled_messages_total{system="my-actor-system"} 0.0
# TYPE manual_log_ping_actor_tick_message_received_total counter
manual_log_ping_actor_tick_message_received_total 3.0
# TYPE akka_actor_errors_total counter
akka_actor_errors_total{path="my-actor-system/user/$a/$a",system="my-actor-system",dispatcher="akka.actor.default-dispatcher",class="actor.PongActor"} 0.0
akka_actor_errors_total{path="my-actor-system/user/$a",system="my-actor-system",dispatcher="akka.actor.default-dispatcher",class="actor.PingActor"} 0.0
# TYPE tracer_spans_created_total counter
tracer_spans_created_total 12.0
# TYPE manual_log_pong_actor_ping_message_received_total counter
manual_log_pong_actor_ping_message_received_total 3.0
# TYPE executor_tasks_total counter
executor_tasks_total{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher",state="completed"} 29.0
executor_tasks_total{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher",state="submitted"} 0.0
# TYPE executor_pool gauge
executor_pool{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher",setting="max"} 36.0
executor_pool{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher",setting="parallelism"} 36.0
executor_pool{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher",setting="min"} 0.0
# TYPE akka_actor_processing_time_seconds histogram
akka_actor_processing_time_seconds_bucket{le="0.005",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_processing_time_seconds_bucket{le="0.01",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_processing_time_seconds_bucket{le="0.025",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_processing_time_seconds_bucket{le="0.05",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_processing_time_seconds_bucket{le="0.075",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_processing_time_seconds_bucket{le="0.1",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_processing_time_seconds_bucket{le="0.25",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_processing_time_seconds_bucket{le="0.5",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_processing_time_seconds_bucket{le="0.75",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_processing_time_seconds_bucket{le="1.0",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_processing_time_seconds_bucket{le="2.5",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_processing_time_seconds_bucket{le="5.0",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_processing_time_seconds_bucket{le="7.5",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_processing_time_seconds_bucket{le="10.0",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_processing_time_seconds_bucket{le="+Inf",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_processing_time_seconds_count{path="my-actor-system/user/$a",system="my-actor-system",dispatcher="akka.actor.default-dispatcher",class="actor.PingActor"} 6.0
akka_actor_processing_time_seconds_sum{path="my-actor-system/user/$a",system="my-actor-system",dispatcher="akka.actor.default-dispatcher",class="actor.PingActor"} 0.000971264
akka_actor_processing_time_seconds_bucket{le="0.005",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_processing_time_seconds_bucket{le="0.01",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_processing_time_seconds_bucket{le="0.025",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_processing_time_seconds_bucket{le="0.05",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_processing_time_seconds_bucket{le="0.075",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_processing_time_seconds_bucket{le="0.1",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_processing_time_seconds_bucket{le="0.25",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_processing_time_seconds_bucket{le="0.5",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_processing_time_seconds_bucket{le="0.75",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_processing_time_seconds_bucket{le="1.0",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_processing_time_seconds_bucket{le="2.5",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_processing_time_seconds_bucket{le="5.0",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_processing_time_seconds_bucket{le="7.5",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_processing_time_seconds_bucket{le="10.0",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_processing_time_seconds_bucket{le="+Inf",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_processing_time_seconds_count{path="my-actor-system/user/$a/$a",system="my-actor-system",dispatcher="akka.actor.default-dispatcher",class="actor.PongActor"} 3.0
akka_actor_processing_time_seconds_sum{path="my-actor-system/user/$a/$a",system="my-actor-system",dispatcher="akka.actor.default-dispatcher",class="actor.PongActor"} 0.000495616
# TYPE executor_queue histogram
executor_queue_bucket{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher",le="10.0"} 11.0
executor_queue_bucket{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher",le="30.0"} 11.0
executor_queue_bucket{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher",le="100.0"} 11.0
executor_queue_bucket{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher",le="300.0"} 11.0
executor_queue_bucket{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher",le="1000.0"} 11.0
executor_queue_bucket{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher",le="3000.0"} 11.0
executor_queue_bucket{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher",le="10000.0"} 11.0
executor_queue_bucket{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher",le="30000.0"} 11.0
executor_queue_bucket{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher",le="100000.0"} 11.0
executor_queue_bucket{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher",le="+Inf"} 11.0
executor_queue_count{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher"} 11.0
executor_queue_sum{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher"} 0.0
# TYPE executor_threads histogram
executor_threads_bucket{le="10.0",name="akka.actor.default-dispatcher",state="total",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_bucket{le="30.0",name="akka.actor.default-dispatcher",state="total",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_bucket{le="100.0",name="akka.actor.default-dispatcher",state="total",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_bucket{le="300.0",name="akka.actor.default-dispatcher",state="total",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_bucket{le="1000.0",name="akka.actor.default-dispatcher",state="total",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_bucket{le="3000.0",name="akka.actor.default-dispatcher",state="total",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_bucket{le="10000.0",name="akka.actor.default-dispatcher",state="total",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_bucket{le="30000.0",name="akka.actor.default-dispatcher",state="total",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_bucket{le="100000.0",name="akka.actor.default-dispatcher",state="total",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_bucket{le="+Inf",name="akka.actor.default-dispatcher",state="total",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_count{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher",state="total"} 11.0
executor_threads_sum{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher",state="total"} 33.0
executor_threads_bucket{le="10.0",name="akka.actor.default-dispatcher",state="active",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_bucket{le="30.0",name="akka.actor.default-dispatcher",state="active",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_bucket{le="100.0",name="akka.actor.default-dispatcher",state="active",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_bucket{le="300.0",name="akka.actor.default-dispatcher",state="active",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_bucket{le="1000.0",name="akka.actor.default-dispatcher",state="active",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_bucket{le="3000.0",name="akka.actor.default-dispatcher",state="active",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_bucket{le="10000.0",name="akka.actor.default-dispatcher",state="active",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_bucket{le="30000.0",name="akka.actor.default-dispatcher",state="active",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_bucket{le="100000.0",name="akka.actor.default-dispatcher",state="active",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_bucket{le="+Inf",name="akka.actor.default-dispatcher",state="active",actor_system="my-actor-system",type="fjp"} 11.0
executor_threads_count{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher",state="active"} 11.0
executor_threads_sum{actor_system="my-actor-system",type="fjp",name="akka.actor.default-dispatcher",state="active"} 0.0
# TYPE akka_actor_time_in_mailbox_seconds histogram
akka_actor_time_in_mailbox_seconds_bucket{le="0.005",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_time_in_mailbox_seconds_bucket{le="0.01",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_time_in_mailbox_seconds_bucket{le="0.025",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_time_in_mailbox_seconds_bucket{le="0.05",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_time_in_mailbox_seconds_bucket{le="0.075",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_time_in_mailbox_seconds_bucket{le="0.1",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_time_in_mailbox_seconds_bucket{le="0.25",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_time_in_mailbox_seconds_bucket{le="0.5",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_time_in_mailbox_seconds_bucket{le="0.75",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_time_in_mailbox_seconds_bucket{le="1.0",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_time_in_mailbox_seconds_bucket{le="2.5",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_time_in_mailbox_seconds_bucket{le="5.0",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_time_in_mailbox_seconds_bucket{le="7.5",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_time_in_mailbox_seconds_bucket{le="10.0",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_time_in_mailbox_seconds_bucket{le="+Inf",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 6.0
akka_actor_time_in_mailbox_seconds_count{path="my-actor-system/user/$a",system="my-actor-system",dispatcher="akka.actor.default-dispatcher",class="actor.PingActor"} 6.0
akka_actor_time_in_mailbox_seconds_sum{path="my-actor-system/user/$a",system="my-actor-system",dispatcher="akka.actor.default-dispatcher",class="actor.PingActor"} 0.001674752
akka_actor_time_in_mailbox_seconds_bucket{le="0.005",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_time_in_mailbox_seconds_bucket{le="0.01",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_time_in_mailbox_seconds_bucket{le="0.025",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_time_in_mailbox_seconds_bucket{le="0.05",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_time_in_mailbox_seconds_bucket{le="0.075",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_time_in_mailbox_seconds_bucket{le="0.1",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_time_in_mailbox_seconds_bucket{le="0.25",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_time_in_mailbox_seconds_bucket{le="0.5",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_time_in_mailbox_seconds_bucket{le="0.75",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_time_in_mailbox_seconds_bucket{le="1.0",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_time_in_mailbox_seconds_bucket{le="2.5",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_time_in_mailbox_seconds_bucket{le="5.0",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_time_in_mailbox_seconds_bucket{le="7.5",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_time_in_mailbox_seconds_bucket{le="10.0",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_time_in_mailbox_seconds_bucket{le="+Inf",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 3.0
akka_actor_time_in_mailbox_seconds_count{path="my-actor-system/user/$a/$a",system="my-actor-system",dispatcher="akka.actor.default-dispatcher",class="actor.PongActor"} 3.0
akka_actor_time_in_mailbox_seconds_sum{path="my-actor-system/user/$a/$a",system="my-actor-system",dispatcher="akka.actor.default-dispatcher",class="actor.PongActor"} 0.00068096
# TYPE akka_actor_mailbox_size histogram
akka_actor_mailbox_size_bucket{le="10.0",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_bucket{le="30.0",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_bucket{le="100.0",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_bucket{le="300.0",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_bucket{le="1000.0",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_bucket{le="3000.0",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_bucket{le="10000.0",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_bucket{le="30000.0",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_bucket{le="100000.0",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_bucket{le="+Inf",path="my-actor-system/user/$a",system="my-actor-system",class="actor.PingActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_count{path="my-actor-system/user/$a",system="my-actor-system",dispatcher="akka.actor.default-dispatcher",class="actor.PingActor"} 81.0
akka_actor_mailbox_size_sum{path="my-actor-system/user/$a",system="my-actor-system",dispatcher="akka.actor.default-dispatcher",class="actor.PingActor"} 4.0
akka_actor_mailbox_size_bucket{le="10.0",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_bucket{le="30.0",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_bucket{le="100.0",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_bucket{le="300.0",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_bucket{le="1000.0",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_bucket{le="3000.0",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_bucket{le="10000.0",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_bucket{le="30000.0",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_bucket{le="100000.0",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_bucket{le="+Inf",path="my-actor-system/user/$a/$a",system="my-actor-system",class="actor.PongActor",dispatcher="akka.actor.default-dispatcher"} 81.0
akka_actor_mailbox_size_count{path="my-actor-system/user/$a/$a",system="my-actor-system",dispatcher="akka.actor.default-dispatcher",class="actor.PongActor"} 81.0
akka_actor_mailbox_size_sum{path="my-actor-system/user/$a/$a",system="my-actor-system",dispatcher="akka.actor.default-dispatcher",class="actor.PongActor"} 3.0
# TYPE akka_system_active_actors histogram
akka_system_active_actors_bucket{system="my-actor-system",le="10.0"} 87.0
akka_system_active_actors_bucket{system="my-actor-system",le="30.0"} 87.0
akka_system_active_actors_bucket{system="my-actor-system",le="100.0"} 87.0
akka_system_active_actors_bucket{system="my-actor-system",le="300.0"} 87.0
akka_system_active_actors_bucket{system="my-actor-system",le="1000.0"} 87.0
akka_system_active_actors_bucket{system="my-actor-system",le="3000.0"} 87.0
akka_system_active_actors_bucket{system="my-actor-system",le="10000.0"} 87.0
akka_system_active_actors_bucket{system="my-actor-system",le="30000.0"} 87.0
akka_system_active_actors_bucket{system="my-actor-system",le="100000.0"} 87.0
akka_system_active_actors_bucket{system="my-actor-system",le="+Inf"} 87.0
akka_system_active_actors_count{system="my-actor-system"} 87.0
akka_system_active_actors_sum{system="my-actor-system"} 676.0

That’s all, I hope you found this useful.

Also I’m planning to release a post about Maven + Kamon + Prometheus, but I didn’t have enough time to figure out how it works :D So stay tuned until my next post!

See you later!

Wanari is a custom software development company, established in 2000. We love exploring new technologies and working on challenging projects. And, as you can see, sometimes we even share some of our code with the world. Follow us on Insta or Facebook to never miss a post.

member photo
colored slash

Alex Sükein

His favorite technologies are AngularJS and Java 8. He's been at Wanari as a full stack developer for almost 3 years.

Latest post by Alex Sükein

Solutions for a filterable sortable pageable list in Spring