grafana / pyroscope-java

pyroscope java integration
Apache License 2.0
75 stars 32 forks source link

Support configuration using system properties #32

Closed pvid closed 2 years ago

pvid commented 2 years ago

It is more convenient to use system properties for configuration.

OpenTelemetry for example allows to use both properties and env variables for configuration, with properties taking precedence, see their implementation.

netamego commented 2 years ago

+1000 :)

I totally agree. It is a very necessary option especially when you profile WebLogic application servers where it is difficult to use environment variables for each java process. It is a headache to use environment variables to configure pyroscope in WebLogic environments. https://stackoverflow.com/questions/23620163/best-way-to-set-environmental-variables-in-weblogic-startup

Thanks a lot @abeaumont . You are doing fast and amazing work.

korniltsev commented 2 years ago

We've implemented configuration with properties in v0.9.0. You can now specify pyroscope configuration:

Also pyroscope.properties can be changed to arbitrary location with PYROSCOPE_CONFIGURATION_FILE or pyroscope.configuration property