Provide Environment Variable for setting `datadog.slf4j.simpleLogger.jsonEnabled` configuration
Library Name
No response
Library Version(s)
No response
Describe the feature you'd like
Provide the missing Environment Variable equivalent for setting datadog.slf4j.simpleLogger.jsonEnabled, see https://docs.datadoghq.com/tracing/trace_collection/library_config/java/#traces.
Is your feature request related to a problem?
No response
Describe alternatives you've considered
No response
Additional context
No response
Support ticket request #2370306.
We use env variable JDK_JAVA_OPTIONS with value -Ddatadog.slf4j.simpleLogger.jsonEnabled=true. But I would agree, having and env variable like almost all of the other agent config options have would be nice.
Hi! How are you doing? @florianmutter, @janjaali, I’d like to know if this issue has already been assigned to someone. I’d love to contribute :)
FYI, this is where it would be easiest to add such an environment variable: https://github.com/DataDog/dd-trace-java/blob/v1.56.1/dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/Agent.java#L1432
The recommended approach would be to query the environment variable and (if set) pass the value into the expected system property, like we do for the log level. That would avoid the need to change the logger internals.
Hi @brun0-4ugusto, the latest reply on the support ticket was that this feature request was provided to product team backlog and that they will decide when to prioritize it - and if it will be prioritized at all. Florians workaround helped us to overcome our issue for the moment as workaround.
@janjaali Nice! Thank you very much for the reply! If there’s any other issue I could contribute to, please let me know. I’m from Brazil and we use Datadog as our observability tool. I really like the platform and would love to contribute! Thank you so much.