Skip to content

Commit

Permalink
Changes to load an agent jar along with Dr. Elephant. Current use-cas…
Browse files Browse the repository at this point in the history
…e is to publish the metrics

to other applications. The property is disabled by default and users who wish to make use of this
specify their own agent jar.
  • Loading branch information
rajagopr committed Sep 14, 2016
1 parent 91a6f64 commit dad905c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
18 changes: 17 additions & 1 deletion app-conf/elephant.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,20 @@ jvm_args="-Devolutionplugin=enabled -DapplyEvolutions.default=true"
# /ping
# /healthcheck
# /metrics
metrics=true
metrics=true

#
# Property enables an agent jar to be loaded along with the Dr. Elephant application.
# The intention with this property is to have the agent publish metrics to other
# applications, although it can do anything else. This property is disabled by default
# and users wishing to make use of it should provide their own implementation of the agent.
#
# More information on writing a jvm agent can be found under the following.
# https://docs.oracle.com/javase/8/docs/api/java/lang/instrument/package-summary.html
#
# Sample configuration of this property is shown below.
# metrics_agent_jar="-javaagent:lib/your_agent.jar"
#
# Sample configuration of the agent with additional options.
# metrics_agent_jar="-javaagent:lib/your_agent.jar=app-name=dr-elephant,app-host=foo"

6 changes: 6 additions & 0 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ if [ -n "${metrics}" ]; then
OPTS+=" -Dmetrics=$metrics"
fi

# Enable metrics agent jar if configured. Agent publishes metrics to other apps.
if [ -n "${metrics_agent_jar}" ]; then
OPTS+=" -J$metrics_agent_jar"
fi


# Navigate to project root
cd $project_root

Expand Down

0 comments on commit dad905c

Please sign in to comment.