Re: Add app monitoring agent framework in custom buildpack


Swatz bosh
 

Hi,

To add NewRelic agent jar, I did below modifications in my custom buildpack-

1. bin/compile - inside compile I am downloading agent jar and copying it inside APP_DIRECTORY/newrelic-agent/agent.jar

2. bin/release - inside release I am doing below to add JAVA_OPTS by adding system param and path to above agent jar

default_process_types:
web: export APPDIR=$HOME/app; export JAVA_OPTS=${JAVA_OPTS} -javaagent:/tmp/staged/app/new-relic-agent/new-relic-3.14.0.jar -Dnewrelic.home:homename -Dnewrelic.config.license_key:xxaaaayyy -Dnewrelic.config.app_name=app1 -Dnewrelic.config.log_file_path=STDOUT; ./prestart.sh; ./home/a*/*/bin/startAppNode.sh


So do you think its a good approach? or do I need to try differently to add newRelic agent in my custom buildpack written in java.

Thanks

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.