Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename LLM_OBS consts to be more aligned with other languages
Browse files Browse the repository at this point in the history
gary-huang authored and mcculls committed Jan 7, 2025
1 parent d67719e commit a4c9c01
Showing 4 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -6,11 +6,11 @@
*/
public final class LlmObsConfig {

public static final String LLM_OBS_ENABLED = "llmobs.enabled";
public static final String LLMOBS_ENABLED = "llmobs.enabled";

public static final String LLM_OBS_ML_APP = "llmobs.ml.app";
public static final String LLMOBS_ML_APP = "llmobs.ml.app";

public static final String LLM_OBS_AGENTLESS_ENABLED = "llmobs.agentless.enabled";
public static final String LLMOBS_AGENTLESS_ENABLED = "llmobs.agentless.enabled";

private LlmObsConfig() {}
}
4 changes: 2 additions & 2 deletions internal-api/src/main/java/datadog/trace/api/Config.java
Original file line number Diff line number Diff line change
@@ -1341,8 +1341,8 @@ PROFILING_DATADOG_PROFILER_ENABLED, isDatadogProfilerSafeInCurrentEnvironment())
configProvider.getString(IAST_SECURITY_CONTROLS_CONFIGURATION, null);

llmObsAgentlessEnabled =
configProvider.getBoolean(LLM_OBS_AGENTLESS_ENABLED, DEFAULT_LLM_OBS_AGENTLESS_ENABLED);
llmObsMlApp = configProvider.getString(LLM_OBS_ML_APP);
configProvider.getBoolean(LLMOBS_AGENTLESS_ENABLED, DEFAULT_LLM_OBS_AGENTLESS_ENABLED);
llmObsMlApp = configProvider.getString(LLMOBS_ML_APP);

ciVisibilityTraceSanitationEnabled =
configProvider.getBoolean(CIVISIBILITY_TRACE_SANITATION_ENABLED, true);
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@
import static datadog.trace.api.config.GeneralConfig.TRACE_TRIAGE;
import static datadog.trace.api.config.GeneralConfig.TRIAGE_REPORT_TRIGGER;
import static datadog.trace.api.config.IastConfig.IAST_ENABLED;
import static datadog.trace.api.config.LlmObsConfig.LLM_OBS_ENABLED;
import static datadog.trace.api.config.LlmObsConfig.LLMOBS_ENABLED;
import static datadog.trace.api.config.ProfilingConfig.PROFILING_DIRECT_ALLOCATION_ENABLED;
import static datadog.trace.api.config.ProfilingConfig.PROFILING_DIRECT_ALLOCATION_ENABLED_DEFAULT;
import static datadog.trace.api.config.ProfilingConfig.PROFILING_ENABLED;
@@ -202,7 +202,7 @@ private InstrumenterConfig() {
iastFullyDisabled = iastEnabled != null && !iastEnabled;
usmEnabled = configProvider.getBoolean(USM_ENABLED, DEFAULT_USM_ENABLED);
telemetryEnabled = configProvider.getBoolean(TELEMETRY_ENABLED, DEFAULT_TELEMETRY_ENABLED);
llmObsEnabled = configProvider.getBoolean(LLM_OBS_ENABLED, DEFAULT_LLM_OBS_ENABLED);
llmObsEnabled = configProvider.getBoolean(LLMOBS_ENABLED, DEFAULT_LLM_OBS_ENABLED);
} else {
// disable these features in native-image
ciVisibilityEnabled = false;
26 changes: 13 additions & 13 deletions internal-api/src/test/groovy/datadog/trace/api/ConfigTest.groovy
Original file line number Diff line number Diff line change
@@ -63,9 +63,9 @@ import static datadog.trace.api.config.JmxFetchConfig.JMX_FETCH_REFRESH_BEANS_PE
import static datadog.trace.api.config.JmxFetchConfig.JMX_FETCH_STATSD_HOST
import static datadog.trace.api.config.JmxFetchConfig.JMX_FETCH_STATSD_PORT
import static datadog.trace.api.config.JmxFetchConfig.JMX_TAGS
import static datadog.trace.api.config.LlmObsConfig.LLM_OBS_AGENTLESS_ENABLED
import static datadog.trace.api.config.LlmObsConfig.LLM_OBS_ML_APP
import static datadog.trace.api.config.LlmObsConfig.LLM_OBS_ENABLED
import static datadog.trace.api.config.LlmObsConfig.LLMOBS_AGENTLESS_ENABLED
import static datadog.trace.api.config.LlmObsConfig.LLMOBS_ML_APP
import static datadog.trace.api.config.LlmObsConfig.LLMOBS_ENABLED
import static datadog.trace.api.config.ProfilingConfig.PROFILING_AGENTLESS
import static datadog.trace.api.config.ProfilingConfig.PROFILING_API_KEY_FILE_OLD
import static datadog.trace.api.config.ProfilingConfig.PROFILING_API_KEY_FILE_VERY_OLD
@@ -2217,7 +2217,7 @@ class ConfigTest extends DDSpecification {
def "config instantiation should fail if llm obs is enabled via sys prop and ml app is not set"() {
setup:
Properties properties = new Properties()
properties.setProperty(LLM_OBS_ENABLED, "true")
properties.setProperty(LLMOBS_ENABLED, "true")

when:
new Config(ConfigProvider.withPropertiesOverride(properties))
@@ -2241,9 +2241,9 @@ class ConfigTest extends DDSpecification {
def "config instantiation should NOT fail if llm obs is enabled (agentless disabled) via sys prop and ml app is set"() {
setup:
Properties properties = new Properties()
properties.setProperty(LLM_OBS_ENABLED, "true")
properties.setProperty(LLM_OBS_AGENTLESS_ENABLED, "false")
properties.setProperty(LLM_OBS_ML_APP, "test-ml-app")
properties.setProperty(LLMOBS_ENABLED, "true")
properties.setProperty(LLMOBS_AGENTLESS_ENABLED, "false")
properties.setProperty(LLMOBS_ML_APP, "test-ml-app")
when:
def config = new Config(ConfigProvider.withPropertiesOverride(properties))
@@ -2273,9 +2273,9 @@ class ConfigTest extends DDSpecification {
def "config instantiation should fail if llm obs is in agentless mode via sys prop and API key is not set"() {
setup:
Properties properties = new Properties()
properties.setProperty(LLM_OBS_ENABLED, "true")
properties.setProperty(LLM_OBS_AGENTLESS_ENABLED, "true")
properties.setProperty(LLM_OBS_ML_APP, "test-ml-app")
properties.setProperty(LLMOBS_ENABLED, "true")
properties.setProperty(LLMOBS_AGENTLESS_ENABLED, "true")
properties.setProperty(LLMOBS_ML_APP, "test-ml-app")
when:
new Config(ConfigProvider.withPropertiesOverride(properties))
@@ -2300,9 +2300,9 @@ class ConfigTest extends DDSpecification {
def "config instantiation should NOT fail if llm obs is enabled (agentless enabled) and API key & ml app are set via sys prop"() {
setup:
Properties properties = new Properties()
properties.setProperty(LLM_OBS_ENABLED, "true")
properties.setProperty(LLM_OBS_AGENTLESS_ENABLED, "true")
properties.setProperty(LLM_OBS_ML_APP, "test-ml-app")
properties.setProperty(LLMOBS_ENABLED, "true")
properties.setProperty(LLMOBS_AGENTLESS_ENABLED, "true")
properties.setProperty(LLMOBS_ML_APP, "test-ml-app")
properties.setProperty(API_KEY, "123456789")
when:

0 comments on commit a4c9c01

Please sign in to comment.