megaease/easeagent

Compatible with opentelemetry-java env configuration

observeralone opened this issue · 0 comments

Support for configuring easeagent.config.path, easeagent.name, easeagent.system, and other parameters using environment variables, with compatibility for the configuration format of the OpenTelemetry Java SDK(https://opentelemetry.io/docs/instrumentation/java/automatic/agent-config/)

The configuration priority follows the rules of Spring:

jvm properties > environment variables > env:EASEAGENT_ENV_CONFIG={} > default

JVM properties: If any configuration properties are set as JVM system properties, they take precedence over other configuration sources.
Environment variables: If configuration properties are defined as environment variables, they will be used if no corresponding JVM properties are set.
env:EASEAGENT_ENV_CONFIG={}: If the environment variable EASEAGENT_ENV_CONFIG is set, its value will be used as the configuration. This allows for overriding the configuration using a specific environment variable.
Default values: If no configuration is provided through the aforementioned sources, default values will be used.