From e1f89297b22c831782af7e73f3d9d6283fec4369 Mon Sep 17 00:00:00 2001 From: Luca Belluccini Date: Tue, 17 Sep 2024 15:40:08 +0200 Subject: [PATCH] [DOCS] Clarify the frequency of config polling (#3799) --------- Co-authored-by: Jonas Kunz --- .../agent/configuration/CoreConfigurationImpl.java | 11 +++++++++-- docs/configuration.asciidoc | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfigurationImpl.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfigurationImpl.java index 7c42ebc23e..3f9b0f504c 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfigurationImpl.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfigurationImpl.java @@ -25,7 +25,13 @@ import co.elastic.apm.agent.matcher.MethodMatcherValueConverter; import co.elastic.apm.agent.sdk.logging.Logger; import co.elastic.apm.agent.sdk.logging.LoggerFactory; -import co.elastic.apm.agent.tracer.configuration.*; +import co.elastic.apm.agent.tracer.configuration.CoreConfiguration; +import co.elastic.apm.agent.tracer.configuration.ListValueConverter; +import co.elastic.apm.agent.tracer.configuration.RegexValidator; +import co.elastic.apm.agent.tracer.configuration.RoundedDoubleConverter; +import co.elastic.apm.agent.tracer.configuration.TimeDuration; +import co.elastic.apm.agent.tracer.configuration.TimeDurationValueConverter; +import co.elastic.apm.agent.tracer.configuration.WildcardMatcherValueConverter; import org.stagemonitor.configuration.ConfigurationOption; import org.stagemonitor.configuration.ConfigurationOptionProvider; import org.stagemonitor.configuration.converter.AbstractValueConverter; @@ -696,7 +702,8 @@ public String toSafeString(List value) { .key("central_config") .tags("added[1.8.0]") .configurationCategory(CORE_CATEGORY) - .description("When enabled, the agent will make periodic requests to the APM Server to fetch updated configuration.") + .description("When enabled, the agent will make periodic requests to the APM Server to fetch updated configuration.\n" + + "The frequency of the periodic request is driven by the `Cache-Control` header returned from APM Server/Integration, falling back to 5 minutes if not defined.") .dynamic(true) .buildWithDefault(true); diff --git a/docs/configuration.asciidoc b/docs/configuration.asciidoc index 6ff4717594..17f6cf818e 100644 --- a/docs/configuration.asciidoc +++ b/docs/configuration.asciidoc @@ -1271,6 +1271,7 @@ Example: `0ms`. ==== `central_config` (added[1.8.0]) When enabled, the agent will make periodic requests to the APM Server to fetch updated configuration. +The frequency of the periodic request is driven by the `Cache-Control` header returned from APM Server/Integration, falling back to 5 minutes if not defined. <> @@ -4087,6 +4088,7 @@ Example: `5ms`. # trace_methods_duration_threshold=0ms # When enabled, the agent will make periodic requests to the APM Server to fetch updated configuration. +# The frequency of the periodic request is driven by the `Cache-Control` header returned from APM Server/Integration, falling back to 5 minutes if not defined. # # This setting can be changed at runtime # Type: Boolean