Update guava-cache,jedis,memcached,ehcache plugins to adopt uniform tags (#303)
This commit is contained in:
parent
1c14a87067
commit
6fce184cfe
|
|
@ -10,10 +10,12 @@ Release Notes.
|
|||
* Fix the default value of the Map field would merge rather than override by new values in the config.
|
||||
* Support to set the value of Map/List field to an empty map/list.
|
||||
* Add plugin to support [Impala JDBC](https://www.cloudera.com/downloads/connectors/impala/jdbc/2-6-29.html) 2.6.x.
|
||||
* Update guava-cache, jedis, memcached, ehcache plugins to adopt uniform tags.
|
||||
|
||||
#### Documentation
|
||||
|
||||
* Update `configuration` doc about overriding default value as empty map/list accordingly.
|
||||
* Update plugin dev tags for cache relative tags
|
||||
|
||||
All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/150?closed=1)
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public final class Tags {
|
|||
public static final IntegerTag HTTP_RESPONSE_STATUS_CODE = new IntegerTag(2, "http.status_code", true);
|
||||
|
||||
/**
|
||||
* DB_TYPE records database type, such as sql, redis, cassandra and so on.
|
||||
* DB_TYPE records database type, such as sql, cassandra and so on.
|
||||
*/
|
||||
public static final StringTag DB_TYPE = new StringTag(3, "db.type");
|
||||
|
||||
|
|
@ -107,6 +107,28 @@ public final class Tags {
|
|||
}
|
||||
|
||||
public static final StringTag LOGIC_ENDPOINT = new StringTag(12, "x-le");
|
||||
/**
|
||||
* CACHE_TYPE records cache type, such as jedis
|
||||
*/
|
||||
public static final StringTag CACHE_TYPE = new StringTag(15, "cache.type");
|
||||
|
||||
/**
|
||||
* CACHE_OP represent a command is used for "write" or "read"
|
||||
* It's better that adding this tag to span , so OAP would analysis write/read metric accurately
|
||||
* Reference org.apache.skywalking.apm.plugin.jedis.v4.AbstractConnectionInterceptor#parseOperation
|
||||
* BTW "op" means Operation
|
||||
*/
|
||||
public static final StringTag CACHE_OP = new StringTag(16, "cache.op");
|
||||
|
||||
/**
|
||||
* CACHE_TYPE records the cache command
|
||||
*/
|
||||
public static final StringTag CACHE_CMD = new StringTag(17, "cache.cmd");
|
||||
|
||||
/**
|
||||
* CACHE_TYPE records the cache key
|
||||
*/
|
||||
public static final StringTag CACHE_KEY = new StringTag(18, "cache.key");
|
||||
|
||||
public static final String VAL_LOCAL_SPAN_AS_LOGIC_ENDPOINT = "{\"logic-span\":true}";
|
||||
|
||||
|
|
|
|||
|
|
@ -28,51 +28,60 @@ import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
|
|||
import org.apache.skywalking.apm.util.StringUtil;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Optional;
|
||||
|
||||
public class JedisMethodInterceptor implements InstanceMethodsAroundInterceptor {
|
||||
|
||||
private static final String ABBR = "...";
|
||||
private static final String DELIMITER_SPACE = " ";
|
||||
|
||||
@Override
|
||||
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
|
||||
MethodInterceptResult result) throws Throwable {
|
||||
MethodInterceptResult result) throws Throwable {
|
||||
String peer = String.valueOf(objInst.getSkyWalkingDynamicField());
|
||||
AbstractSpan span = ContextManager.createExitSpan("Jedis/" + method.getName(), peer);
|
||||
span.setComponent(ComponentsDefine.JEDIS);
|
||||
Tags.DB_TYPE.set(span, "Redis");
|
||||
SpanLayer.asCache(span);
|
||||
|
||||
if (allArguments.length > 0 && allArguments[0] instanceof String) {
|
||||
Tags.DB_STATEMENT.set(span, getDBStatement(method.getName(), (String) allArguments[0]));
|
||||
} else if (allArguments.length > 0 && allArguments[0] instanceof byte[]) {
|
||||
Tags.DB_STATEMENT.set(span, method.getName());
|
||||
}
|
||||
String methodName = method.getName();
|
||||
Tags.CACHE_TYPE.set(span, "Redis");
|
||||
Tags.CACHE_CMD.set(span, methodName);
|
||||
getKey(allArguments).ifPresent(key -> Tags.CACHE_KEY.set(span, key));
|
||||
parseOperation(methodName).ifPresent(op -> Tags.CACHE_OP.set(span, op));
|
||||
}
|
||||
|
||||
private String getDBStatement(String methodName, String argument) {
|
||||
StringBuilder dbStatement = new StringBuilder(methodName);
|
||||
if (JedisPluginConfig.Plugin.Jedis.TRACE_REDIS_PARAMETERS && !StringUtil.isEmpty(argument)) {
|
||||
dbStatement.append(DELIMITER_SPACE);
|
||||
if (argument.length() > JedisPluginConfig.Plugin.Jedis.REDIS_PARAMETER_MAX_LENGTH) {
|
||||
argument = argument.substring(0, JedisPluginConfig.Plugin.Jedis.REDIS_PARAMETER_MAX_LENGTH) + ABBR;
|
||||
}
|
||||
dbStatement.append(argument);
|
||||
private Optional<String> getKey(Object[] allArguments) {
|
||||
if (!JedisPluginConfig.Plugin.Jedis.TRACE_REDIS_PARAMETERS) {
|
||||
return Optional.empty();
|
||||
}
|
||||
return dbStatement.toString();
|
||||
if (allArguments.length == 0) {
|
||||
return Optional.empty();
|
||||
}
|
||||
Object argument = allArguments[0];
|
||||
// include null
|
||||
if (!(argument instanceof String)) {
|
||||
return Optional.empty();
|
||||
}
|
||||
return Optional.of(StringUtil.cut((String) argument, JedisPluginConfig.Plugin.Jedis.REDIS_PARAMETER_MAX_LENGTH));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
|
||||
Object ret) throws Throwable {
|
||||
Object ret) throws Throwable {
|
||||
ContextManager.stopSpan();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
|
||||
Class<?>[] argumentsTypes, Throwable t) {
|
||||
Class<?>[] argumentsTypes, Throwable t) {
|
||||
AbstractSpan span = ContextManager.activeSpan();
|
||||
span.log(t);
|
||||
}
|
||||
|
||||
private Optional<String> parseOperation(String cmd) {
|
||||
if (JedisPluginConfig.Plugin.Jedis.OPERATION_MAPPING_READ.contains(cmd)) {
|
||||
return Optional.of("read");
|
||||
}
|
||||
if (JedisPluginConfig.Plugin.Jedis.OPERATION_MAPPING_WRITE.contains(cmd)) {
|
||||
return Optional.of("write");
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@ package org.apache.skywalking.apm.plugin.jedis.v3;
|
|||
|
||||
import org.apache.skywalking.apm.agent.core.boot.PluginConfig;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class JedisPluginConfig {
|
||||
public static class Plugin {
|
||||
@PluginConfig(root = JedisPluginConfig.class)
|
||||
|
|
@ -35,6 +39,119 @@ public class JedisPluginConfig {
|
|||
* Set a negative number to save specified length of parameter string to the tag.
|
||||
*/
|
||||
public static int REDIS_PARAMETER_MAX_LENGTH = 128;
|
||||
|
||||
/**
|
||||
* Operation represent a cache span is "write" or "read" action , and "op"(operation) is tagged with key "cache.op" usually
|
||||
* This config term define which command should be converted to write Operation .
|
||||
*
|
||||
* @see org.apache.skywalking.apm.agent.core.context.tag.Tags#CACHE_OP
|
||||
* @see JedisMethodInterceptor#parseOperation(String)
|
||||
*/
|
||||
public static Set<String> OPERATION_MAPPING_WRITE = new HashSet<>(Arrays.asList(
|
||||
"getset",
|
||||
"set",
|
||||
"setbit",
|
||||
"setex ",
|
||||
"setnx ",
|
||||
"setrange",
|
||||
"strlen ",
|
||||
"mset",
|
||||
"msetnx ",
|
||||
"psetex",
|
||||
"incr ",
|
||||
"incrby ",
|
||||
"incrbyfloat",
|
||||
"decr ",
|
||||
"decrby ",
|
||||
"append ",
|
||||
"hmset",
|
||||
"hset",
|
||||
"hsetnx ",
|
||||
"hincrby",
|
||||
"hincrbyfloat",
|
||||
"hdel",
|
||||
"rpoplpush",
|
||||
"rpush",
|
||||
"rpushx",
|
||||
"lpush",
|
||||
"lpushx",
|
||||
"lrem",
|
||||
"ltrim",
|
||||
"lset",
|
||||
"brpoplpush",
|
||||
"linsert",
|
||||
"sadd",
|
||||
"sdiff",
|
||||
"sdiffstore",
|
||||
"sinterstore",
|
||||
"sismember",
|
||||
"srem",
|
||||
"sunion",
|
||||
"sunionstore",
|
||||
"sinter",
|
||||
"zadd",
|
||||
"zincrby",
|
||||
"zinterstore",
|
||||
"zrange",
|
||||
"zrangebylex",
|
||||
"zrangebyscore",
|
||||
"zrank",
|
||||
"zrem",
|
||||
"zremrangebylex",
|
||||
"zremrangebyrank",
|
||||
"zremrangebyscore",
|
||||
"zrevrange",
|
||||
"zrevrangebyscore",
|
||||
"zrevrank",
|
||||
"zunionstore",
|
||||
"xadd",
|
||||
"xdel",
|
||||
"del",
|
||||
"xtrim"
|
||||
));
|
||||
/**
|
||||
* Operation represent a cache span is "write" or "read" action , and "op"(operation) is tagged with key "cache.op" usually
|
||||
* This config term define which command should be converted to write Operation .
|
||||
*
|
||||
* @see org.apache.skywalking.apm.agent.core.context.tag.Tags#CACHE_OP
|
||||
* @see JedisMethodInterceptor#parseOperation(String)
|
||||
*/
|
||||
public static Set<String> OPERATION_MAPPING_READ = new HashSet<>(Arrays.asList(
|
||||
"getrange",
|
||||
"getbit ",
|
||||
"mget",
|
||||
"hvals",
|
||||
"hkeys",
|
||||
"hlen",
|
||||
"hexists",
|
||||
"hget",
|
||||
"hgetall",
|
||||
"hmget",
|
||||
"blpop",
|
||||
"brpop",
|
||||
"lindex",
|
||||
"llen",
|
||||
"lpop",
|
||||
"lrange",
|
||||
"rpop",
|
||||
"scard",
|
||||
"srandmember",
|
||||
"spop",
|
||||
"sscan",
|
||||
"smove",
|
||||
"zlexcount",
|
||||
"zscore",
|
||||
"zscan",
|
||||
"zcard",
|
||||
"zcount",
|
||||
"xget",
|
||||
"get",
|
||||
"xread",
|
||||
"xlen",
|
||||
"xrange",
|
||||
"xrevrange"
|
||||
));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
~
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>jedis-plugins</artifactId>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
|
|||
import org.apache.skywalking.apm.util.StringUtil;
|
||||
import redis.clients.jedis.args.Rawable;
|
||||
import redis.clients.jedis.args.RawableFactory;
|
||||
import redis.clients.jedis.commands.ProtocolCommand;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Iterator;
|
||||
import java.util.Optional;
|
||||
|
|
@ -37,24 +37,27 @@ public abstract class AbstractConnectionInterceptor implements InstanceMethodsAr
|
|||
|
||||
private static final String UNKNOWN = "UNKNOWN";
|
||||
|
||||
private static final String CACHE_TYPE = "Redis";
|
||||
|
||||
@Override
|
||||
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, MethodInterceptResult result) throws Throwable {
|
||||
Iterator<Rawable> iterator = getCommands(allArguments);
|
||||
ProtocolCommand protocolCommand = null;
|
||||
String protocolCommand = null;
|
||||
if (iterator.hasNext()) {
|
||||
protocolCommand = (ProtocolCommand) iterator.next();
|
||||
protocolCommand = iterator.next().toString();
|
||||
}
|
||||
String cmd = protocolCommand == null ? UNKNOWN : protocolCommand.toString();
|
||||
String cmd = protocolCommand == null ? UNKNOWN : protocolCommand;
|
||||
String peer = String.valueOf(objInst.getSkyWalkingDynamicField());
|
||||
AbstractSpan span = ContextManager.createExitSpan("Jedis/" + cmd, peer);
|
||||
String params = readParamIfNecessary(iterator).map(arg -> cmd + " " + arg).orElse(cmd);
|
||||
Tags.DB_STATEMENT.set(span, params);
|
||||
span.setComponent(ComponentsDefine.JEDIS);
|
||||
Tags.DB_TYPE.set(span, "Redis");
|
||||
readKeyIfNecessary(iterator).ifPresent(key -> Tags.CACHE_KEY.set(span, key));
|
||||
Tags.CACHE_CMD.set(span, cmd);
|
||||
Tags.CACHE_TYPE.set(span, CACHE_TYPE);
|
||||
parseOperation(cmd).ifPresent(op -> Tags.CACHE_OP.set(span, op));
|
||||
SpanLayer.asCache(span);
|
||||
}
|
||||
|
||||
private Optional<String> readParamIfNecessary(Iterator<Rawable> iterator) {
|
||||
private Optional<String> readKeyIfNecessary(Iterator<Rawable> iterator) {
|
||||
if (JedisPluginConfig.Plugin.Jedis.TRACE_REDIS_PARAMETERS && iterator.hasNext()) {
|
||||
Rawable rawable = iterator.next();
|
||||
if (rawable instanceof RawableFactory.RawString) {
|
||||
|
|
@ -77,5 +80,15 @@ public abstract class AbstractConnectionInterceptor implements InstanceMethodsAr
|
|||
ContextManager.stopSpan(span);
|
||||
}
|
||||
|
||||
private Optional<String> parseOperation(String cmd) {
|
||||
if (JedisPluginConfig.Plugin.Jedis.OPERATION_MAPPING_READ.contains(cmd)) {
|
||||
return Optional.of("read");
|
||||
}
|
||||
if (JedisPluginConfig.Plugin.Jedis.OPERATION_MAPPING_WRITE.contains(cmd)) {
|
||||
return Optional.of("write");
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
protected abstract Iterator<Rawable> getCommands(Object[] allArguments);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,12 @@ package org.apache.skywalking.apm.plugin.jedis.v4;
|
|||
|
||||
import org.apache.skywalking.apm.agent.core.boot.PluginConfig;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class JedisPluginConfig {
|
||||
|
||||
public static class Plugin {
|
||||
@PluginConfig(root = JedisPluginConfig.class)
|
||||
public static class Jedis {
|
||||
|
|
@ -35,6 +40,120 @@ public class JedisPluginConfig {
|
|||
* Set a negative number to save specified length of parameter string to the tag.
|
||||
*/
|
||||
public static int REDIS_PARAMETER_MAX_LENGTH = 128;
|
||||
|
||||
|
||||
/**
|
||||
* Operation represent a cache span is "write" or "read" action , and "op"(operation) is tagged with key "cache.op" usually
|
||||
* This config term define which command should be converted to write Operation .
|
||||
*
|
||||
* @see org.apache.skywalking.apm.agent.core.context.tag.Tags#CACHE_OP
|
||||
* @see AbstractConnectionInterceptor#parseOperation(String)
|
||||
*/
|
||||
public static Set<String> OPERATION_MAPPING_WRITE = new HashSet<>(Arrays.asList(
|
||||
"GETSET",
|
||||
"SET",
|
||||
"SETBIT",
|
||||
"SETEX ",
|
||||
"SETNX ",
|
||||
"SETRANGE",
|
||||
"STRLEN ",
|
||||
"MSET",
|
||||
"MSETNX ",
|
||||
"PSETEX",
|
||||
"INCR ",
|
||||
"INCRBY ",
|
||||
"INCRBYFLOAT",
|
||||
"DECR ",
|
||||
"DECRBY ",
|
||||
"APPEND ",
|
||||
"HMSET",
|
||||
"HSET",
|
||||
"HSETNX ",
|
||||
"HINCRBY",
|
||||
"HINCRBYFLOAT",
|
||||
"HDEL",
|
||||
"RPOPLPUSH",
|
||||
"RPUSH",
|
||||
"RPUSHX",
|
||||
"LPUSH",
|
||||
"LPUSHX",
|
||||
"LREM",
|
||||
"LTRIM",
|
||||
"LSET",
|
||||
"BRPOPLPUSH",
|
||||
"LINSERT",
|
||||
"SADD",
|
||||
"SDIFF",
|
||||
"SDIFFstore",
|
||||
"SINTERSTORE",
|
||||
"SISMEMBER",
|
||||
"SREM",
|
||||
"SUNION",
|
||||
"SUNIONSTORE",
|
||||
"SINTER",
|
||||
"ZADD",
|
||||
"ZINCRBY",
|
||||
"ZINTERSTORE",
|
||||
"ZRANGE",
|
||||
"ZRANGEBYLEX",
|
||||
"ZRANGEBYSCORE",
|
||||
"ZRANK",
|
||||
"ZREM",
|
||||
"ZREMRANGEBYLEX",
|
||||
"ZREMRANGEBYRANK",
|
||||
"ZREMRANGEBYSCORE",
|
||||
"ZREVRANGE",
|
||||
"ZREVRANGEBYSCORE",
|
||||
"ZREVRANK",
|
||||
"ZUNIONSTORE",
|
||||
"XADD",
|
||||
"XDEL",
|
||||
"DEL",
|
||||
"XTRIM"
|
||||
));
|
||||
/**
|
||||
* Operation represent a cache span is "write" or "read" action , and "op"(operation) is tagged with key "cache.op" usually
|
||||
* This config term define which command should be converted to write Operation .
|
||||
*
|
||||
* @see org.apache.skywalking.apm.agent.core.context.tag.Tags#CACHE_OP
|
||||
* @see AbstractConnectionInterceptor#parseOperation(String)
|
||||
*/
|
||||
public static Set<String> OPERATION_MAPPING_READ = new HashSet<>(Arrays.asList("GET",
|
||||
"GETRANGE",
|
||||
"GETBIT ",
|
||||
"MGET",
|
||||
"HVALS",
|
||||
"HKEYS",
|
||||
"HLEN",
|
||||
"HEXISTS",
|
||||
"HGET",
|
||||
"HGETALL",
|
||||
"HMGET",
|
||||
"BLPOP",
|
||||
"BRPOP",
|
||||
"LINDEX",
|
||||
"LLEN",
|
||||
"LPOP",
|
||||
"LRANGE",
|
||||
"RPOP",
|
||||
"SCARD",
|
||||
"SRANDMEMBER",
|
||||
"SPOP",
|
||||
"SSCAN",
|
||||
"SMOVE",
|
||||
"ZLEXCOUNT",
|
||||
"ZSCORE",
|
||||
"ZSCAN",
|
||||
"ZCARD",
|
||||
"ZCOUNT",
|
||||
"XGET",
|
||||
"GET",
|
||||
"XREAD",
|
||||
"XLEN",
|
||||
"XRANGE",
|
||||
"XREVRANGE"
|
||||
));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.plugin.xmemcached.v2;
|
||||
|
||||
import org.apache.skywalking.apm.agent.core.boot.PluginConfig;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class MemcachedPluginConfig {
|
||||
public static class Plugin {
|
||||
@PluginConfig(root = MemcachedPluginConfig.class)
|
||||
public static class Memcached {
|
||||
/**
|
||||
* Operation represent a cache span is "write" or "read" action , and "op"(operation) is tagged with key "cache.op" usually
|
||||
* This config term define which command should be converted to write Operation .
|
||||
*
|
||||
* @see org.apache.skywalking.apm.agent.core.context.tag.Tags#CACHE_OP
|
||||
* @see XMemcachedMethodInterceptor#parseOperation(String)
|
||||
*/
|
||||
public static Set<String> OPERATION_MAPPING_WRITE = new HashSet<>(Arrays.asList(
|
||||
"set",
|
||||
"add",
|
||||
"replace",
|
||||
"append",
|
||||
"prepend",
|
||||
"cas",
|
||||
"delete",
|
||||
"touch",
|
||||
"incr",
|
||||
"decr"
|
||||
));
|
||||
/**
|
||||
* Operation represent a cache span is "write" or "read" action , and "op"(operation) is tagged with key "cache.op" usually
|
||||
* This config term define which command should be converted to write Operation .
|
||||
*
|
||||
* @see org.apache.skywalking.apm.agent.core.context.tag.Tags#CACHE_OP
|
||||
* @see XMemcachedMethodInterceptor#parseOperation(String)
|
||||
*/
|
||||
public static Set<String> OPERATION_MAPPING_READ = new HashSet<>(Arrays.asList(
|
||||
"get",
|
||||
"gets",
|
||||
"getAndTouch",
|
||||
"getKeys",
|
||||
"getKeysWithExpiryCheck",
|
||||
"getKeysNoDuplicateCheck"
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -18,17 +18,18 @@
|
|||
|
||||
package org.apache.skywalking.apm.plugin.xmemcached.v2;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import org.apache.skywalking.apm.agent.core.context.tag.Tags;
|
||||
import org.apache.skywalking.apm.agent.core.context.trace.SpanLayer;
|
||||
import org.apache.skywalking.apm.agent.core.context.ContextManager;
|
||||
import org.apache.skywalking.apm.agent.core.context.tag.Tags;
|
||||
import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
|
||||
import org.apache.skywalking.apm.agent.core.context.trace.SpanLayer;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult;
|
||||
import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* {@link XMemcachedMethodInterceptor} intercept the operation method, record the memcached host, operation name and the
|
||||
* key of the operation.
|
||||
|
|
@ -39,26 +40,39 @@ public class XMemcachedMethodInterceptor implements InstanceMethodsAroundInterce
|
|||
|
||||
@Override
|
||||
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
|
||||
MethodInterceptResult result) throws Throwable {
|
||||
MethodInterceptResult result) throws Throwable {
|
||||
String peer = String.valueOf(objInst.getSkyWalkingDynamicField());
|
||||
AbstractSpan span = ContextManager.createExitSpan(XMEMCACHED + method.getName(), peer);
|
||||
span.setComponent(ComponentsDefine.XMEMCACHED);
|
||||
Tags.DB_TYPE.set(span, ComponentsDefine.XMEMCACHED.getName());
|
||||
Tags.CACHE_TYPE.set(span, ComponentsDefine.XMEMCACHED.getName());
|
||||
Tags.CACHE_CMD.set(span, method.getName());
|
||||
Tags.CACHE_KEY.set(span, allArguments[0].toString());
|
||||
SpanLayer.asCache(span);
|
||||
Tags.DB_STATEMENT.set(span, method.getName() + " " + allArguments[0]);
|
||||
String methodName = method.getName();
|
||||
parseOperation(methodName).ifPresent(op -> Tags.CACHE_OP.set(span, op));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
|
||||
Object ret) throws Throwable {
|
||||
Object ret) throws Throwable {
|
||||
ContextManager.stopSpan();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
|
||||
Class<?>[] argumentsTypes, Throwable t) {
|
||||
Class<?>[] argumentsTypes, Throwable t) {
|
||||
AbstractSpan span = ContextManager.activeSpan();
|
||||
span.log(t);
|
||||
}
|
||||
|
||||
private Optional<String> parseOperation(String cmd) {
|
||||
if (MemcachedPluginConfig.Plugin.Memcached.OPERATION_MAPPING_READ.contains(cmd)) {
|
||||
return Optional.of("read");
|
||||
}
|
||||
if (MemcachedPluginConfig.Plugin.Memcached.OPERATION_MAPPING_WRITE.contains(cmd)) {
|
||||
return Optional.of("write");
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,8 +117,7 @@ public class XMemcachedInstrumentation extends ClassInstanceMethodsEnhancePlugin
|
|||
.or(named("cas"))
|
||||
.or(named("delete"))
|
||||
.or(named("touch"))
|
||||
.
|
||||
or(named("getAndTouch"))
|
||||
.or(named("getAndTouch"))
|
||||
.or(named("incr"))
|
||||
.or(named("decr"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,9 @@ public class XMemcachedMethodInterceptorTest {
|
|||
assertThat(SpanHelper.getComponentId(span), is(36));
|
||||
List<TagValuePair> tags = SpanHelper.getTags(span);
|
||||
assertThat(tags.get(0).getValue(), is("Xmemcached"));
|
||||
assertThat(tags.get(1).getValue(), is("set OperationKey"));
|
||||
assertThat(tags.get(1).getValue(), is("set"));
|
||||
assertThat(tags.get(2).getValue(), is("OperationKey"));
|
||||
assertThat(tags.get(3).getValue(), is("write"));
|
||||
assertThat(SpanHelper.getLayer(span), CoreMatchers.is(SpanLayer.CACHE));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,38 +29,40 @@ import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
|
|||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import static org.apache.skywalking.apm.plugin.ehcache.v2.EncacheOperationConvertor.parseOperation;
|
||||
import static org.apache.skywalking.apm.plugin.ehcache.v2.define.EhcachePluginInstrumentation.LOCK_ENHANCE_METHOD_SUFFIX;
|
||||
|
||||
public class EhcacheLockInterceptor implements InstanceMethodsAroundInterceptor {
|
||||
|
||||
@Override
|
||||
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
|
||||
MethodInterceptResult result) throws Throwable {
|
||||
MethodInterceptResult result) throws Throwable {
|
||||
EhcacheEnhanceInfo enhanceInfo = (EhcacheEnhanceInfo) objInst.getSkyWalkingDynamicField();
|
||||
|
||||
String operateName = method.getName()
|
||||
.substring(0, method.getName().length() - LOCK_ENHANCE_METHOD_SUFFIX.length());
|
||||
.substring(0, method.getName().length() - LOCK_ENHANCE_METHOD_SUFFIX.length());
|
||||
|
||||
AbstractSpan span = ContextManager.createLocalSpan("Ehcache/" + operateName + "/" + enhanceInfo.getCacheName());
|
||||
span.setComponent(ComponentsDefine.EHCACHE);
|
||||
SpanLayer.asCache(span);
|
||||
|
||||
Object element = allArguments[0];
|
||||
if (element != null) {
|
||||
Tags.DB_STATEMENT.set(span, element.toString());
|
||||
if (allArguments != null && allArguments.length > 0 && allArguments[0] instanceof String) {
|
||||
Tags.CACHE_KEY.set(span, enhanceInfo.getCacheName() + "." + allArguments[0]);
|
||||
}
|
||||
Tags.CACHE_TYPE.set(span, "Ehcache");
|
||||
Tags.CACHE_CMD.set(span, operateName);
|
||||
parseOperation(operateName).ifPresent(op -> Tags.CACHE_OP.set(span, op));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
|
||||
Object ret) throws Throwable {
|
||||
Object ret) throws Throwable {
|
||||
ContextManager.stopSpan();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
|
||||
Class<?>[] argumentsTypes, Throwable t) {
|
||||
Class<?>[] argumentsTypes, Throwable t) {
|
||||
ContextManager.activeSpan().log(t);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
package org.apache.skywalking.apm.plugin.ehcache.v2;
|
||||
|
||||
import org.apache.skywalking.apm.agent.core.context.ContextManager;
|
||||
import org.apache.skywalking.apm.agent.core.context.tag.Tags;
|
||||
import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
|
||||
import org.apache.skywalking.apm.agent.core.context.trace.SpanLayer;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
|
||||
|
|
@ -28,28 +29,37 @@ import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
|
|||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import static org.apache.skywalking.apm.plugin.ehcache.v2.EncacheOperationConvertor.parseOperation;
|
||||
|
||||
public class EhcacheOperateAllInterceptor implements InstanceMethodsAroundInterceptor {
|
||||
|
||||
@Override
|
||||
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
|
||||
MethodInterceptResult result) throws Throwable {
|
||||
MethodInterceptResult result) throws Throwable {
|
||||
EhcacheEnhanceInfo enhanceInfo = (EhcacheEnhanceInfo) objInst.getSkyWalkingDynamicField();
|
||||
|
||||
AbstractSpan span = ContextManager.createLocalSpan("Ehcache/" + method.getName() + "/" + enhanceInfo.getCacheName());
|
||||
String methodName = method.getName();
|
||||
AbstractSpan span = ContextManager.createLocalSpan("Ehcache/" + methodName + "/" + enhanceInfo.getCacheName());
|
||||
span.setComponent(ComponentsDefine.EHCACHE);
|
||||
SpanLayer.asCache(span);
|
||||
String key = enhanceInfo.getCacheName();
|
||||
if (allArguments != null && allArguments.length > 0 && allArguments[0] instanceof String) {
|
||||
Tags.CACHE_KEY.set(span, key + "." + allArguments[0]);
|
||||
}
|
||||
Tags.CACHE_TYPE.set(span, "Ehcache");
|
||||
Tags.CACHE_CMD.set(span, methodName);
|
||||
parseOperation(methodName).ifPresent(op -> Tags.CACHE_OP.set(span, op));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
|
||||
Object ret) throws Throwable {
|
||||
Object ret) throws Throwable {
|
||||
ContextManager.stopSpan();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
|
||||
Class<?>[] argumentsTypes, Throwable t) {
|
||||
Class<?>[] argumentsTypes, Throwable t) {
|
||||
ContextManager.activeSpan().log(t);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,33 +30,37 @@ import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
|
|||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import static org.apache.skywalking.apm.plugin.ehcache.v2.EncacheOperationConvertor.parseOperation;
|
||||
|
||||
public class EhcacheOperateElementInterceptor implements InstanceMethodsAroundInterceptor {
|
||||
|
||||
@Override
|
||||
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
|
||||
MethodInterceptResult result) throws Throwable {
|
||||
MethodInterceptResult result) throws Throwable {
|
||||
EhcacheEnhanceInfo enhanceInfo = (EhcacheEnhanceInfo) objInst.getSkyWalkingDynamicField();
|
||||
|
||||
AbstractSpan span = ContextManager.createLocalSpan("Ehcache/" + method.getName() + "/" + enhanceInfo.getCacheName());
|
||||
String methodName = method.getName();
|
||||
AbstractSpan span = ContextManager.createLocalSpan("Ehcache/" + methodName + "/" + enhanceInfo.getCacheName());
|
||||
span.setComponent(ComponentsDefine.EHCACHE);
|
||||
SpanLayer.asCache(span);
|
||||
|
||||
Element element = (Element) allArguments[0];
|
||||
if (element != null && element.getObjectKey() != null) {
|
||||
Tags.DB_STATEMENT.set(span, element.getObjectKey().toString());
|
||||
Tags.CACHE_KEY.set(span, enhanceInfo.getCacheName() + "." + element.getObjectKey());
|
||||
}
|
||||
Tags.CACHE_TYPE.set(span, "Ehcache");
|
||||
Tags.CACHE_CMD.set(span, methodName);
|
||||
parseOperation(methodName).ifPresent(op -> Tags.CACHE_OP.set(span, op));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
|
||||
Object ret) throws Throwable {
|
||||
Object ret) throws Throwable {
|
||||
ContextManager.stopSpan();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
|
||||
Class<?>[] argumentsTypes, Throwable t) {
|
||||
Class<?>[] argumentsTypes, Throwable t) {
|
||||
ContextManager.activeSpan().log(t);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,33 +29,36 @@ import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
|
|||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import static org.apache.skywalking.apm.plugin.ehcache.v2.EncacheOperationConvertor.parseOperation;
|
||||
|
||||
public class EhcacheOperateObjectInterceptor implements InstanceMethodsAroundInterceptor {
|
||||
|
||||
@Override
|
||||
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
|
||||
MethodInterceptResult result) throws Throwable {
|
||||
MethodInterceptResult result) throws Throwable {
|
||||
EhcacheEnhanceInfo enhanceInfo = (EhcacheEnhanceInfo) objInst.getSkyWalkingDynamicField();
|
||||
|
||||
AbstractSpan span = ContextManager.createLocalSpan("Ehcache/" + method.getName() + "/" + enhanceInfo.getCacheName());
|
||||
String methodName = method.getName();
|
||||
AbstractSpan span = ContextManager.createLocalSpan("Ehcache/" + methodName + "/" + enhanceInfo.getCacheName());
|
||||
span.setComponent(ComponentsDefine.EHCACHE);
|
||||
SpanLayer.asCache(span);
|
||||
|
||||
Object element = allArguments[0];
|
||||
if (element != null) {
|
||||
Tags.DB_STATEMENT.set(span, element.toString());
|
||||
if (allArguments != null && allArguments.length > 0 && allArguments[0] instanceof String) {
|
||||
Tags.CACHE_KEY.set(span, enhanceInfo.getCacheName() + "." + allArguments[0]);
|
||||
}
|
||||
Tags.CACHE_TYPE.set(span, "Ehcache");
|
||||
Tags.CACHE_CMD.set(span, methodName);
|
||||
parseOperation(methodName).ifPresent(op -> Tags.CACHE_OP.set(span, op));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
|
||||
Object ret) throws Throwable {
|
||||
Object ret) throws Throwable {
|
||||
ContextManager.stopSpan();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
|
||||
Class<?>[] argumentsTypes, Throwable t) {
|
||||
Class<?>[] argumentsTypes, Throwable t) {
|
||||
ContextManager.activeSpan().log(t);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.plugin.ehcache.v2;
|
||||
|
||||
import org.apache.skywalking.apm.agent.core.boot.PluginConfig;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class EhcachePluginConfig {
|
||||
public static class Plugin {
|
||||
@PluginConfig(root = EhcachePluginConfig.class)
|
||||
public static class Ehcache {
|
||||
/**
|
||||
* Operation represent a cache span is "write" or "read" action , and "op"(operation) is tagged with key "cache.op" usually
|
||||
* This config term define which command should be converted to write Operation .
|
||||
*
|
||||
* @see org.apache.skywalking.apm.agent.core.context.tag.Tags#CACHE_OP
|
||||
* @see EncacheOperationConvertor#parseOperation(String)
|
||||
*/
|
||||
public static Set<String> OPERATION_MAPPING_WRITE = new HashSet<>(Arrays.asList(
|
||||
"tryRemoveImmediately",
|
||||
"remove",
|
||||
"removeAndReturnElement",
|
||||
"removeAll",
|
||||
"removeQuiet",
|
||||
"removeWithWriter",
|
||||
"put",
|
||||
"putAll",
|
||||
"replace",
|
||||
"removeQuiet",
|
||||
"removeWithWriter",
|
||||
"removeElement",
|
||||
"removeAll",
|
||||
"putWithWriter",
|
||||
"putQuiet",
|
||||
"putIfAbsent",
|
||||
"putIfAbsent"
|
||||
));
|
||||
/**
|
||||
* Operation represent a cache span is "write" or "read" action , and "op"(operation) is tagged with key "cache.op" usually
|
||||
* This config term define which command should be converted to write Operation .
|
||||
*
|
||||
* @see org.apache.skywalking.apm.agent.core.context.tag.Tags#CACHE_OP
|
||||
* @see EncacheOperationConvertor#parseOperation(String)
|
||||
*/
|
||||
public static Set<String> OPERATION_MAPPING_READ = new HashSet<>(Arrays.asList(
|
||||
"get",
|
||||
"getAll",
|
||||
"getQuiet",
|
||||
"getKeys",
|
||||
"getKeysWithExpiryCheck",
|
||||
"getKeysNoDuplicateCheck",
|
||||
"releaseRead",
|
||||
"tryRead",
|
||||
"getWithLoader",
|
||||
"getAll",
|
||||
"loadAll",
|
||||
"getAllWithLoader"
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.plugin.ehcache.v2;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public class EncacheOperationConvertor {
|
||||
|
||||
public static Optional<String> parseOperation(String cmd) {
|
||||
if (EhcachePluginConfig.Plugin.Ehcache.OPERATION_MAPPING_READ.contains(cmd)) {
|
||||
return Optional.of("read");
|
||||
}
|
||||
if (EhcachePluginConfig.Plugin.Ehcache.OPERATION_MAPPING_WRITE.contains(cmd)) {
|
||||
return Optional.of("write");
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
|
@ -19,6 +19,7 @@
|
|||
package org.apache.skywalking.apm.plugin.guava.cache;
|
||||
|
||||
import org.apache.skywalking.apm.agent.core.context.ContextManager;
|
||||
import org.apache.skywalking.apm.agent.core.context.tag.Tags;
|
||||
import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
|
||||
import org.apache.skywalking.apm.agent.core.context.trace.SpanLayer;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
|
||||
|
|
@ -28,13 +29,22 @@ import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
|
|||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import static org.apache.skywalking.apm.plugin.guava.cache.GuavaCacheOperationConvertor.parseOperation;
|
||||
|
||||
public class GuavaCacheAllInterceptor implements InstanceMethodsAroundInterceptor {
|
||||
|
||||
@Override
|
||||
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, MethodInterceptResult result) throws Throwable {
|
||||
AbstractSpan span = ContextManager.createLocalSpan("GuavaCache/" + method.getName());
|
||||
String methodName = method.getName();
|
||||
AbstractSpan span = ContextManager.createLocalSpan("GuavaCache/" + methodName);
|
||||
span.setComponent(ComponentsDefine.GUAVA_CACHE);
|
||||
SpanLayer.asCache(span);
|
||||
Tags.CACHE_TYPE.set(span, "GuavaCache");
|
||||
Tags.CACHE_CMD.set(span, methodName);
|
||||
if (allArguments != null && allArguments.length > 0 && allArguments[0] instanceof String) {
|
||||
Tags.CACHE_KEY.set(span, allArguments[0].toString());
|
||||
}
|
||||
parseOperation(methodName).ifPresent(op -> Tags.CACHE_OP.set(span, op));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -27,18 +27,23 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceM
|
|||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult;
|
||||
import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
|
||||
|
||||
import static org.apache.skywalking.apm.plugin.guava.cache.GuavaCacheOperationConvertor.parseOperation;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
public class GuavaCacheInterceptor implements InstanceMethodsAroundInterceptor {
|
||||
|
||||
@Override
|
||||
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, MethodInterceptResult result) throws Throwable {
|
||||
String methodName = method.getName();
|
||||
AbstractSpan span = ContextManager.createLocalSpan("GuavaCache/" + method.getName());
|
||||
span.setComponent(ComponentsDefine.GUAVA_CACHE);
|
||||
Object key = allArguments[0];
|
||||
if (key != null) {
|
||||
Tags.DB_STATEMENT.set(span, key.toString());
|
||||
if (allArguments != null && allArguments.length > 0 && allArguments[0] instanceof String) {
|
||||
Tags.CACHE_KEY.set(span, allArguments[0].toString());
|
||||
}
|
||||
Tags.CACHE_TYPE.set(span, "GuavaCache");
|
||||
Tags.CACHE_CMD.set(span, methodName);
|
||||
parseOperation(methodName).ifPresent(op -> Tags.CACHE_OP.set(span, op));
|
||||
SpanLayer.asCache(span);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.plugin.guava.cache;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public class GuavaCacheOperationConvertor {
|
||||
|
||||
public static Optional<String> parseOperation(String cmd) {
|
||||
if (GuavaCachePluginConfig.Plugin.GuavaCache.OPERATION_MAPPING_READ.contains(cmd)) {
|
||||
return Optional.of("read");
|
||||
}
|
||||
if (GuavaCachePluginConfig.Plugin.GuavaCache.OPERATION_MAPPING_WRITE.contains(cmd)) {
|
||||
return Optional.of("write");
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.plugin.guava.cache;
|
||||
|
||||
import org.apache.skywalking.apm.agent.core.boot.PluginConfig;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class GuavaCachePluginConfig {
|
||||
public static class Plugin {
|
||||
@PluginConfig(root = GuavaCachePluginConfig.class)
|
||||
public static class GuavaCache {
|
||||
/**
|
||||
* Operation represent a cache span is "write" or "read" action , and "op"(operation) is tagged with key "cache.op" usually
|
||||
* This config term define which command should be converted to write Operation .
|
||||
*
|
||||
* @see org.apache.skywalking.apm.agent.core.context.tag.Tags#CACHE_OP
|
||||
* @see GuavaCacheOperationConvertor#parseOperation(String)
|
||||
*/
|
||||
public static Set<String> OPERATION_MAPPING_WRITE = new HashSet<>(Arrays.asList(
|
||||
"put",
|
||||
"putAll",
|
||||
"invalidate",
|
||||
"invalidateAll",
|
||||
"invalidateAll",
|
||||
"cleanUp"
|
||||
));
|
||||
/**
|
||||
* Operation represent a cache span is "write" or "read" action , and "op"(operation) is tagged with key "cache.op" usually
|
||||
* This config term define which command should be converted to write Operation .
|
||||
*
|
||||
* @see org.apache.skywalking.apm.agent.core.context.tag.Tags#CACHE_OP
|
||||
* @see GuavaCacheOperationConvertor#parseOperation(String)
|
||||
*/
|
||||
public static Set<String> OPERATION_MAPPING_READ = new HashSet<>(Arrays.asList(
|
||||
"getIfPresent",
|
||||
"get",
|
||||
"getAllPresent",
|
||||
"size"
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -186,7 +186,26 @@ The value of `x-le` should be in JSON format. There are two options:
|
|||
}
|
||||
```
|
||||
|
||||
#### Vitural Cache Relative Tags
|
||||
Skywalking analysis cache performance related metrics through the following tags.
|
||||
|
||||
```java
|
||||
public static final StringTag CACHE_TYPE = new StringTag(15, "cache.type");
|
||||
public static final StringTag CACHE_CMD = new StringTag(17, "cache.cmd");
|
||||
public static final StringTag CACHE_OP = new StringTag(16, "cache.op");
|
||||
public static final StringTag CACHE_KEY = new StringTag(18, "cache.key");
|
||||
```
|
||||
|
||||
* `cache.type` indicates the cache type , usually it's cache client library name (e.g. Jedis)
|
||||
* `cache.cmd` indicates the cache command that would be sent to cache server (e.g. setnx)
|
||||
* `cache.op` indicates the command is used for `write` or `read` operation , usually the value is converting from `command`
|
||||
* `cache.key` indicates the cache key that would be sent to cache server , this tag maybe null , as string type key would be collected usually.
|
||||
|
||||
In order to decide which `op` should be converted to flexibly , It's better that providing config property .
|
||||
Reference [Jedis-4.x-plugin](https://github.com/apache/skywalking-java/blob/main/apm-sniffer/apm-sdk-plugin/jedis-plugins/jedis-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jedis/v4/JedisPluginConfig.java)
|
||||
|
||||
### Advanced APIs
|
||||
|
||||
#### Async Span APIs
|
||||
There is a set of advanced APIs in Span which is specifically designed for async use cases. When tags, logs, and attributes (including end time) of the span need to be set in another thread, you should use these APIs.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,118 +1,127 @@
|
|||
# Table of Agent Configuration Properties
|
||||
This is the properties list supported in `agent/config/agent.config`.
|
||||
|
||||
| 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 `<group name>::<logic name>` 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: <br> * `%level` means log level. <br> * `%timestamp` means now of time with format `yyyy-MM-dd HH:mm:ss:SSS`.<br> * `%thread` means name of current thread.<br> * `%msg` means some message which user logged. <br> * `%class` means SimpleName of TargetClass. <br> * `%throwable` means a throwable which user called. <br> * `%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,Multiple plugins are separated by comma.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` |
|
||||
| `plugin.cpupolicy.sample_cpu_usage_percent_limit` | If set to a positive number and activate `trace sampler CPU policy plugin`, the trace would not be collected when agent process CPU usage percent is greater than `plugin.cpupolicy.sample_cpu_usage_percent_limit`. | SW_SAMPLE_CPU_USAGE_PERCENT_LIMIT | `-1` |
|
||||
| `plugin.micronauthttpclient.collect_http_params` | This config item controls that whether the Micronaut http client plugin should collect the parameters of the request. Also, activate implicitly in the profiled trace. | SW_PLUGIN_MICRONAUTHTTPCLIENT_COLLECT_HTTP_PARAMS | `false` |
|
||||
| `plugin.micronauthttpserver.collect_http_params` | This config item controls that whether the Micronaut http server plugin should collect the parameters of the request. Also, activate implicitly in the profiled trace. | SW_PLUGIN_MICRONAUTHTTPSERVER_COLLECT_HTTP_PARAMS | `false` |
|
||||
| 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 `<group name>::<logic name>` 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: <br> * `%level` means log level. <br> * `%timestamp` means now of time with format `yyyy-MM-dd HH:mm:ss:SSS`.<br> * `%thread` means name of current thread.<br> * `%msg` means some message which user logged. <br> * `%class` means SimpleName of TargetClass. <br> * `%throwable` means a throwable which user called. <br> * `%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,Multiple plugins are separated by comma.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.jedis.operation_mapping_write` | Specify which command should be converted to `write` operation | SW_PLUGIN_JEDIS_OPERATION_MAPPING_READ | |
|
||||
| `plugin.jedis.operation_mapping_read ` | Specify which command should be converted to `read` operation | SW_PLUGIN_JEDIS_OPERATION_MAPPING_WRITE | Referenc [Jedis-4.x-plugin](https://github.com/apache/skywalking-java/blob/main/apm-sniffer/apm-sdk-plugin/jedis-plugins/jedis-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jedis/v4/JedisPluginConfig.java) [jedis-2.x-3.x-plugin](https://github.com/apache/skywalking-java/blob/main/apm-sniffer/apm-sdk-plugin/jedis-plugins/jedis-2.x-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jedis/v3/JedisPluginConfig.java) |
|
||||
| `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` |
|
||||
| `plugin.cpupolicy.sample_cpu_usage_percent_limit` | If set to a positive number and activate `trace sampler CPU policy plugin`, the trace would not be collected when agent process CPU usage percent is greater than `plugin.cpupolicy.sample_cpu_usage_percent_limit`. | SW_SAMPLE_CPU_USAGE_PERCENT_LIMIT | `-1` |
|
||||
| `plugin.micronauthttpclient.collect_http_params` | This config item controls that whether the Micronaut http client plugin should collect the parameters of the request. Also, activate implicitly in the profiled trace. | SW_PLUGIN_MICRONAUTHTTPCLIENT_COLLECT_HTTP_PARAMS | `false` |
|
||||
| `plugin.micronauthttpserver.collect_http_params` | This config item controls that whether the Micronaut http server plugin should collect the parameters of the request. Also, activate implicitly in the profiled trace. | SW_PLUGIN_MICRONAUTHTTPSERVER_COLLECT_HTTP_PARAMS | `false` |
|
||||
| `plugin.memcached.operation_mapping_write` | Specify which command should be converted to `write` operation | SW_PLUGIN_MEMCACHED_OPERATION_MAPPING_READ | `get,gets,getAndTouch,getKeys,getKeysWithExpiryCheck,getKeysNoDuplicateCheck` |
|
||||
| `plugin.memcached.operation_mapping_read` | Specify which command should be converted to `read` operation | SW_PLUGIN_MEMCACHED_OPERATION_MAPPING_WRITE | `set,add,replace,append,prepend,cas,delete,touch,incr,decr` |
|
||||
| `plugin.ehcache.operation_mapping_write` | Specify which command should be converted to `write` operation | SW_PLUGIN_EHCACHE_OPERATION_MAPPING_READ | `get,getAll,getQuiet,getKeys,getKeysWithExpiryCheck,getKeysNoDuplicateCheck,releaseRead,tryRead,getWithLoader,getAll,loadAll,getAllWithLoader` |
|
||||
| `plugin.ehcache.operation_mapping_read` | Specify which command should be converted to `read` operation | SW_PLUGIN_EHCACHE_OPERATION_MAPPING_WRITE | `tryRemoveImmediately,remove,removeAndReturnElement,removeAll,removeQuiet,removeWithWriter,put,putAll,replace,removeQuiet,removeWithWriter,removeElement,removeAll,putWithWriter,putQuiet,putIfAbsent,putIfAbsent` |
|
||||
| `plugin.guavacache.operation_mapping_write` | Specify which command should be converted to `write` operation | SW_PLUGIN_GUAVACACHE_OPERATION_MAPPING_READ | `getIfPresent,get,getAllPresent,size` |
|
||||
| `plugin.guavacache.operation_mapping_read` | Specify which command should be converted to `read` operation | SW_PLUGIN_GUAVACACHE_OPERATION_MAPPING_WRITE | `put,putAll,invalidate,invalidateAll,invalidateAll,cleanUp` |
|
||||
|
||||
|
||||
# Reset Collection/Map type configurations as empty collection.
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,10 @@ segmentItems:
|
|||
spanType: Local
|
||||
peer: ''
|
||||
tags:
|
||||
- {key: db.statement, value: dataKey}
|
||||
- {key: cache.key, value: testCache.dataKey}
|
||||
- {key: cache.type, value: Ehcache}
|
||||
- {key: cache.cmd, value: put}
|
||||
- {key: cache.op, value: write}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: Ehcache/get/testCache
|
||||
parentSpanId: 0
|
||||
|
|
@ -43,7 +46,10 @@ segmentItems:
|
|||
spanType: Local
|
||||
peer: ''
|
||||
tags:
|
||||
- {key: db.statement, value: dataKey}
|
||||
- {key: cache.key, value: testCache.dataKey}
|
||||
- {key: cache.type, value: Ehcache}
|
||||
- {key: cache.cmd, value: get}
|
||||
- {key: cache.op, value: read}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: Ehcache/putAll/testCache
|
||||
parentSpanId: 0
|
||||
|
|
@ -56,6 +62,10 @@ segmentItems:
|
|||
spanType: Local
|
||||
peer: ''
|
||||
skipAnalysis: 'false'
|
||||
tags:
|
||||
- {key: cache.type, value: Ehcache}
|
||||
- {key: cache.cmd, value: putAll}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: Ehcache/tryRead/testCache
|
||||
parentSpanId: 0
|
||||
spanId: 4
|
||||
|
|
@ -67,7 +77,10 @@ segmentItems:
|
|||
spanType: Local
|
||||
peer: ''
|
||||
tags:
|
||||
- {key: db.statement, value: dataKey}
|
||||
- {key: cache.key, value: testCache.dataKey}
|
||||
- {key: cache.type, value: Ehcache}
|
||||
- {key: cache.cmd, value: tryRead}
|
||||
- {key: cache.op, value: read}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: Ehcache/releaseRead/testCache
|
||||
parentSpanId: 0
|
||||
|
|
@ -80,7 +93,10 @@ segmentItems:
|
|||
spanType: Local
|
||||
peer: ''
|
||||
tags:
|
||||
- {key: db.statement, value: dataKey}
|
||||
- {key: cache.key, value: testCache.dataKey}
|
||||
- {key: cache.type, value: Ehcache}
|
||||
- {key: cache.cmd, value: releaseRead}
|
||||
- {key: cache.op, value: read}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: Ehcache/put/testCache2
|
||||
parentSpanId: 0
|
||||
|
|
@ -93,7 +109,10 @@ segmentItems:
|
|||
spanType: Local
|
||||
peer: ''
|
||||
tags:
|
||||
- {key: db.statement, value: dataKey}
|
||||
- {key: cache.key, value: testCache2.dataKey}
|
||||
- {key: cache.type, value: Ehcache}
|
||||
- {key: cache.cmd, value: put}
|
||||
- {key: cache.op, value: write}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: GET:/ehcache-2.x-scenario/case/ehcache
|
||||
parentSpanId: -1
|
||||
|
|
|
|||
|
|
@ -30,7 +30,10 @@ segmentItems:
|
|||
spanType: Local
|
||||
peer: ''
|
||||
tags:
|
||||
- {key: db.statement, value: testKey1}
|
||||
- {key: cache.key, value: testKey1}
|
||||
- {key: cache.type, value: GuavaCache}
|
||||
- {key: cache.cmd, value: put}
|
||||
- {key: cache.op, value: write}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: GuavaCache/invalidate
|
||||
parentSpanId: 0
|
||||
|
|
@ -43,7 +46,10 @@ segmentItems:
|
|||
spanType: Local
|
||||
peer: ''
|
||||
tags:
|
||||
- {key: db.statement, value: testKey1}
|
||||
- {key: cache.key, value: testKey1}
|
||||
- {key: cache.type, value: GuavaCache}
|
||||
- {key: cache.cmd, value: invalidate}
|
||||
- {key: cache.op, value: write}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: GuavaCache/get
|
||||
parentSpanId: 0
|
||||
|
|
@ -56,7 +62,10 @@ segmentItems:
|
|||
spanType: Local
|
||||
peer: ''
|
||||
tags:
|
||||
- {key: db.statement, value: testKey1}
|
||||
- {key: cache.key, value: testKey1}
|
||||
- {key: cache.type, value: GuavaCache}
|
||||
- {key: cache.cmd, value: get}
|
||||
- {key: cache.op, value: read}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: GuavaCache/getIfPresent
|
||||
parentSpanId: 0
|
||||
|
|
@ -69,7 +78,10 @@ segmentItems:
|
|||
spanType: Local
|
||||
peer: ''
|
||||
tags:
|
||||
- {key: db.statement, value: testKey1}
|
||||
- {key: cache.key, value: testKey1}
|
||||
- {key: cache.type, value: GuavaCache}
|
||||
- {key: cache.cmd, value: getIfPresent}
|
||||
- {key: cache.op, value: read}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: GuavaCache/putAll
|
||||
parentSpanId: 0
|
||||
|
|
@ -82,6 +94,10 @@ segmentItems:
|
|||
spanType: Local
|
||||
peer: ''
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: cache.type, value: GuavaCache}
|
||||
- {key: cache.cmd, value: putAll}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: GuavaCache/getAllPresent
|
||||
parentSpanId: 0
|
||||
spanId: 6
|
||||
|
|
@ -93,6 +109,10 @@ segmentItems:
|
|||
spanType: Local
|
||||
peer: ''
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: cache.type, value: GuavaCache}
|
||||
- {key: cache.cmd, value: getAllPresent}
|
||||
- {key: cache.op, value: read}
|
||||
- operationName: GuavaCache/invalidateAll
|
||||
parentSpanId: 0
|
||||
spanId: 7
|
||||
|
|
@ -104,6 +124,10 @@ segmentItems:
|
|||
spanType: Local
|
||||
peer: ''
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: cache.type, value: GuavaCache}
|
||||
- {key: cache.cmd, value: invalidateAll}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: GET:/guava-cache-scenario/case/guava
|
||||
parentSpanId: -1
|
||||
spanId: 0
|
||||
|
|
|
|||
|
|
@ -32,8 +32,9 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: echo Test}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: echo}
|
||||
- {key: cache.key, value: Test}
|
||||
- operationName: Jedis/set
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -47,8 +48,10 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: set a}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: set}
|
||||
- {key: cache.key, value: a}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: Jedis/get
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -62,8 +65,10 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: get a}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: get}
|
||||
- {key: cache.key, value: a}
|
||||
- {key: cache.op, value: read}
|
||||
- operationName: Jedis/del
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -77,8 +82,10 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: del a}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: del}
|
||||
- {key: cache.key, value: a}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: Jedis/hset
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -92,8 +99,10 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: hset a}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: hset}
|
||||
- {key: cache.key, value: a}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: Jedis/hget
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -107,8 +116,10 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: hget a}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: hget}
|
||||
- {key: cache.key, value: a}
|
||||
- {key: cache.op, value: read}
|
||||
- operationName: Jedis/hdel
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -122,8 +133,10 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: hdel a}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: hdel}
|
||||
- {key: cache.key, value: a}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: Jedis/set
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -137,8 +150,10 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: set key}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: set}
|
||||
- {key: cache.key, value: key}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: Jedis/expire
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -152,8 +167,9 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: expire key}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: expire}
|
||||
- {key: cache.key, value: key}
|
||||
- operationName: GET:/jedis-scenario/case/jedis-scenario
|
||||
operationId: 0
|
||||
parentSpanId: -1
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
segmentItems:
|
||||
- serviceName: jedis-3.1.x-plus-scenario
|
||||
segmentSize: ge 1
|
||||
|
|
@ -26,187 +25,209 @@ segmentItems:
|
|||
parentSpanId: 0
|
||||
spanId: 1
|
||||
spanLayer: Cache
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
componentId: 30
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: echo Test}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: echo}
|
||||
- {key: cache.key, value: Test}
|
||||
- operationName: Jedis/set
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
spanId: 2
|
||||
spanLayer: Cache
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
componentId: 30
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: set a}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: set}
|
||||
- {key: cache.key, value: a}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: Jedis/get
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
spanId: 3
|
||||
spanLayer: Cache
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
componentId: 30
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: get a}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: get}
|
||||
- {key: cache.key, value: a}
|
||||
- {key: cache.op, value: read}
|
||||
- operationName: Jedis/del
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
spanId: 4
|
||||
spanLayer: Cache
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
componentId: 30
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: del a}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: del}
|
||||
- {key: cache.key, value: a}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: Jedis/hset
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
spanId: 5
|
||||
spanLayer: Cache
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
componentId: 30
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: hset a}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: hset}
|
||||
- {key: cache.key, value: a}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: Jedis/hget
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
spanId: 6
|
||||
spanLayer: Cache
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
componentId: 30
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: hget a}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: hget}
|
||||
- {key: cache.key, value: a}
|
||||
- {key: cache.op, value: read}
|
||||
- operationName: Jedis/hdel
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
spanId: 7
|
||||
spanLayer: Cache
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
componentId: 30
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: hdel a}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: hdel}
|
||||
- {key: cache.key, value: a}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: Jedis/set
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
spanId: 8
|
||||
spanLayer: Cache
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
componentId: 30
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: set key}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: set}
|
||||
- {key: cache.key, value: key}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: Jedis/expire
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
spanId: 9
|
||||
spanLayer: Cache
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
componentId: 30
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: expire key}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: expire}
|
||||
- {key: cache.key, value: key}
|
||||
- operationName: Jedis/xadd
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
spanId: 10
|
||||
spanLayer: Cache
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
componentId: 30
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: xadd abc}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: xadd}
|
||||
- {key: cache.key, value: abc}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: Jedis/xread
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
spanId: 11
|
||||
spanLayer: Cache
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
componentId: 30
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: xread}
|
||||
- {key: cache.op, value: read}
|
||||
- operationName: Jedis/xdel
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
spanId: 12
|
||||
spanLayer: Cache
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
componentId: 30
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: db.statement, value: xdel abc}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.cmd, value: xdel}
|
||||
- {key: cache.key, value: abc}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: GET:/jedis-scenario/case/jedis-scenario
|
||||
operationId: 0
|
||||
parentSpanId: -1
|
||||
spanId: 0
|
||||
spanLayer: Http
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
startTime: gt 0
|
||||
endTime: gt 0
|
||||
componentId: 1
|
||||
isError: false
|
||||
spanType: Entry
|
||||
|
|
|
|||
|
|
@ -33,8 +33,9 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.statement, value: ECHO Test}
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: cache.key, value: Test}
|
||||
- {key: cache.cmd, value: ECHO}
|
||||
- {key: cache.type, value: Redis}
|
||||
- operationName: Jedis/SET
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -48,8 +49,10 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.statement, value: SET a}
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: cache.key, value: a}
|
||||
- {key: cache.cmd, value: SET}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: Jedis/GET
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -63,8 +66,10 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.statement, value: GET a}
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: cache.key, value: a}
|
||||
- {key: cache.cmd, value: GET}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.op, value: read}
|
||||
- operationName: Jedis/DEL
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -78,8 +83,10 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.statement, value: DEL a}
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: cache.key, value: a}
|
||||
- {key: cache.cmd, value: DEL}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: Jedis/HSET
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -93,8 +100,10 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.statement, value: HSET a}
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: cache.key, value: a}
|
||||
- {key: cache.cmd, value: HSET}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: Jedis/HGET
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -108,8 +117,10 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.statement, value: HGET a}
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: cache.key, value: a}
|
||||
- {key: cache.cmd, value: HGET}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.op, value: read}
|
||||
- operationName: Jedis/HDEL
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -123,8 +134,10 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.statement, value: HDEL a}
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: cache.key, value: a}
|
||||
- {key: cache.cmd, value: HDEL}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: Jedis/MULTI
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -138,8 +151,8 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.statement, value: MULTI}
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: cache.cmd, value: MULTI}
|
||||
- {key: cache.type, value: Redis}
|
||||
- operationName: Jedis/SET
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -153,8 +166,10 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.statement, value: SET key}
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: cache.key, value: key}
|
||||
- {key: cache.cmd, value: SET}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: Jedis/EXPIRE
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -168,8 +183,9 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.statement, value: EXPIRE key}
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: cache.key, value: key}
|
||||
- {key: cache.cmd, value: EXPIRE}
|
||||
- {key: cache.type, value: Redis}
|
||||
- operationName: Jedis/EXEC
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -183,8 +199,8 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.statement, value: EXEC}
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: cache.cmd, value: EXEC}
|
||||
- {key: cache.type, value: Redis}
|
||||
- operationName: Jedis/XADD
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -198,8 +214,10 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.statement, value: XADD abc}
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: cache.key, value: abc}
|
||||
- {key: cache.cmd, value: XADD}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: Jedis/XREAD
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -213,8 +231,9 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.statement, value: XREAD}
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: cache.cmd, value: XREAD}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.op, value: read}
|
||||
- operationName: Jedis/XDEL
|
||||
operationId: 0
|
||||
parentSpanId: 0
|
||||
|
|
@ -228,8 +247,10 @@ segmentItems:
|
|||
peer: redis-server:6379
|
||||
skipAnalysis: false
|
||||
tags:
|
||||
- {key: db.statement, value: XDEL abc}
|
||||
- {key: db.type, value: Redis}
|
||||
- {key: cache.key, value: abc}
|
||||
- {key: cache.cmd, value: XDEL}
|
||||
- {key: cache.type, value: Redis}
|
||||
- {key: cache.op, value: write}
|
||||
- operationName: GET:/jedis-scenario/case/jedis-scenario
|
||||
operationId: 0
|
||||
parentSpanId: -1
|
||||
|
|
|
|||
Loading…
Reference in New Issue