pinpoint-apm / pinpoint

APM, (Application Performance Management) tool for large-scale distributed systems.
https://pinpoint-apm.gitbook.io/
Apache License 2.0
13.29k stars 3.75k forks source link

Request: read pinpoint config from JVM System properties or environment variables #2904

Open joshwand opened 7 years ago

joshwand commented 7 years ago

While working out config for my application (deployed using docker to AWS ECS), having to modify the pinpoint.config file and redeploy the image is very cumbersome. It'd be great to be able to set the various pinpoint config properties via environment variables or java System properties, e.g.:

java -Dpinpoint.profiler.include=com.mycompany.* -jar myapp.jar.

or, Spring-Boot-style:

PINPOINT_PROFILER_INCLUDE=com.mycompany.* java -jar myapp.jar

Would make tweaking configs in a cloud environment much more developer-friendly.

(incidentally there are no good docs on best practices for setting up how much to include in profiler.include.. I keep ending up with too much or too little)

Thanks!

Xylus commented 7 years ago

Hi @joshwand This has been in our todo list, but kept being pushed back. Might be a good idea to look into it. Thanks for the suggestion.

(pinging #2895)

emeroad commented 7 years ago

We recommend -Dpinpoint.config=$PINPOINT_CONFIG_PATH/custom_pinpoint.config

jiaqifeng commented 7 years ago

I modified the code to get the config from our cloud config repository. This is really a simple fix. The hardest part is there are no single solution for all environment.