Cannot properly configure exporter args map with environment variable #4724
Labels
kind/bug
Categorizes an issue or PR as a bug
scope/broker
Marks an issue or PR to appear in the broker section of the changelog
Describe the bug
There's an issue when instantiating an exporter configuration bean and expecting it to be resolved using environment variables.
Spring, when given the environment variable ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_INDEX_IGNOREVARIABLESABOVE, will create an args map with the following keys:
However, when we use Gson to instantiate the bean, it fails, since the property is called
ignoreVariablesAbove
, and Gson will map it with case sensitivity.This is unexpected from a user point of view, as for all other normal settings the above work in a case insensitive manner.
The workaround at the moment is to set it as a system property via
JAVA_OPTS
, toexport JAVA_OPTS="${JAVA_OPTS} -Dzeebe.broker.exporters.elasticsearch.args.index.ignoreVariablesAbove=..."
, which preserves the camel case.To Reproduce
Try to configure the
ignoreVariablesAbove
property of theElasticsearchExporterConfiguration
usingZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_INDEX_IGNOREVARIABLESABOVE
, and it will fail.Expected behavior
Exporter configuration bean instantiation works the same as the rest of Zeebe's configuration.
Log/Stacktrace
Not applicable
Environment:
The text was updated successfully, but these errors were encountered: