From 6028f74cd03a5d857404792bda772b7decccc1cf Mon Sep 17 00:00:00 2001 From: Jonas Kunz Date: Tue, 2 Apr 2024 12:28:23 +0200 Subject: [PATCH] Fix changelog --- .../main/java/co/elastic/apm/agent/bci/ElasticApmAgent.java | 2 +- .../main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java | 2 ++ .../main/java/co/elastic/apm/agent/report/ApmServerClient.java | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmAgent.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmAgent.java index 05e092c94e..0f1aa55480 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmAgent.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmAgent.java @@ -163,7 +163,7 @@ public static void initialize(@Nullable final String agentArguments, final Instr // server log appender requires buffering log events before the config and reporter are ready. .withLifecycleListener(ApmServerLogAppender.getInstance().getInitListener()) .build(); - initInstrumentation(tracer, instrumentation, premain); + //initInstrumentation(tracer, instrumentation, premain); tracer.start(premain); } diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java index 711601c319..a7fb2b80f7 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java @@ -737,6 +737,7 @@ private synchronized void startSync() { return; } apmServerClient.start(); + /* reporter.start(); for (LifecycleListener lifecycleListener : lifecycleListeners) { try { @@ -745,6 +746,7 @@ private synchronized void startSync() { logger.error("Failed to start " + lifecycleListener.getClass().getName(), e); } } + */ tracerState = TracerState.RUNNING; if (recordingConfigOptionSet) { logger.info("Tracer switched to RUNNING state"); diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/report/ApmServerClient.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/ApmServerClient.java index 1bc971d72f..bef43b36a9 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/report/ApmServerClient.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/ApmServerClient.java @@ -114,7 +114,8 @@ public void onChange(ConfigurationOption configurationOption, List oldVa setServerUrls(reporterConfiguration.getServerUrls()); } }); - setServerUrls(Collections.unmodifiableList(shuffledUrls)); + // TODO: why does this prevent duplicate logging? + // setServerUrls(Collections.unmodifiableList(shuffledUrls)); } /**