diff --git a/CHANGES.md b/CHANGES.md index 9f921926c9..6ed0bacb7a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,10 +1,17 @@ - Changes by Version ================== Release Notes. 8.10.0 ------------------ + +* [Important] Namespace represents a subnet, such as kubernetes namespace, or 172.10.*.*. Make namespace concept as a + part of service naming format. +* [Important] Add cluster concept, also as a part of service naming format. The cluster name would be + 1. Add as {@link #SERVICE_NAME} suffix. + 2. Add as exit span's peer, ${CLUSTER} / original peer + 3. Cross Process Propagation Header's value addressUsedAtClient[index=8] (Target address of this request used on the + client end). * Support Undertow thread pool metrics collecting. * Support Tomcat thread pool metric collect. * Remove plugin for ServiceComb Java Chassis 0.x @@ -21,10 +28,17 @@ Release Notes. * Renamed graphql-12.x-plugin to graphql-12.x-15.x-plugin and graphql-12.x-scenario to graphql-12.x-15.x-scenario. * Add graphql-16plus plugin. * [Test] Support to configure plugin test base images. +* [Breaking Change] Remove deprecated `agent.instance_properties` configuration. + Recommend `agent.instance_properties_json`. +* The namespace and cluster would be reported as instance properties, keys are `namespace` and `cluster`. Notice, if + instance_properties_json includes these two keys, they would be overrided by the agent core. +* [Breaking Change] Remove the namespace from `cross process propagation` key. #### Documentation -* Add link about java agent injector. +* Add link about java agent injector. +* Update configurations doc, remove `agent.instance_properties[key]=value`. +* Update configurations doc, add `agent.cluster` and update `agent.namespace`. All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/120?closed=1) diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/Config.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/Config.java index 46e109b8b2..d9a191f427 100755 --- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/Config.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/Config.java @@ -19,9 +19,7 @@ package org.apache.skywalking.apm.agent.core.conf; import java.util.Arrays; -import java.util.HashMap; import java.util.List; -import java.util.Map; import org.apache.skywalking.apm.agent.core.context.trace.TraceSegment; import org.apache.skywalking.apm.agent.core.logging.core.LogLevel; import org.apache.skywalking.apm.agent.core.logging.core.LogOutput; @@ -37,17 +35,46 @@ public class Config { public static class Agent { /** - * Namespace isolates headers in cross process propagation. The HEADER name will be `HeaderName:Namespace`. + * Namespace represents a subnet, such as kubernetes namespace, or 172.10.*.*. + * + * @since 8.10.0 namespace would be added as {@link #SERVICE_NAME} suffix. + * + * Removed namespace isolating headers in cross process propagation. The HEADER name was + * `HeaderName:Namespace`. */ + @Length(20) public static String NAMESPACE = ""; /** - * Service name is showed in skywalking-ui. Suggestion: set a unique name for each service, service instance - * nodes share the same code + * Service name is showed on the UI. Suggestion: set a unique name for each service, service instance nodes + * share the same code + * + * @since 8.10.0 ${service name} = [${group name}::]${logic name}|${NAMESPACE}|${CLUSTER} + * + * The group name, namespace and cluster are optional. Once they are all blank, service name would be the final + * name. */ @Length(50) public static String SERVICE_NAME = ""; + /** + * Cluster defines the physical cluster in a data center or same network segment. In one cluster, IP address + * should be unique identify. + * + * The cluster name would be + * + * 1. Add as {@link #SERVICE_NAME} suffix. + * + * 2. Add as exit span's peer, ${CLUSTER} / original peer + * + * 3. Cross Process Propagation Header's value addressUsedAtClient[index=8] (Target address of this request used + * on the client end). + * + * @since 8.10.0 + */ + @Length(20) + public static String CLUSTER = ""; + /** * Authentication active is based on backend setting, see application.yml for more details. For most scenarios, * this needs backend extensions, only basic match auth provided in default implementation. @@ -61,8 +88,8 @@ public static class Agent { public static int SAMPLE_N_PER_3_SECS = -1; /** - * If the operation name of the first span is included in this set, this segment should be ignored. - * Multiple values should be separated by `,`. + * If the operation name of the first span is included in this set, this segment should be ignored. Multiple + * values should be separated by `,`. */ public static String IGNORE_SUFFIX = ".jpg,.jpeg,.js,.css,.png,.bmp,.gif,.ico,.mp3,.mp4,.html,.svg"; @@ -103,16 +130,8 @@ public static class Agent { public volatile static String INSTANCE_NAME = ""; /** - * service instance properties e.g. agent.instance_properties[org]=apache - * Notice it will be overridden by `agent.instance_properties_json `, if the key duplication. - * For example: e.g. agent.instance_properties_json = {"org": "apache-skywalking"} - */ - @Deprecated - public static Map INSTANCE_PROPERTIES = new HashMap<>(); - - /** - * service instance properties in json format. - * e.g. agent.instance_properties_json = {"org": "apache-skywalking"} + * service instance properties in json format. e.g. agent.instance_properties_json = {"org": + * "apache-skywalking"} */ public static String INSTANCE_PROPERTIES_JSON = ""; diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/Constants.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/Constants.java index 4e3bcf4c9e..3c0d1f35a9 100644 --- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/Constants.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/Constants.java @@ -24,4 +24,6 @@ public class Constants { public static String LINE_SEPARATOR = System.getProperty("line.separator", "\n"); public static String EMPTY_STRING = ""; + + public static char SERVICE_NAME_PART_CONNECTOR = '|'; } diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/SnifferConfigInitializer.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/SnifferConfigInitializer.java index 7eb1809a64..0aa984dc0e 100644 --- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/SnifferConfigInitializer.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/SnifferConfigInitializer.java @@ -38,6 +38,8 @@ import org.apache.skywalking.apm.util.PropertyPlaceholderHelper; import org.apache.skywalking.apm.util.StringUtil; +import static org.apache.skywalking.apm.agent.core.conf.Constants.SERVICE_NAME_PART_CONNECTOR; + /** * The SnifferConfigInitializer initializes all configs in several way. */ @@ -98,6 +100,15 @@ public static void initializeCoreConfig(String agentOptions) { if (StringUtil.isEmpty(Config.Agent.SERVICE_NAME)) { throw new ExceptionInInitializerError("`agent.service_name` is missing."); + } else { + if (StringUtil.isNotEmpty(Config.Agent.NAMESPACE) || StringUtil.isNotEmpty(Config.Agent.CLUSTER)) { + Config.Agent.SERVICE_NAME = StringUtil.join( + SERVICE_NAME_PART_CONNECTOR, + Config.Agent.SERVICE_NAME, + Config.Agent.NAMESPACE, + Config.Agent.CLUSTER + ); + } } if (StringUtil.isEmpty(Config.Collector.BACKEND_SERVICE)) { throw new ExceptionInInitializerError("`collector.backend_service` is missing."); diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/CarrierItem.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/CarrierItem.java index bc1c1d2e1d..7702972849 100644 --- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/CarrierItem.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/CarrierItem.java @@ -19,9 +19,6 @@ package org.apache.skywalking.apm.agent.core.context; import java.util.Iterator; -import org.apache.skywalking.apm.util.StringUtil; - -import static org.apache.skywalking.apm.agent.core.conf.Config.Agent.NAMESPACE; public class CarrierItem implements Iterator { private String headKey; @@ -33,11 +30,7 @@ public CarrierItem(String headKey, String headValue) { } public CarrierItem(String headKey, String headValue, CarrierItem next) { - if (StringUtil.isEmpty(NAMESPACE)) { - this.headKey = headKey; - } else { - this.headKey = NAMESPACE + "-" + headKey; - } + this.headKey = headKey; this.headValue = headValue; this.next = next; } diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/TracingContext.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/TracingContext.java index bb9f28f40f..ec9c4e1820 100644 --- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/TracingContext.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/TracingContext.java @@ -45,6 +45,8 @@ import org.apache.skywalking.apm.agent.core.profile.ProfileTaskExecutionService; import org.apache.skywalking.apm.util.StringUtil; +import static org.apache.skywalking.apm.agent.core.conf.Config.Agent.CLUSTER; + /** * The TracingContext represents a core tracing logic controller. It build the final {@link * TracingContext}, by the stack mechanism, which is similar with the codes work. @@ -322,7 +324,7 @@ public AbstractSpan createLocalSpan(final String operationName) { * @see ExitSpan */ @Override - public AbstractSpan createExitSpan(final String operationName, final String remotePeer) { + public AbstractSpan createExitSpan(final String operationName, String remotePeer) { if (isLimitMechanismWorking()) { NoopExitSpan span = new NoopExitSpan(remotePeer); return push(span); @@ -334,6 +336,8 @@ public AbstractSpan createExitSpan(final String operationName, final String remo if (parentSpan != null && parentSpan.isExit()) { exitSpan = parentSpan; } else { + // Since 8.10.0 + remotePeer = StringUtil.isEmpty(CLUSTER) ? remotePeer : CLUSTER + "/" + remotePeer; final int parentSpanId = parentSpan == null ? -1 : parentSpan.getSpanId(); exitSpan = new ExitSpan(spanIdGenerator++, parentSpanId, operationName, remotePeer, owner); push(exitSpan); diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/util/InstanceJsonPropertiesUtil.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/util/InstanceJsonPropertiesUtil.java index 7862a53c4f..498aa81fc8 100644 --- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/util/InstanceJsonPropertiesUtil.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/util/InstanceJsonPropertiesUtil.java @@ -34,18 +34,18 @@ public static List parseProperties() { List properties = new ArrayList<>(); if (StringUtil.isNotEmpty(Config.Agent.INSTANCE_PROPERTIES_JSON)) { - Config.Agent.INSTANCE_PROPERTIES.putAll( - GSON.fromJson( - Config.Agent.INSTANCE_PROPERTIES_JSON, - new TypeToken>() { - }.getType() - )); + Map json = GSON.fromJson( + Config.Agent.INSTANCE_PROPERTIES_JSON, + new TypeToken>() { + }.getType() + ); + json.forEach( + (key, val) -> properties.add(KeyStringValuePair.newBuilder().setKey(key).setValue(val).build())); } - Config.Agent.INSTANCE_PROPERTIES.forEach((key, val) -> properties.add(KeyStringValuePair.newBuilder() - .setKey(key) - .setValue(val) - .build())); + properties.add(KeyStringValuePair.newBuilder().setKey("namespace").setValue(Config.Agent.NAMESPACE).build()); + properties.add(KeyStringValuePair.newBuilder().setKey("cluster").setValue(Config.Agent.NAMESPACE).build()); + return properties; } } diff --git a/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/conf/SnifferConfigInitializerTest.java b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/conf/SnifferConfigInitializerTest.java index 53061181c2..5bba30e2e3 100644 --- a/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/conf/SnifferConfigInitializerTest.java +++ b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/conf/SnifferConfigInitializerTest.java @@ -18,6 +18,8 @@ package org.apache.skywalking.apm.agent.core.conf; +import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; import java.util.Iterator; import java.util.Map; import java.util.Properties; @@ -40,8 +42,12 @@ public class SnifferConfigInitializerTest { * variables are reverted after the test. */ @Rule - public final EnvironmentVariables environmentVariables = new EnvironmentVariables().set("AGENT_SERVICE_NAME", "testAppFromSystemEnv") - .set("AGENT_COLLECTOR_SERVER", "localhost:11111"); + public final EnvironmentVariables environmentVariables = new EnvironmentVariables().set( + "AGENT_SERVICE_NAME", "testAppFromSystemEnv") + .set( + "AGENT_COLLECTOR_SERVER", + "localhost:11111" + ); @Test public void testLoadConfigFromJavaAgentDir() throws AgentPackageNotFoundException, ConfigNotFoundException { @@ -66,7 +72,7 @@ public void testLoadConfigFromAgentOptions() throws AgentPackageNotFoundExceptio @Test public void testConfigOverriding() throws AgentPackageNotFoundException, ConfigNotFoundException { System.setProperty("skywalking.agent.service_name", "testAppFromSystem"); - System.setProperty("skywalking.agent.instance_properties[key1]", "value1"); + System.setProperty("skywalking.agent.instance_properties_json", "{\"key1\": \"value1\", \"key2\": \"value2\"}"); System.setProperty("skywalking.agent.instance_properties[key2]", "value2"); System.setProperty("skywalking.collector.backend_service", "127.0.0.1:8090"); String agentOptions = "agent.service_name=testAppFromAgentOptions,logging.level=debug"; @@ -74,8 +80,13 @@ public void testConfigOverriding() throws AgentPackageNotFoundException, ConfigN assertThat(Config.Agent.SERVICE_NAME, is("testAppFromAgentOptions")); assertThat(Config.Collector.BACKEND_SERVICE, is("127.0.0.1:8090")); assertThat(Config.Logging.LEVEL, is(LogLevel.DEBUG)); - assertThat(Config.Agent.INSTANCE_PROPERTIES.get("key1"), is("value1")); - assertThat(Config.Agent.INSTANCE_PROPERTIES.get("key2"), is("value2")); + Map json = new Gson().fromJson( + Config.Agent.INSTANCE_PROPERTIES_JSON, + new TypeToken>() { + }.getType() + ); + assertThat(json.get("key1"), is("value1")); + assertThat(json.get("key2"), is("value2")); } @Test @@ -85,8 +96,14 @@ public void testConfigOverridingFromSystemEnv() throws IllegalAccessException { properties.put("collector.backend_service", "${AGENT_COLLECTOR_SERVER:127.0.0.1:8090}"); properties.put("logging.level", "INFO"); PropertyPlaceholderHelper placeholderHelper = PropertyPlaceholderHelper.INSTANCE; - properties.put("agent.service_name", placeholderHelper.replacePlaceholders((String) properties.get("agent.service_name"), properties)); - properties.put("collector.backend_service", placeholderHelper.replacePlaceholders((String) properties.get("collector.backend_service"), properties)); + properties.put( + "agent.service_name", + placeholderHelper.replacePlaceholders((String) properties.get("agent.service_name"), properties) + ); + properties.put( + "collector.backend_service", + placeholderHelper.replacePlaceholders((String) properties.get("collector.backend_service"), properties) + ); ConfigInitializer.initialize(properties, Config.class); assertThat(Config.Agent.SERVICE_NAME, is("testAppFromSystemEnv")); assertThat(Config.Collector.BACKEND_SERVICE, is("localhost:11111")); diff --git a/apm-sniffer/config/agent.config b/apm-sniffer/config/agent.config index 6ff015275d..08b54f6334 100755 --- a/apm-sniffer/config/agent.config +++ b/apm-sniffer/config/agent.config @@ -14,11 +14,16 @@ # See the License for the specific language governing permissions and # limitations under the License. +# The service name in UI +# ${service name} = [${group name}::]${logic name} +# The group name is optional only. +agent.service_name=${SW_AGENT_NAME:Your_ApplicationName} + # The agent namespace agent.namespace=${SW_AGENT_NAMESPACE:} -# The service name in UI -agent.service_name=${SW_AGENT_NAME:Your_ApplicationName} +# The agent cluster +agent.cluster=${SW_AGENT_CLUSTER:} # The number of sampled traces per 3 seconds # Negative or zero means off, by default @@ -54,6 +59,7 @@ agent.class_cache_mode=${SW_AGENT_CLASS_CACHE_MODE:MEMORY} # generate an 32-bit uuid. BY Default, SkyWalking uses UUID@hostname as the instance name. Max length is 50(UTF-8 char) agent.instance_name=${SW_AGENT_INSTANCE_NAME:} +# service instance properties in json format. e.g. agent.instance_properties_json = {"org": "apache-skywalking"} agent.instance_properties_json=${SW_INSTANCE_PROPERTIES_JSON:} # How depth the agent goes, when log all cause exceptions. diff --git a/docs/en/setup/service-agent/java-agent/configurations.md b/docs/en/setup/service-agent/java-agent/configurations.md index 4db9f277a0..e85614ff1c 100644 --- a/docs/en/setup/service-agent/java-agent/configurations.md +++ b/docs/en/setup/service-agent/java-agent/configurations.md @@ -1,116 +1,115 @@ # Table of Agent Configuration Properties This is the properties list supported in `agent/config/agent.config`. -property key | Description | **System Environment Variable** | Default ------------ | ---------- | --------- | --------- -`agent.namespace` | Namespace isolates headers in cross process propagation. The HEADER name will be `HeaderName:Namespace`. | SW_AGENT_NAMESPACE | Not set -`agent.service_name` | The service name to represent a logic group providing the same capabilities/logic. Suggestion: set a unique name for every logic service group, service instance nodes share the same code, Max length is 50(UTF-8 char). Optional, once `service_name` follows `::` format, OAP server assigns the group name to the service metadata.| SW_AGENT_NAME | `Your_ApplicationName` -`agent.sample_n_per_3_secs`|Negative or zero means off, by default.SAMPLE_N_PER_3_SECS means sampling N TraceSegment in 3 seconds tops.|SW_AGENT_SAMPLE|Not set -`agent.authentication`|Authentication active is based on backend setting, see application.yml for more details.For most scenarios, this needs backend extensions, only basic match auth provided in default implementation.|SW_AGENT_AUTHENTICATION|Not set -`agent.trace_segment_ref_limit_per_span`|The max number of TraceSegmentRef in a single span to keep memory cost estimatable.|SW_TRACE_SEGMENT_LIMIT |500 -`agent.span_limit_per_segment`|The max number of spans in a single segment. Through this config item, SkyWalking keep your application memory cost estimated.|SW_AGENT_SPAN_LIMIT |300 -`agent.ignore_suffix`|If the operation name of the first span is included in this set, this segment should be ignored.|SW_AGENT_IGNORE_SUFFIX|Not set -`agent.is_open_debugging_class`|If true, skywalking agent will save all instrumented classes files in `/debugging` folder. SkyWalking team may ask for these files in order to resolve compatible problem.|SW_AGENT_OPEN_DEBUG|Not set -`agent.is_cache_enhanced_class`|If true, SkyWalking agent will cache all instrumented classes files to memory or disk files (decided by class cache mode), allow another java agent to enhance those classes that enhanced by SkyWalking agent. To use some Java diagnostic tools (such as BTrace, Arthas) to diagnose applications or add a custom java agent to enhance classes, you need to enable this feature. |SW_AGENT_CACHE_CLASS|`false` -`agent.class_cache_mode`|The instrumented classes cache mode: `MEMORY` or `FILE`. `MEMORY`: cache class bytes to memory, if instrumented classes is too many or too large, it may take up more memory. `FILE`: cache class bytes in `/class-cache` folder, automatically clean up cached class files when the application exits.|SW_AGENT_CLASS_CACHE_MODE|`MEMORY` -`agent.instance_name` |Instance name is the identity of an instance, should be unique in the service. If empty, SkyWalking agent will generate an 32-bit uuid. Default, use `UUID`@`hostname` as the instance name. Max length is 50(UTF-8 char)|SW_AGENT_INSTANCE_NAME|`""` -`agent.instance_properties[key]=value` | Add service instance custom properties. Notice it could be overridden by `agent.instance_properties_json `, if the key duplication. | | Not set -`agent.instance_properties_json={"key":"value"}` | Add service instance custom properties in json format. | SW_INSTANCE_PROPERTIES_JSON | Not set -`agent.cause_exception_depth`|How depth the agent goes, when log all cause exceptions.|SW_AGENT_CAUSE_EXCEPTION_DEPTH|`5` -`agent.force_reconnection_period `|Force reconnection period of grpc, based on grpc_channel_check_interval.|SW_AGENT_FORCE_RECONNECTION_PERIOD|`1` -`agent.operation_name_threshold `|The operationName max length, setting this value > 190 is not recommended.|SW_AGENT_OPERATION_NAME_THRESHOLD|`150` -`agent.keep_tracing`|Keep tracing even the backend is not available if this value is `true`.|SW_AGENT_KEEP_TRACING|`false` -`agent.force_tls`|Force open TLS for gRPC channel if this value is `true`.|SW_AGENT_FORCE_TLS|`false` -`agent.ssl_trusted_ca_path` | gRPC SSL trusted ca file. | SW_AGENT_SSL_TRUSTED_CA_PATH | `/ca/ca.crt` -`agent.ssl_key_path`| The private key file. Enable mTLS when ssl_key_path and ssl_cert_chain_path exist. | SW_AGENT_SSL_KEY_PATH | `""` -`agent.ssl_cert_chain_path`| The certificate file. Enable mTLS when ssl_key_path and ssl_cert_chain_path exist. | SW_AGENT_SSL_CERT_CHAIN_PATH | `""` -`osinfo.ipv4_list_size`| Limit the length of the ipv4 list size. |SW_AGENT_OSINFO_IPV4_LIST_SIZE|`10` -`collector.grpc_channel_check_interval`|grpc channel status check interval.|SW_AGENT_COLLECTOR_GRPC_CHANNEL_CHECK_INTERVAL|`30` -`collector.heartbeat_period`|agent heartbeat report period. Unit, second.|SW_AGENT_COLLECTOR_HEARTBEAT_PERIOD|`30` -`collector.properties_report_period_factor`|The agent sends the instance properties to the backend every `collector.heartbeat_period * collector.properties_report_period_factor` seconds |SW_AGENT_COLLECTOR_PROPERTIES_REPORT_PERIOD_FACTOR|`10` -`collector.backend_service`|Collector SkyWalking trace receiver service addresses.|SW_AGENT_COLLECTOR_BACKEND_SERVICES|`127.0.0.1:11800` -`collector.grpc_upstream_timeout`|How long grpc client will timeout in sending data to upstream. Unit is second.|SW_AGENT_COLLECTOR_GRPC_UPSTREAM_TIMEOUT|`30` seconds -`collector.get_profile_task_interval`|Sniffer get profile task list interval.|SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL|`20` -`collector.get_agent_dynamic_config_interval`|Sniffer get agent dynamic config interval|SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL|`20` -`collector.is_resolve_dns_periodically`|If true, skywalking agent will enable periodically resolving DNS to update receiver service addresses.|SW_AGENT_COLLECTOR_IS_RESOLVE_DNS_PERIODICALLY|`false` -`logging.level`|Log level: TRACE, DEBUG, INFO, WARN, ERROR, OFF. Default is info.|SW_LOGGING_LEVEL|`INFO` -`logging.file_name`|Log file name.|SW_LOGGING_FILE_NAME|`skywalking-api.log` -`logging.output`| Log output. Default is FILE. Use CONSOLE means output to stdout. |SW_LOGGING_OUTPUT|`FILE` -`logging.dir`|Log files directory. Default is blank string, means, use "{theSkywalkingAgentJarDir}/logs " to output logs. {theSkywalkingAgentJarDir} is the directory where the skywalking agent jar file is located |SW_LOGGING_DIR|`""` -`logging.resolver`|Logger resolver: `PATTERN` or `JSON`. The default is `PATTERN`, which uses `logging.pattern` to print traditional text logs. `JSON` resolver prints logs in JSON format. |SW_LOGGING_RESOLVER|`PATTERN` -`logging.pattern `|Logging format. There are all conversion specifiers:
  * `%level` means log level.
  * `%timestamp` means now of time with format `yyyy-MM-dd HH:mm:ss:SSS`.
  * `%thread` means name of current thread.
  * `%msg` means some message which user logged.
  * `%class` means SimpleName of TargetClass.
  * `%throwable` means a throwable which user called.
  * `%agent_name` means `agent.service_name`. Only apply to the `PatternLogger`. |SW_LOGGING_PATTERN|`%level %timestamp %thread %class : %msg %throwable` -`logging.max_file_size`|The max size of log file. If the size is bigger than this, archive the current file, and write into a new file.|SW_LOGGING_MAX_FILE_SIZE|`300 * 1024 * 1024` -`logging.max_history_files`|The max history log files. When rollover happened, if log files exceed this number,then the oldest file will be delete. Negative or zero means off, by default.|SW_LOGGING_MAX_HISTORY_FILES|`-1` -`statuscheck.ignored_exceptions`|Listed exceptions would not be treated as an error. Because in some codes, the exception is being used as a way of controlling business flow.|SW_STATUSCHECK_IGNORED_EXCEPTIONS|`""` -`statuscheck.max_recursive_depth`|The max recursive depth when checking the exception traced by the agent. Typically, we don't recommend setting this more than 10, which could cause a performance issue. Negative value and 0 would be ignored, which means all exceptions would make the span tagged in error status.|SW_STATUSCHECK_MAX_RECURSIVE_DEPTH|`1` -`correlation.element_max_number`|Max element count in the correlation context.|SW_CORRELATION_ELEMENT_MAX_NUMBER|3 -`correlation.value_max_length`|Max value length of each element.|SW_CORRELATION_VALUE_MAX_LENGTH|`128` -`correlation.auto_tag_keys`|Tag the span by the key/value in the correlation context, when the keys listed here exist.|SW_CORRELATION_AUTO_TAG_KEYS|`""` -`jvm.buffer_size`|The buffer size of collected JVM info.|SW_JVM_BUFFER_SIZE|`60 * 10` -`buffer.channel_size`|The buffer channel size.|SW_BUFFER_CHANNEL_SIZE|`5` -`buffer.buffer_size`|The buffer size.|SW_BUFFER_BUFFER_SIZE|`300` -`profile.active`|If true, skywalking agent will enable profile when user create a new profile task. Otherwise disable profile.|SW_AGENT_PROFILE_ACTIVE|`true` -`profile.max_parallel`|Parallel monitor segment count|SW_AGENT_PROFILE_MAX_PARALLEL|`5` -`profile.duration`|Max monitor segment time(minutes), if current segment monitor time out of limit, then stop it.|SW_AGENT_PROFILE_DURATION|`10` -`profile.dump_max_stack_depth`|Max dump thread stack depth|SW_AGENT_PROFILE_DUMP_MAX_STACK_DEPTH|`500` -`profile.snapshot_transport_buffer_size`|Snapshot transport to backend buffer size|SW_AGENT_PROFILE_SNAPSHOT_TRANSPORT_BUFFER_SIZE|`4500` -`meter.active`|If true, the agent collects and reports metrics to the backend.|SW_METER_ACTIVE|`true` -`meter.report_interval`|Report meters interval. The unit is second|SW_METER_REPORT_INTERVAL|`20` -`meter.max_meter_size`| Max size of the meter pool |SW_METER_MAX_METER_SIZE|`500` -`log.max_message_size`| The max size of message to send to server.Default is 10 MB. |SW_GRPC_LOG_MAX_MESSAGE_SIZE|`10485760` -`plugin.mount` | Mount the specific folders of the plugins. Plugins in mounted folders would work. | SW_MOUNT_FOLDERS | `plugins,activations` -`plugin.peer_max_length `|Peer maximum description limit.|SW_PLUGIN_PEER_MAX_LENGTH|`200` -`plugin.exclude_plugins `|Exclude some plugins define in plugins dir.Plugin names is defined in [Agent plugin list](Plugin-list.md)|SW_EXCLUDE_PLUGINS|`""` -`plugin.mongodb.trace_param`|If true, trace all the parameters in MongoDB access, default is false. Only trace the operation, not include parameters.|SW_PLUGIN_MONGODB_TRACE_PARAM|`false` -`plugin.mongodb.filter_length_limit`|If set to positive number, the `WriteRequest.params` would be truncated to this length, otherwise it would be completely saved, which may cause performance problem.|SW_PLUGIN_MONGODB_FILTER_LENGTH_LIMIT|`256` -`plugin.elasticsearch.trace_dsl`|If true, trace all the DSL(Domain Specific Language) in ElasticSearch access, default is false.|SW_PLUGIN_ELASTICSEARCH_TRACE_DSL|`false` -`plugin.springmvc.use_qualified_name_as_endpoint_name`|If true, the fully qualified method name will be used as the endpoint name instead of the request URL, default is false.|SW_PLUGIN_SPRINGMVC_USE_QUALIFIED_NAME_AS_ENDPOINT_NAME|`false` -`plugin.toolit.use_qualified_name_as_operation_name`|If true, the fully qualified method name will be used as the operation name instead of the given operation name, default is false.|SW_PLUGIN_TOOLIT_USE_QUALIFIED_NAME_AS_OPERATION_NAME|`false` -`plugin.jdbc.trace_sql_parameters`|If set to true, the parameters of the sql (typically `java.sql.PreparedStatement`) would be collected.|SW_JDBC_TRACE_SQL_PARAMETERS|`false` -`plugin.jdbc.sql_parameters_max_length`|If set to positive number, the `db.sql.parameters` would be truncated to this length, otherwise it would be completely saved, which may cause performance problem.|SW_PLUGIN_JDBC_SQL_PARAMETERS_MAX_LENGTH|`512` -`plugin.jdbc.sql_body_max_length`|If set to positive number, the `db.statement` would be truncated to this length, otherwise it would be completely saved, which may cause performance problem.|SW_PLUGIN_JDBC_SQL_BODY_MAX_LENGTH|`2048` -`plugin.solrj.trace_statement`|If true, trace all the query parameters(include deleteByIds and deleteByQuery) in Solr query request, default is false.|SW_PLUGIN_SOLRJ_TRACE_STATEMENT|`false` -`plugin.solrj.trace_ops_params`|If true, trace all the operation parameters in Solr request, default is false.|SW_PLUGIN_SOLRJ_TRACE_OPS_PARAMS|`false` -`plugin.light4j.trace_handler_chain`|If true, trace all middleware/business handlers that are part of the Light4J handler chain for a request.|SW_PLUGIN_LIGHT4J_TRACE_HANDLER_CHAIN|false -`plugin.springtransaction.simplify_transaction_definition_name`|If true, the transaction definition name will be simplified.|SW_PLUGIN_SPRINGTRANSACTION_SIMPLIFY_TRANSACTION_DEFINITION_NAME|false -`plugin.jdkthreading.threading_class_prefixes` | Threading classes (`java.lang.Runnable` and `java.util.concurrent.Callable`) and their subclasses, including anonymous inner classes whose name match any one of the `THREADING_CLASS_PREFIXES` (splitted by `,`) will be instrumented, make sure to only specify as narrow prefixes as what you're expecting to instrument, (`java.` and `javax.` will be ignored due to safety issues) | SW_PLUGIN_JDKTHREADING_THREADING_CLASS_PREFIXES | Not set -`plugin.tomcat.collect_http_params`| This config item controls that whether the Tomcat plugin should collect the parameters of the request. Also, activate implicitly in the profiled trace. | SW_PLUGIN_TOMCAT_COLLECT_HTTP_PARAMS | `false` -`plugin.springmvc.collect_http_params`| This config item controls that whether the SpringMVC plugin should collect the parameters of the request, when your Spring application is based on Tomcat, consider only setting either `plugin.tomcat.collect_http_params` or `plugin.springmvc.collect_http_params`. Also, activate implicitly in the profiled trace. | SW_PLUGIN_SPRINGMVC_COLLECT_HTTP_PARAMS | `false` -`plugin.httpclient.collect_http_params`| This config item controls that whether the HttpClient plugin should collect the parameters of the request | SW_PLUGIN_HTTPCLIENT_COLLECT_HTTP_PARAMS | `false` -`plugin.http.http_params_length_threshold`| When `COLLECT_HTTP_PARAMS` is enabled, how many characters to keep and send to the OAP backend, use negative values to keep and send the complete parameters, NB. this config item is added for the sake of performance. | SW_PLUGIN_HTTP_HTTP_PARAMS_LENGTH_THRESHOLD | `1024` -`plugin.http.http_headers_length_threshold`| When `include_http_headers` declares header names, this threshold controls the length limitation of all header values. use negative values to keep and send the complete headers. Note. this config item is added for the sake of performance. | SW_PLUGIN_HTTP_HTTP_HEADERS_LENGTH_THRESHOLD | `2048` -`plugin.http.include_http_headers`| Set the header names, which should be collected by the plugin. Header name must follow `javax.servlet.http` definition. Multiple names should be split by comma. | SW_PLUGIN_HTTP_INCLUDE_HTTP_HEADERS | ``(No header would be collected) -`plugin.feign.collect_request_body`| This config item controls that whether the Feign plugin should collect the http body of the request. | SW_PLUGIN_FEIGN_COLLECT_REQUEST_BODY | `false` -`plugin.feign.filter_length_limit`| When `COLLECT_REQUEST_BODY` is enabled, how many characters to keep and send to the OAP backend, use negative values to keep and send the complete body. | SW_PLUGIN_FEIGN_FILTER_LENGTH_LIMIT | `1024` -`plugin.feign.supported_content_types_prefix`| When `COLLECT_REQUEST_BODY` is enabled and content-type start with SUPPORTED_CONTENT_TYPES_PREFIX, collect the body of the request , multiple paths should be separated by `,` | SW_PLUGIN_FEIGN_SUPPORTED_CONTENT_TYPES_PREFIX | `application/json,text/` -`plugin.influxdb.trace_influxql`|If true, trace all the influxql(query and write) in InfluxDB access, default is true.|SW_PLUGIN_INFLUXDB_TRACE_INFLUXQL|`true` -`plugin.dubbo.collect_consumer_arguments`| Apache Dubbo consumer collect `arguments` in RPC call, use `Object#toString` to collect `arguments`. |SW_PLUGIN_DUBBO_COLLECT_CONSUMER_ARGUMENTS|`false` -`plugin.dubbo.consumer_arguments_length_threshold`| When `plugin.dubbo.collect_consumer_arguments` is `true`, Arguments of length from the front will to the OAP backend |SW_PLUGIN_DUBBO_CONSUMER_ARGUMENTS_LENGTH_THRESHOLD|`256` -`plugin.dubbo.collect_provider_arguments`| Apache Dubbo provider collect `arguments` in RPC call, use `Object#toString` to collect `arguments`. |SW_PLUGIN_DUBBO_COLLECT_PROVIDER_ARGUMENTS|`false` -`plugin.dubbo.provider_arguments_length_threshold`| When `plugin.dubbo.collect_provider_arguments` is `true`, Arguments of length from the front will to the OAP backend |SW_PLUGIN_DUBBO_PROVIDER_ARGUMENTS_LENGTH_THRESHOLD|`256` -`plugin.kafka.bootstrap_servers`| A list of host/port pairs to use for establishing the initial connection to the Kafka cluster. | SW_KAFKA_BOOTSTRAP_SERVERS | `localhost:9092` -`plugin.kafka.get_topic_timeout`| Timeout period of reading topics from the Kafka server, the unit is second. |SW_GET_TOPIC_TIMEOUT|`10` -`plugin.kafka.producer_config`| Kafka producer configuration. Read [producer configure](http://kafka.apache.org/24/documentation.html#producerconfigs) to get more details. Check [Kafka report doc](advanced-reporters.md#kafka-reporter) for more details and examples. | sw_plugin_kafka_producer_config | -`plugin.kafka.producer_config_json` | Configure Kafka Producer configuration in JSON format. Notice it will be overridden by `plugin.kafka.producer_config[key]`, if the key duplication. | SW_PLUGIN_KAFKA_PRODUCER_CONFIG_JSON | -`plugin.kafka.topic_meter` | Specify which Kafka topic name for Meter System data to report to. | SW_PLUGIN_KAFKA_TOPIC_METER | `skywalking-meters` -`plugin.kafka.topic_metrics` | Specify which Kafka topic name for JVM metrics data to report to. | SW_PLUGIN_KAFKA_TOPIC_METRICS | `skywalking-metrics` -`plugin.kafka.topic_segment` | Specify which Kafka topic name for traces data to report to. | SW_PLUGIN_KAFKA_TOPIC_SEGMENT | `skywalking-segments` -`plugin.kafka.topic_profiling` | Specify which Kafka topic name for Thread Profiling snapshot to report to. | SW_PLUGIN_KAFKA_TOPIC_PROFILINGS | `skywalking-profilings` -`plugin.kafka.topic_management` | Specify which Kafka topic name for the register or heartbeat data of Service Instance to report to. | SW_PLUGIN_KAFKA_TOPIC_MANAGEMENT | `skywalking-managements` -`plugin.kafka.topic_logging` | Specify which Kafka topic name for the logging data to report to. | SW_PLUGIN_KAFKA_TOPIC_LOGGING | `skywalking-logging` -`plugin.kafka.namespace` | isolate multi OAP server when using same Kafka cluster (final topic name will append namespace before Kafka topics with `-` ). | SW_KAFKA_NAMESPACE | `` -`plugin.springannotation.classname_match_regex` | Match spring beans with regular expression for the class name. Multiple expressions could be separated by a comma. This only works when `Spring annotation plugin` has been activated. | SW_SPRINGANNOTATION_CLASSNAME_MATCH_REGEX | `All the spring beans tagged with @Bean,@Service,@Dao, or @Repository.` -`plugin.toolkit.log.transmit_formatted` | Whether or not to transmit logged data as formatted or un-formatted. | SW_PLUGIN_TOOLKIT_LOG_TRANSMIT_FORMATTED | `true` -`plugin.lettuce.trace_redis_parameters` | If set to true, the parameters of Redis commands would be collected by Lettuce agent.| SW_PLUGIN_LETTUCE_TRACE_REDIS_PARAMETERS | `false` -`plugin.lettuce.redis_parameter_max_length` | If set to positive number and `plugin.lettuce.trace_redis_parameters` is set to `true`, Redis command parameters would be collected and truncated to this length.| SW_PLUGIN_LETTUCE_REDIS_PARAMETER_MAX_LENGTH | `128` -`plugin.jedis.trace_redis_parameters` | If set to true, the parameters of Redis commands would be collected by Jedis agent.| SW_PLUGIN_JEDIS_TRACE_REDIS_PARAMETERS | `false` -`plugin.jedis.redis_parameter_max_length` | If set to positive number and `plugin.jedis.trace_redis_parameters` is set to `true`, Redis command parameters would be collected and truncated to this length.| SW_PLUGIN_JEDIS_REDIS_PARAMETER_MAX_LENGTH | `128` -`plugin.redisson.trace_redis_parameters` | If set to true, the parameters of Redis commands would be collected by Redisson agent.| SW_PLUGIN_REDISSON_TRACE_REDIS_PARAMETERS | `false` -`plugin.redisson.redis_parameter_max_length` | If set to positive number and `plugin.redisson.trace_redis_parameters` is set to `true`, Redis command parameters would be collected and truncated to this length.| SW_PLUGIN_REDISSON_REDIS_PARAMETER_MAX_LENGTH | `128` -`plugin.neo4j.trace_cypher_parameters`|If set to true, the parameters of the cypher would be collected.|SW_PLUGIN_NEO4J_TRACE_CYPHER_PARAMETERS|`false` -`plugin.neo4j.cypher_parameters_max_length`|If set to positive number, the `db.cypher.parameters` would be truncated to this length, otherwise it would be completely saved, which may cause performance problem.|SW_PLUGIN_NEO4J_CYPHER_PARAMETERS_MAX_LENGTH|`512` -`plugin.neo4j.cypher_body_max_length`|If set to positive number, the `db.statement` would be truncated to this length, otherwise it would be completely saved, which may cause performance problem.|SW_PLUGIN_NEO4J_CYPHER_BODY_MAX_LENGTH|`2048` - +| property key | Description | **System Environment Variable** | Default | +|-----------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|-------------------------------------------------------------------------| +| `agent.service_name` | The service name to represent a logic group providing the same capabilities/logic. Suggestion: set a unique name for every logic service group, service instance nodes share the same code, Max length is 50(UTF-8 char). Optional, once `service_name` follows `::` format, OAP server assigns the group name to the service metadata. | SW_AGENT_NAME | `Your_ApplicationName` | +| `agent.namespace` | Namespace represents a subnet, such as kubernetes namespace, or 172.10.*.* | SW_AGENT_NAMESPACE | Not set | +| `agent.cluster` | Cluster defines the physical cluster in a data center or same network segment. | SW_AGENT_CLUSTER | Not set | +| `agent.sample_n_per_3_secs` | Negative or zero means off, by default.SAMPLE_N_PER_3_SECS means sampling N TraceSegment in 3 seconds tops. | SW_AGENT_SAMPLE | Not set | +| `agent.authentication` | Authentication active is based on backend setting, see application.yml for more details.For most scenarios, this needs backend extensions, only basic match auth provided in default implementation. | SW_AGENT_AUTHENTICATION | Not set | +| `agent.trace_segment_ref_limit_per_span` | The max number of TraceSegmentRef in a single span to keep memory cost estimatable. | SW_TRACE_SEGMENT_LIMIT | 500 | +| `agent.span_limit_per_segment` | The max number of spans in a single segment. Through this config item, SkyWalking keep your application memory cost estimated. | SW_AGENT_SPAN_LIMIT | 300 | +| `agent.ignore_suffix` | If the operation name of the first span is included in this set, this segment should be ignored. | SW_AGENT_IGNORE_SUFFIX | Not set | +| `agent.is_open_debugging_class` | If true, skywalking agent will save all instrumented classes files in `/debugging` folder. SkyWalking team may ask for these files in order to resolve compatible problem. | SW_AGENT_OPEN_DEBUG | Not set | +| `agent.is_cache_enhanced_class` | If true, SkyWalking agent will cache all instrumented classes files to memory or disk files (decided by class cache mode), allow another java agent to enhance those classes that enhanced by SkyWalking agent. To use some Java diagnostic tools (such as BTrace, Arthas) to diagnose applications or add a custom java agent to enhance classes, you need to enable this feature. | SW_AGENT_CACHE_CLASS | `false` | +| `agent.class_cache_mode` | The instrumented classes cache mode: `MEMORY` or `FILE`. `MEMORY`: cache class bytes to memory, if instrumented classes is too many or too large, it may take up more memory. `FILE`: cache class bytes in `/class-cache` folder, automatically clean up cached class files when the application exits. | SW_AGENT_CLASS_CACHE_MODE | `MEMORY` | +| `agent.instance_name` | Instance name is the identity of an instance, should be unique in the service. If empty, SkyWalking agent will generate an 32-bit uuid. Default, use `UUID`@`hostname` as the instance name. Max length is 50(UTF-8 char) | SW_AGENT_INSTANCE_NAME | `""` | +| `agent.instance_properties_json={"key":"value"}` | Add service instance custom properties in json format. | SW_INSTANCE_PROPERTIES_JSON | Not set | +| `agent.cause_exception_depth` | How depth the agent goes, when log all cause exceptions. | SW_AGENT_CAUSE_EXCEPTION_DEPTH | `5` | +| `agent.force_reconnection_period ` | Force reconnection period of grpc, based on grpc_channel_check_interval. | SW_AGENT_FORCE_RECONNECTION_PERIOD | `1` | +| `agent.operation_name_threshold ` | The operationName max length, setting this value > 190 is not recommended. | SW_AGENT_OPERATION_NAME_THRESHOLD | `150` | +| `agent.keep_tracing` | Keep tracing even the backend is not available if this value is `true`. | SW_AGENT_KEEP_TRACING | `false` | +| `agent.force_tls` | Force open TLS for gRPC channel if this value is `true`. | SW_AGENT_FORCE_TLS | `false` | +| `agent.ssl_trusted_ca_path` | gRPC SSL trusted ca file. | SW_AGENT_SSL_TRUSTED_CA_PATH | `/ca/ca.crt` | +| `agent.ssl_key_path` | The private key file. Enable mTLS when ssl_key_path and ssl_cert_chain_path exist. | SW_AGENT_SSL_KEY_PATH | `""` | +| `agent.ssl_cert_chain_path` | The certificate file. Enable mTLS when ssl_key_path and ssl_cert_chain_path exist. | SW_AGENT_SSL_CERT_CHAIN_PATH | `""` | +| `osinfo.ipv4_list_size` | Limit the length of the ipv4 list size. | SW_AGENT_OSINFO_IPV4_LIST_SIZE | `10` | +| `collector.grpc_channel_check_interval` | grpc channel status check interval. | SW_AGENT_COLLECTOR_GRPC_CHANNEL_CHECK_INTERVAL | `30` | +| `collector.heartbeat_period` | agent heartbeat report period. Unit, second. | SW_AGENT_COLLECTOR_HEARTBEAT_PERIOD | `30` | +| `collector.properties_report_period_factor` | The agent sends the instance properties to the backend every `collector.heartbeat_period * collector.properties_report_period_factor` seconds | SW_AGENT_COLLECTOR_PROPERTIES_REPORT_PERIOD_FACTOR | `10` | +| `collector.backend_service` | Collector SkyWalking trace receiver service addresses. | SW_AGENT_COLLECTOR_BACKEND_SERVICES | `127.0.0.1:11800` | +| `collector.grpc_upstream_timeout` | How long grpc client will timeout in sending data to upstream. Unit is second. | SW_AGENT_COLLECTOR_GRPC_UPSTREAM_TIMEOUT | `30` seconds | +| `collector.get_profile_task_interval` | Sniffer get profile task list interval. | SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL | `20` | +| `collector.get_agent_dynamic_config_interval` | Sniffer get agent dynamic config interval | SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL | `20` | +| `collector.is_resolve_dns_periodically` | If true, skywalking agent will enable periodically resolving DNS to update receiver service addresses. | SW_AGENT_COLLECTOR_IS_RESOLVE_DNS_PERIODICALLY | `false` | +| `logging.level` | Log level: TRACE, DEBUG, INFO, WARN, ERROR, OFF. Default is info. | SW_LOGGING_LEVEL | `INFO` | +| `logging.file_name` | Log file name. | SW_LOGGING_FILE_NAME | `skywalking-api.log` | +| `logging.output` | Log output. Default is FILE. Use CONSOLE means output to stdout. | SW_LOGGING_OUTPUT | `FILE` | +| `logging.dir` | Log files directory. Default is blank string, means, use "{theSkywalkingAgentJarDir}/logs " to output logs. {theSkywalkingAgentJarDir} is the directory where the skywalking agent jar file is located | SW_LOGGING_DIR | `""` | +| `logging.resolver` | Logger resolver: `PATTERN` or `JSON`. The default is `PATTERN`, which uses `logging.pattern` to print traditional text logs. `JSON` resolver prints logs in JSON format. | SW_LOGGING_RESOLVER | `PATTERN` | +| `logging.pattern ` | Logging format. There are all conversion specifiers:
  * `%level` means log level.
  * `%timestamp` means now of time with format `yyyy-MM-dd HH:mm:ss:SSS`.
  * `%thread` means name of current thread.
  * `%msg` means some message which user logged.
  * `%class` means SimpleName of TargetClass.
  * `%throwable` means a throwable which user called.
  * `%agent_name` means `agent.service_name`. Only apply to the `PatternLogger`. | SW_LOGGING_PATTERN | `%level %timestamp %thread %class : %msg %throwable` | +| `logging.max_file_size` | The max size of log file. If the size is bigger than this, archive the current file, and write into a new file. | SW_LOGGING_MAX_FILE_SIZE | `300 * 1024 * 1024` | +| `logging.max_history_files` | The max history log files. When rollover happened, if log files exceed this number,then the oldest file will be delete. Negative or zero means off, by default. | SW_LOGGING_MAX_HISTORY_FILES | `-1` | +| `statuscheck.ignored_exceptions` | Listed exceptions would not be treated as an error. Because in some codes, the exception is being used as a way of controlling business flow. | SW_STATUSCHECK_IGNORED_EXCEPTIONS | `""` | +| `statuscheck.max_recursive_depth` | The max recursive depth when checking the exception traced by the agent. Typically, we don't recommend setting this more than 10, which could cause a performance issue. Negative value and 0 would be ignored, which means all exceptions would make the span tagged in error status. | SW_STATUSCHECK_MAX_RECURSIVE_DEPTH | `1` | +| `correlation.element_max_number` | Max element count in the correlation context. | SW_CORRELATION_ELEMENT_MAX_NUMBER | 3 | +| `correlation.value_max_length` | Max value length of each element. | SW_CORRELATION_VALUE_MAX_LENGTH | `128` | +| `correlation.auto_tag_keys` | Tag the span by the key/value in the correlation context, when the keys listed here exist. | SW_CORRELATION_AUTO_TAG_KEYS | `""` | +| `jvm.buffer_size` | The buffer size of collected JVM info. | SW_JVM_BUFFER_SIZE | `60 * 10` | +| `buffer.channel_size` | The buffer channel size. | SW_BUFFER_CHANNEL_SIZE | `5` | +| `buffer.buffer_size` | The buffer size. | SW_BUFFER_BUFFER_SIZE | `300` | +| `profile.active` | If true, skywalking agent will enable profile when user create a new profile task. Otherwise disable profile. | SW_AGENT_PROFILE_ACTIVE | `true` | +| `profile.max_parallel` | Parallel monitor segment count | SW_AGENT_PROFILE_MAX_PARALLEL | `5` | +| `profile.duration` | Max monitor segment time(minutes), if current segment monitor time out of limit, then stop it. | SW_AGENT_PROFILE_DURATION | `10` | +| `profile.dump_max_stack_depth` | Max dump thread stack depth | SW_AGENT_PROFILE_DUMP_MAX_STACK_DEPTH | `500` | +| `profile.snapshot_transport_buffer_size` | Snapshot transport to backend buffer size | SW_AGENT_PROFILE_SNAPSHOT_TRANSPORT_BUFFER_SIZE | `4500` | +| `meter.active` | If true, the agent collects and reports metrics to the backend. | SW_METER_ACTIVE | `true` | +| `meter.report_interval` | Report meters interval. The unit is second | SW_METER_REPORT_INTERVAL | `20` | +| `meter.max_meter_size` | Max size of the meter pool | SW_METER_MAX_METER_SIZE | `500` | +| `log.max_message_size` | The max size of message to send to server.Default is 10 MB. | SW_GRPC_LOG_MAX_MESSAGE_SIZE | `10485760` | +| `plugin.mount` | Mount the specific folders of the plugins. Plugins in mounted folders would work. | SW_MOUNT_FOLDERS | `plugins,activations` | +| `plugin.peer_max_length ` | Peer maximum description limit. | SW_PLUGIN_PEER_MAX_LENGTH | `200` | +| `plugin.exclude_plugins ` | Exclude some plugins define in plugins dir.Plugin names is defined in [Agent plugin list](Plugin-list.md) | SW_EXCLUDE_PLUGINS | `""` | +| `plugin.mongodb.trace_param` | If true, trace all the parameters in MongoDB access, default is false. Only trace the operation, not include parameters. | SW_PLUGIN_MONGODB_TRACE_PARAM | `false` | +| `plugin.mongodb.filter_length_limit` | If set to positive number, the `WriteRequest.params` would be truncated to this length, otherwise it would be completely saved, which may cause performance problem. | SW_PLUGIN_MONGODB_FILTER_LENGTH_LIMIT | `256` | +| `plugin.elasticsearch.trace_dsl` | If true, trace all the DSL(Domain Specific Language) in ElasticSearch access, default is false. | SW_PLUGIN_ELASTICSEARCH_TRACE_DSL | `false` | +| `plugin.springmvc.use_qualified_name_as_endpoint_name` | If true, the fully qualified method name will be used as the endpoint name instead of the request URL, default is false. | SW_PLUGIN_SPRINGMVC_USE_QUALIFIED_NAME_AS_ENDPOINT_NAME | `false` | +| `plugin.toolit.use_qualified_name_as_operation_name` | If true, the fully qualified method name will be used as the operation name instead of the given operation name, default is false. | SW_PLUGIN_TOOLIT_USE_QUALIFIED_NAME_AS_OPERATION_NAME | `false` | +| `plugin.jdbc.trace_sql_parameters` | If set to true, the parameters of the sql (typically `java.sql.PreparedStatement`) would be collected. | SW_JDBC_TRACE_SQL_PARAMETERS | `false` | +| `plugin.jdbc.sql_parameters_max_length` | If set to positive number, the `db.sql.parameters` would be truncated to this length, otherwise it would be completely saved, which may cause performance problem. | SW_PLUGIN_JDBC_SQL_PARAMETERS_MAX_LENGTH | `512` | +| `plugin.jdbc.sql_body_max_length` | If set to positive number, the `db.statement` would be truncated to this length, otherwise it would be completely saved, which may cause performance problem. | SW_PLUGIN_JDBC_SQL_BODY_MAX_LENGTH | `2048` | +| `plugin.solrj.trace_statement` | If true, trace all the query parameters(include deleteByIds and deleteByQuery) in Solr query request, default is false. | SW_PLUGIN_SOLRJ_TRACE_STATEMENT | `false` | +| `plugin.solrj.trace_ops_params` | If true, trace all the operation parameters in Solr request, default is false. | SW_PLUGIN_SOLRJ_TRACE_OPS_PARAMS | `false` | +| `plugin.light4j.trace_handler_chain` | If true, trace all middleware/business handlers that are part of the Light4J handler chain for a request. | SW_PLUGIN_LIGHT4J_TRACE_HANDLER_CHAIN | false | +| `plugin.springtransaction.simplify_transaction_definition_name` | If true, the transaction definition name will be simplified. | SW_PLUGIN_SPRINGTRANSACTION_SIMPLIFY_TRANSACTION_DEFINITION_NAME | false | +| `plugin.jdkthreading.threading_class_prefixes` | Threading classes (`java.lang.Runnable` and `java.util.concurrent.Callable`) and their subclasses, including anonymous inner classes whose name match any one of the `THREADING_CLASS_PREFIXES` (splitted by `,`) will be instrumented, make sure to only specify as narrow prefixes as what you're expecting to instrument, (`java.` and `javax.` will be ignored due to safety issues) | SW_PLUGIN_JDKTHREADING_THREADING_CLASS_PREFIXES | Not set | +| `plugin.tomcat.collect_http_params` | This config item controls that whether the Tomcat plugin should collect the parameters of the request. Also, activate implicitly in the profiled trace. | SW_PLUGIN_TOMCAT_COLLECT_HTTP_PARAMS | `false` | +| `plugin.springmvc.collect_http_params` | This config item controls that whether the SpringMVC plugin should collect the parameters of the request, when your Spring application is based on Tomcat, consider only setting either `plugin.tomcat.collect_http_params` or `plugin.springmvc.collect_http_params`. Also, activate implicitly in the profiled trace. | SW_PLUGIN_SPRINGMVC_COLLECT_HTTP_PARAMS | `false` | +| `plugin.httpclient.collect_http_params` | This config item controls that whether the HttpClient plugin should collect the parameters of the request | SW_PLUGIN_HTTPCLIENT_COLLECT_HTTP_PARAMS | `false` | +| `plugin.http.http_params_length_threshold` | When `COLLECT_HTTP_PARAMS` is enabled, how many characters to keep and send to the OAP backend, use negative values to keep and send the complete parameters, NB. this config item is added for the sake of performance. | SW_PLUGIN_HTTP_HTTP_PARAMS_LENGTH_THRESHOLD | `1024` | +| `plugin.http.http_headers_length_threshold` | When `include_http_headers` declares header names, this threshold controls the length limitation of all header values. use negative values to keep and send the complete headers. Note. this config item is added for the sake of performance. | SW_PLUGIN_HTTP_HTTP_HEADERS_LENGTH_THRESHOLD | `2048` | +| `plugin.http.include_http_headers` | Set the header names, which should be collected by the plugin. Header name must follow `javax.servlet.http` definition. Multiple names should be split by comma. | SW_PLUGIN_HTTP_INCLUDE_HTTP_HEADERS | ``(No header would be collected) | +| `plugin.feign.collect_request_body` | This config item controls that whether the Feign plugin should collect the http body of the request. | SW_PLUGIN_FEIGN_COLLECT_REQUEST_BODY | `false` | +| `plugin.feign.filter_length_limit` | When `COLLECT_REQUEST_BODY` is enabled, how many characters to keep and send to the OAP backend, use negative values to keep and send the complete body. | SW_PLUGIN_FEIGN_FILTER_LENGTH_LIMIT | `1024` | +| `plugin.feign.supported_content_types_prefix` | When `COLLECT_REQUEST_BODY` is enabled and content-type start with SUPPORTED_CONTENT_TYPES_PREFIX, collect the body of the request , multiple paths should be separated by `,` | SW_PLUGIN_FEIGN_SUPPORTED_CONTENT_TYPES_PREFIX | `application/json,text/` | +| `plugin.influxdb.trace_influxql` | If true, trace all the influxql(query and write) in InfluxDB access, default is true. | SW_PLUGIN_INFLUXDB_TRACE_INFLUXQL | `true` | +| `plugin.dubbo.collect_consumer_arguments` | Apache Dubbo consumer collect `arguments` in RPC call, use `Object#toString` to collect `arguments`. | SW_PLUGIN_DUBBO_COLLECT_CONSUMER_ARGUMENTS | `false` | +| `plugin.dubbo.consumer_arguments_length_threshold` | When `plugin.dubbo.collect_consumer_arguments` is `true`, Arguments of length from the front will to the OAP backend | SW_PLUGIN_DUBBO_CONSUMER_ARGUMENTS_LENGTH_THRESHOLD | `256` | +| `plugin.dubbo.collect_provider_arguments` | Apache Dubbo provider collect `arguments` in RPC call, use `Object#toString` to collect `arguments`. | SW_PLUGIN_DUBBO_COLLECT_PROVIDER_ARGUMENTS | `false` | +| `plugin.dubbo.provider_arguments_length_threshold` | When `plugin.dubbo.collect_provider_arguments` is `true`, Arguments of length from the front will to the OAP backend | SW_PLUGIN_DUBBO_PROVIDER_ARGUMENTS_LENGTH_THRESHOLD | `256` | +| `plugin.kafka.bootstrap_servers` | A list of host/port pairs to use for establishing the initial connection to the Kafka cluster. | SW_KAFKA_BOOTSTRAP_SERVERS | `localhost:9092` | +| `plugin.kafka.get_topic_timeout` | Timeout period of reading topics from the Kafka server, the unit is second. | SW_GET_TOPIC_TIMEOUT | `10` | +| `plugin.kafka.producer_config` | Kafka producer configuration. Read [producer configure](http://kafka.apache.org/24/documentation.html#producerconfigs) to get more details. Check [Kafka report doc](advanced-reporters.md#kafka-reporter) for more details and examples. | sw_plugin_kafka_producer_config | | +| `plugin.kafka.producer_config_json` | Configure Kafka Producer configuration in JSON format. Notice it will be overridden by `plugin.kafka.producer_config[key]`, if the key duplication. | SW_PLUGIN_KAFKA_PRODUCER_CONFIG_JSON | | +| `plugin.kafka.topic_meter` | Specify which Kafka topic name for Meter System data to report to. | SW_PLUGIN_KAFKA_TOPIC_METER | `skywalking-meters` | +| `plugin.kafka.topic_metrics` | Specify which Kafka topic name for JVM metrics data to report to. | SW_PLUGIN_KAFKA_TOPIC_METRICS | `skywalking-metrics` | +| `plugin.kafka.topic_segment` | Specify which Kafka topic name for traces data to report to. | SW_PLUGIN_KAFKA_TOPIC_SEGMENT | `skywalking-segments` | +| `plugin.kafka.topic_profiling` | Specify which Kafka topic name for Thread Profiling snapshot to report to. | SW_PLUGIN_KAFKA_TOPIC_PROFILINGS | `skywalking-profilings` | +| `plugin.kafka.topic_management` | Specify which Kafka topic name for the register or heartbeat data of Service Instance to report to. | SW_PLUGIN_KAFKA_TOPIC_MANAGEMENT | `skywalking-managements` | +| `plugin.kafka.topic_logging` | Specify which Kafka topic name for the logging data to report to. | SW_PLUGIN_KAFKA_TOPIC_LOGGING | `skywalking-logging` | +| `plugin.kafka.namespace` | isolate multi OAP server when using same Kafka cluster (final topic name will append namespace before Kafka topics with `-` ). | SW_KAFKA_NAMESPACE | `` | +| `plugin.springannotation.classname_match_regex` | Match spring beans with regular expression for the class name. Multiple expressions could be separated by a comma. This only works when `Spring annotation plugin` has been activated. | SW_SPRINGANNOTATION_CLASSNAME_MATCH_REGEX | `All the spring beans tagged with @Bean,@Service,@Dao, or @Repository.` | +| `plugin.toolkit.log.transmit_formatted` | Whether or not to transmit logged data as formatted or un-formatted. | SW_PLUGIN_TOOLKIT_LOG_TRANSMIT_FORMATTED | `true` | +| `plugin.lettuce.trace_redis_parameters` | If set to true, the parameters of Redis commands would be collected by Lettuce agent. | SW_PLUGIN_LETTUCE_TRACE_REDIS_PARAMETERS | `false` | +| `plugin.lettuce.redis_parameter_max_length` | If set to positive number and `plugin.lettuce.trace_redis_parameters` is set to `true`, Redis command parameters would be collected and truncated to this length. | SW_PLUGIN_LETTUCE_REDIS_PARAMETER_MAX_LENGTH | `128` | +| `plugin.jedis.trace_redis_parameters` | If set to true, the parameters of Redis commands would be collected by Jedis agent. | SW_PLUGIN_JEDIS_TRACE_REDIS_PARAMETERS | `false` | +| `plugin.jedis.redis_parameter_max_length` | If set to positive number and `plugin.jedis.trace_redis_parameters` is set to `true`, Redis command parameters would be collected and truncated to this length. | SW_PLUGIN_JEDIS_REDIS_PARAMETER_MAX_LENGTH | `128` | +| `plugin.redisson.trace_redis_parameters` | If set to true, the parameters of Redis commands would be collected by Redisson agent. | SW_PLUGIN_REDISSON_TRACE_REDIS_PARAMETERS | `false` | +| `plugin.redisson.redis_parameter_max_length` | If set to positive number and `plugin.redisson.trace_redis_parameters` is set to `true`, Redis command parameters would be collected and truncated to this length. | SW_PLUGIN_REDISSON_REDIS_PARAMETER_MAX_LENGTH | `128` | +| `plugin.neo4j.trace_cypher_parameters` | If set to true, the parameters of the cypher would be collected. | SW_PLUGIN_NEO4J_TRACE_CYPHER_PARAMETERS | `false` | +| `plugin.neo4j.cypher_parameters_max_length` | If set to positive number, the `db.cypher.parameters` would be truncated to this length, otherwise it would be completely saved, which may cause performance problem. | SW_PLUGIN_NEO4J_CYPHER_PARAMETERS_MAX_LENGTH | `512` | +| `plugin.neo4j.cypher_body_max_length` | If set to positive number, the `db.statement` would be truncated to this length, otherwise it would be completely saved, which may cause performance problem. | SW_PLUGIN_NEO4J_CYPHER_BODY_MAX_LENGTH | `2048` | # Dynamic Configurations All configurations above are static, if you need to change some agent settings at runtime, please read [CDS - Configuration Discovery Service document](configuration-discovery.md) for more details.