When i enable akka cinnamon on my project, CPU problem occurred on my microservice. I did not run cinnamon agent with gradle. I applied cinnamon agent command on runtime with java parameters.
CMD echo "The application starting..." && \
if [ $NEWRELIC_ACTIVE == "EVET" ]; then NEWRELIC_ARGS="-javaagent:$APPLICATION_PATH/newrelic/newrelic.jar" ; else NEWRELIC_ARGS=""; fi && \
java $NEWRELIC_ARGS $CINNAMON_ARGS -Djava.security.egd=file:/dev/./urandom \
-jar $APPLICATION_PATH/app.jar
Grafana output illustrated below;
my thread dump is illustrated below;
my configuration is illustrated below;
cinnamon{
host = "cinnamon-dev"
application = "app-dev"
core {
meta {
descriptor {
executor {
active-thread-count {
key = “active-threads”
unit-type = “custom”
unit-suffix = “thread”
}
running-thread-count {
key = “running-threads”
unit-type = “custom”
unit-suffix = “thread”
}
queued-task-count {
key = “queued-tasks”
unit-type = “custom”
unit-suffix = “task”
}
pool-size {
key = “pool-size”
unit-type = “custom”
unit-suffix = “thread”
}
parallelism {
key = “parallelism”
}
}
}
}
}
akka {
cluster {
shard-region-info = on
domain-events = on
member-events = on
node-status = on
node-metrics = on
singleton-events = on
}
remote{
serialization-timing = on
failure-detector-metrics = on
}
actors {
"/user/*" {
# WARNING: In a real application, it will be better to tag the actors
# so that will be easier to make sense of the metrics. But since this is
# just a sample, we are using `instance` to keep it simple.
# See the following page for more information:
# https://developer.lightbend.com/docs/telemetry/current/instrumentations/akka/actors-typed.html
report-by = instance
}
}
meta{
descriptor{
actor{
dead-letter.enabled = true
sent-messages.enabled = true
mailbox-size {
key = "mailbox-size"
unit-type = "custom"
unit-suffix = "msg"
}
actor-failure {
key = "actor-failure"
}
dead-letter {
key = "dead-letter"
}
mailbox-time {
key = "mailbox-time"
unit-type = "nanoseconds"
}
processed-messages {
key = "processed-messages"
unit-type = "custom"
unit-suffix = "msg"
}
processing-time {
key = "processing-time"
unit-type = "nanoseconds"
}
unhandled-message {
key = “unhandled-message”
}
running-actors {
key = “running-actors”
unit-type = “custom”
unit-suffix = “actor”
}
}
dispatcher {
queue-size {
key = “queue-size”
unit-type = “custom”
unit-suffix = “task”
}
processing {
key = “processing”
unit-type = “custom”
unit-suffix = “task”
}
processing-time {
key = “processing-time”
unit-type = “nanoseconds”
}
queue-time {
key = “queue-time”
unit-type = “nanoseconds”
}
}
node{
cluster-domain-event {
key = "cluster-domain-event"
}
cluster-current-event {
key = “cluster-current-event”
}
cluster-node-status {
key = “cluster-node-status”
}
reachable-nodes {
key = “reachable-nodes”
unit-type = “custom”
unit-suffix = “node”
}
unreachable-nodes {
key = “unreachable-nodes”
unit-type = “custom”
unit-suffix = “node”
}
}
}
events{
# rate limit events
rate {
# event defaults are applied per event
default {
# only every n:th event will be fired
every = 1
# events will fire at-most times every time period
at-most = 1
at-most-every = 20s
}
# global settings apply to all events combined
global {
# only every n:th event will be fired
every = 1
# events will fire at most once every time period
at-most = 1
at-most-every = 20s
}
}
}
}
}
}
cinnamon.chmetrics {
reporters += newrelic-reporter
newrelic-reporter {
frequency = 10s
# Prefix for all metric keys.
prefix = "dev"
# Suffix for all metric keys.
suffix = ""
# Tags for all metrics.
# Uses a "key-value" approach to generate the tags.
# E.g. the following configuration:
# tags {
# country = "UK"
# }
# will generate tags = "country" -> "UK"
tags {}
# Handle events.
# Control if the reporter should send events to new relic as well.
handle-events = true
report {
# Meter fields to report for metrics.
meter = ["samples", "min1_rate", "min5_rate", "min15_rate", "mean_rate"]
# Tags to include for metrics. Does not affect histogram or meter fields.
include-tags = ["*"]
# Tags to exclude for metrics. Does not affect histogram or meter fields.
exclude-tags = []
# Converts time from nano into specified unit. Use "ns" for no conversion.
# Supported units: "ns" (default), "us", "ms", and "s".
conversion-time-unit = "ms"
# Group by category instead of name.
# If enabled the New Relic event names will only include the metric category and not the name,
# and a new tag named "metric" containing the metric name will be added.
# E.g. the metric "lightbend:actors:mailbox_size" will be reported as "lightbend:actors" with
# the tag "metric" -> "mailbox_size"
group-by-category = true
}
}
}
i couldn’t figure out problem. thanks for help