|
2 | 2 |
|
3 | 3 | import static java.nio.charset.StandardCharsets.UTF_8;
|
4 | 4 |
|
5 |
| -import datadog.environment.ConfigHelper; |
6 | 5 | import datadog.trace.bootstrap.environment.JavaVirtualMachine;
|
7 | 6 | import datadog.trace.bootstrap.environment.SystemProperties;
|
8 | 7 | import de.thetaphi.forbiddenapis.SuppressForbidden;
|
|
44 | 43 | * <li>Do dot touch any logging facilities here so we can configure them later
|
45 | 44 | * </ul>
|
46 | 45 | */
|
| 46 | +@SuppressForbidden |
47 | 47 | public final class AgentBootstrap {
|
48 | 48 | static final String LIB_INJECTION_ENABLED_ENV_VAR = "DD_INJECTION_ENABLED";
|
49 | 49 | static final String LIB_INJECTION_FORCE_SYS_PROP = "dd.inject.force";
|
@@ -91,7 +91,7 @@ public static void agentmain(final String agentArgs, final Instrumentation inst)
|
91 | 91 | }
|
92 | 92 |
|
93 | 93 | private static BootstrapInitializationTelemetry createInitializationTelemetry() {
|
94 |
| - String forwarderPath = ConfigHelper.getEnvironmentVariable("DD_TELEMETRY_FORWARDER_PATH"); |
| 94 | + String forwarderPath = System.getenv("DD_TELEMETRY_FORWARDER_PATH"); |
95 | 95 | if (forwarderPath == null) {
|
96 | 96 | return BootstrapInitializationTelemetry.noOpInstance();
|
97 | 97 | }
|
@@ -161,12 +161,12 @@ private static void agentmainImpl(
|
161 | 161 | static boolean getConfig(String configName) {
|
162 | 162 | switch (configName) {
|
163 | 163 | case LIB_INJECTION_ENABLED_ENV_VAR:
|
164 |
| - return ConfigHelper.getEnvironmentVariable(LIB_INJECTION_ENABLED_ENV_VAR) != null; |
| 164 | + return System.getenv(LIB_INJECTION_ENABLED_ENV_VAR) != null; |
165 | 165 | case LIB_INJECTION_FORCE_SYS_PROP:
|
166 | 166 | {
|
167 | 167 | String envVarName =
|
168 | 168 | LIB_INJECTION_FORCE_SYS_PROP.replace('.', '_').replace('-', '_').toUpperCase();
|
169 |
| - String injectionForceFlag = ConfigHelper.getEnvironmentVariable(envVarName); |
| 169 | + String injectionForceFlag = System.getenv(envVarName); |
170 | 170 | if (injectionForceFlag == null) {
|
171 | 171 | injectionForceFlag = SystemProperties.get(LIB_INJECTION_FORCE_SYS_PROP);
|
172 | 172 | }
|
|
0 commit comments