Merge pull request #182 from wu-sheng/feature/181
Rename the "apm-api" module to "apm-agent-core”.
This commit is contained in:
commit
e6ea5e11d0
|
|
@ -6,7 +6,7 @@ import com.typesafe.config.ConfigFactory;
|
|||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.skywalking.apm.api.util.StringUtil;
|
||||
import org.skywalking.apm.util.StringUtil;
|
||||
import org.skywalking.apm.collector.cluster.ClusterConfig;
|
||||
import org.skywalking.apm.collector.cluster.Const;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package org.skywalking.apm.collector.cluster;
|
||||
|
||||
import org.skywalking.apm.api.util.StringUtil;
|
||||
import org.skywalking.apm.util.StringUtil;
|
||||
import org.skywalking.apm.collector.config.ConfigProvider;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public enum ConfigInitializer {
|
|||
for (ConfigProvider provider : configProviders) {
|
||||
logger.info("configProvider provider name: %s", provider.getClass().getName());
|
||||
Class configClass = provider.configClass();
|
||||
org.skywalking.apm.api.util.ConfigInitializer.initialize(properties, configClass);
|
||||
org.skywalking.apm.util.ConfigInitializer.initialize(properties, configClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package org.skywalking.apm.collector.worker.config;
|
||||
|
||||
import org.skywalking.apm.api.util.StringUtil;
|
||||
import org.skywalking.apm.util.StringUtil;
|
||||
import org.skywalking.apm.collector.config.ConfigProvider;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package org.skywalking.apm.collector.worker.config;
|
||||
|
||||
import org.skywalking.apm.api.util.StringUtil;
|
||||
import org.skywalking.apm.util.StringUtil;
|
||||
import org.skywalking.apm.collector.config.ConfigProvider;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import com.google.gson.Gson;
|
|||
import com.google.gson.JsonObject;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.skywalking.apm.api.util.StringUtil;
|
||||
import org.skywalking.apm.util.StringUtil;
|
||||
import org.skywalking.apm.collector.actor.*;
|
||||
import org.skywalking.apm.collector.actor.selector.RollingSelector;
|
||||
import org.skywalking.apm.collector.actor.selector.WorkerSelector;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package org.skywalking.apm.collector.worker.segment;
|
|||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.skywalking.apm.api.util.StringUtil;
|
||||
import org.skywalking.apm.util.StringUtil;
|
||||
import org.skywalking.apm.collector.actor.ClusterWorkerContext;
|
||||
import org.skywalking.apm.collector.actor.LocalWorkerContext;
|
||||
import org.skywalking.apm.collector.actor.ProviderNotFoundException;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package org.skywalking.apm.collector.worker.tools;
|
||||
|
||||
import org.skywalking.apm.api.util.StringUtil;
|
||||
import org.skywalking.apm.util.StringUtil;
|
||||
import org.skywalking.apm.collector.worker.Const;
|
||||
import org.skywalking.apm.collector.worker.segment.entity.Span;
|
||||
import org.skywalking.apm.collector.worker.segment.entity.tag.Tags;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package org.skywalking.apm.trace;
|
||||
|
||||
import org.skywalking.apm.api.util.MachineInfo;
|
||||
import org.skywalking.apm.api.util.StringUtil;
|
||||
import org.skywalking.apm.util.MachineInfo;
|
||||
import org.skywalking.apm.util.StringUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.util;
|
||||
package org.skywalking.apm.util;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.util;
|
||||
package org.skywalking.apm.util;
|
||||
|
||||
import java.lang.management.ManagementFactory;
|
||||
import java.net.InetAddress;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.util;
|
||||
package org.skywalking.apm.util;
|
||||
|
||||
public final class StringUtil {
|
||||
public static boolean isEmpty(String str) {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.util;
|
||||
package org.skywalking.apm.util;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.util;
|
||||
package org.skywalking.apm.util;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
|
@ -8,10 +8,10 @@
|
|||
<version>3.1-2017</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>apm-api</artifactId>
|
||||
<artifactId>apm-agent-core</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>apm-api</name>
|
||||
<name>apm-agent-core</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<properties>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.boot;
|
||||
package org.skywalking.apm.agent.core.boot;
|
||||
|
||||
/**
|
||||
* The <code>BootService</code> is an interface to all services, which need to boot when plugin mechanism begins to
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.boot;
|
||||
package org.skywalking.apm.agent.core.boot;
|
||||
|
||||
import org.skywalking.apm.logging.ILog;
|
||||
import org.skywalking.apm.logging.LogManager;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.boot;
|
||||
package org.skywalking.apm.agent.core.boot;
|
||||
|
||||
/**
|
||||
* The <code>StatusBootService</code> is an abstract implementations of {@link BootService}, it extends {@link
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.client;
|
||||
package org.skywalking.apm.agent.core.client;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
|
@ -8,9 +8,9 @@ import org.apache.http.entity.ContentType;
|
|||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.skywalking.apm.api.boot.ServiceManager;
|
||||
import org.skywalking.apm.api.conf.Config;
|
||||
import org.skywalking.apm.api.queue.TraceSegmentProcessQueue;
|
||||
import org.skywalking.apm.agent.core.boot.ServiceManager;
|
||||
import org.skywalking.apm.agent.core.conf.Config;
|
||||
import org.skywalking.apm.agent.core.queue.TraceSegmentProcessQueue;
|
||||
import org.skywalking.apm.logging.ILog;
|
||||
import org.skywalking.apm.logging.LogManager;
|
||||
import org.skywalking.apm.trace.SegmentsMessage;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package org.skywalking.apm.api.client;
|
||||
package org.skywalking.apm.agent.core.client;
|
||||
|
||||
import org.skywalking.apm.api.boot.StatusBootService;
|
||||
import org.skywalking.apm.api.queue.TraceSegmentProcessQueue;
|
||||
import org.skywalking.apm.agent.core.queue.TraceSegmentProcessQueue;
|
||||
import org.skywalking.apm.agent.core.boot.StatusBootService;
|
||||
import org.skywalking.apm.trace.TraceSegment;
|
||||
|
||||
/**
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.client;
|
||||
package org.skywalking.apm.agent.core.client;
|
||||
|
||||
/**
|
||||
* The <code>RESTResponseStatusError</code> represents the REST-Service client got an unexpected response code.
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package org.skywalking.apm.api.conf;
|
||||
package org.skywalking.apm.agent.core.conf;
|
||||
|
||||
import org.skywalking.apm.api.logging.LogLevel;
|
||||
import org.skywalking.apm.api.logging.WriterFactory;
|
||||
import org.skywalking.apm.agent.core.logging.LogLevel;
|
||||
import org.skywalking.apm.agent.core.logging.WriterFactory;
|
||||
|
||||
/**
|
||||
* This is the core config in sniffer agent.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.conf;
|
||||
package org.skywalking.apm.agent.core.conf;
|
||||
|
||||
public class Constants {
|
||||
public static String PATH_SEPARATOR = System.getProperty("file.separator", "/");
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package org.skywalking.apm.api.conf;
|
||||
package org.skywalking.apm.agent.core.conf;
|
||||
|
||||
import org.skywalking.apm.api.util.ConfigInitializer;
|
||||
import org.skywalking.apm.api.util.StringUtil;
|
||||
import org.skywalking.apm.util.StringUtil;
|
||||
import org.skywalking.apm.util.ConfigInitializer;
|
||||
import org.skywalking.apm.logging.ILog;
|
||||
import org.skywalking.apm.logging.LogManager;
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package org.skywalking.apm.api.context;
|
||||
package org.skywalking.apm.agent.core.context;
|
||||
|
||||
import org.skywalking.apm.api.util.StringUtil;
|
||||
import org.skywalking.apm.util.StringUtil;
|
||||
import org.skywalking.apm.trace.Span;
|
||||
import org.skywalking.apm.trace.TraceId.DistributedTraceId;
|
||||
import org.skywalking.apm.trace.TraceId.PropagatedTraceId;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package org.skywalking.apm.api.context;
|
||||
package org.skywalking.apm.agent.core.context;
|
||||
|
||||
import org.skywalking.apm.api.boot.BootService;
|
||||
import org.skywalking.apm.agent.core.boot.BootService;
|
||||
import org.skywalking.apm.trace.Span;
|
||||
import org.skywalking.apm.trace.TraceSegment;
|
||||
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package org.skywalking.apm.api.context;
|
||||
package org.skywalking.apm.agent.core.context;
|
||||
|
||||
import org.skywalking.apm.api.boot.ServiceManager;
|
||||
import org.skywalking.apm.api.conf.Config;
|
||||
import org.skywalking.apm.api.sampling.SamplingService;
|
||||
import org.skywalking.apm.agent.core.conf.Config;
|
||||
import org.skywalking.apm.agent.core.boot.ServiceManager;
|
||||
import org.skywalking.apm.agent.core.sampling.SamplingService;
|
||||
import org.skywalking.apm.trace.Span;
|
||||
import org.skywalking.apm.trace.TraceSegment;
|
||||
import org.skywalking.apm.trace.TraceSegmentRef;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.context;
|
||||
package org.skywalking.apm.agent.core.context;
|
||||
|
||||
import org.skywalking.apm.trace.TraceSegment;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.logging;
|
||||
package org.skywalking.apm.agent.core.logging;
|
||||
|
||||
import org.skywalking.apm.logging.ILog;
|
||||
import org.skywalking.apm.logging.LogResolver;
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
package org.skywalking.apm.api.logging;
|
||||
package org.skywalking.apm.agent.core.logging;
|
||||
|
||||
import org.skywalking.apm.api.conf.Constants;
|
||||
import org.skywalking.apm.api.util.StringUtil;
|
||||
import org.skywalking.apm.agent.core.conf.Config;
|
||||
import org.skywalking.apm.agent.core.conf.Constants;
|
||||
import org.skywalking.apm.util.StringUtil;
|
||||
import org.skywalking.apm.logging.ILog;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
|
@ -10,9 +11,6 @@ import java.net.URLEncoder;
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import static org.skywalking.apm.api.conf.Config.Logging.LEVEL;
|
||||
import static org.skywalking.apm.api.logging.LogLevel.*;
|
||||
|
||||
/**
|
||||
* The <code>EasyLogger</code> is a simple implementation of {@link ILog}.
|
||||
*
|
||||
|
|
@ -72,71 +70,71 @@ public class EasyLogger implements ILog {
|
|||
@Override
|
||||
public void info(String format) {
|
||||
if (isInfoEnable())
|
||||
logger(INFO, format, null);
|
||||
logger(LogLevel.INFO, format, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void info(String format, Object... arguments) {
|
||||
if (isInfoEnable())
|
||||
logger(INFO, replaceParam(format, arguments), null);
|
||||
logger(LogLevel.INFO, replaceParam(format, arguments), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void warn(String format, Object... arguments) {
|
||||
if (isWarnEnable())
|
||||
logger(WARN, replaceParam(format, arguments), null);
|
||||
logger(LogLevel.WARN, replaceParam(format, arguments), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void error(String format, Throwable e) {
|
||||
if (isErrorEnable())
|
||||
logger(ERROR, format, e);
|
||||
logger(LogLevel.ERROR, format, e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void error(Throwable e, String format, Object... arguments) {
|
||||
if (isErrorEnable())
|
||||
logger(ERROR, replaceParam(format, arguments), e);
|
||||
logger(LogLevel.ERROR, replaceParam(format, arguments), e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDebugEnable() {
|
||||
return DEBUG.compareTo(LEVEL) >= 0;
|
||||
return LogLevel.DEBUG.compareTo(Config.Logging.LEVEL) >= 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInfoEnable() {
|
||||
return INFO.compareTo(LEVEL) >= 0;
|
||||
return LogLevel.INFO.compareTo(Config.Logging.LEVEL) >= 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWarnEnable() {
|
||||
return WARN.compareTo(LEVEL) >= 0;
|
||||
return LogLevel.WARN.compareTo(Config.Logging.LEVEL) >= 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isErrorEnable() {
|
||||
return ERROR.compareTo(LEVEL) >= 0;
|
||||
return LogLevel.ERROR.compareTo(Config.Logging.LEVEL) >= 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void debug(String format) {
|
||||
if (isDebugEnable()) {
|
||||
logger(DEBUG, format, null);
|
||||
logger(LogLevel.DEBUG, format, null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void debug(String format, Object... arguments) {
|
||||
if (isDebugEnable()) {
|
||||
logger(DEBUG, replaceParam(format, arguments), null);
|
||||
logger(LogLevel.DEBUG, replaceParam(format, arguments), null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void error(String format) {
|
||||
if (isErrorEnable()) {
|
||||
logger(ERROR, format, null);
|
||||
logger(LogLevel.ERROR, format, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
package org.skywalking.apm.api.logging;
|
||||
package org.skywalking.apm.agent.core.logging;
|
||||
|
||||
import com.lmax.disruptor.EventFactory;
|
||||
import com.lmax.disruptor.EventHandler;
|
||||
import com.lmax.disruptor.RingBuffer;
|
||||
import com.lmax.disruptor.dsl.Disruptor;
|
||||
import com.lmax.disruptor.util.DaemonThreadFactory;
|
||||
import org.skywalking.apm.api.conf.Config;
|
||||
import org.skywalking.apm.api.conf.Constants;
|
||||
import org.skywalking.apm.agent.core.conf.Config;
|
||||
import org.skywalking.apm.agent.core.conf.Constants;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.logging;
|
||||
package org.skywalking.apm.agent.core.logging;
|
||||
|
||||
public interface IWriter {
|
||||
void write(String message);
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.logging;
|
||||
package org.skywalking.apm.agent.core.logging;
|
||||
|
||||
/**
|
||||
* Created by xin on 2016/12/7.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.logging;
|
||||
package org.skywalking.apm.agent.core.logging;
|
||||
|
||||
/**
|
||||
* The <code>LogMessageHolder</code> is a {@link String} holder,
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.logging;
|
||||
package org.skywalking.apm.agent.core.logging;
|
||||
|
||||
import java.io.PrintStream;
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package org.skywalking.apm.api.logging;
|
||||
package org.skywalking.apm.agent.core.logging;
|
||||
|
||||
import org.skywalking.apm.api.conf.Config;
|
||||
import org.skywalking.apm.api.util.StringUtil;
|
||||
import org.skywalking.apm.agent.core.conf.Config;
|
||||
import org.skywalking.apm.util.StringUtil;
|
||||
|
||||
public class WriterFactory {
|
||||
public static IWriter getLogWriter() {
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package org.skywalking.apm.api.plugin;
|
||||
package org.skywalking.apm.agent.core.plugin;
|
||||
|
||||
import net.bytebuddy.dynamic.DynamicType;
|
||||
import net.bytebuddy.pool.TypePool;
|
||||
import net.bytebuddy.pool.TypePool.Resolution;
|
||||
import org.skywalking.apm.api.plugin.interceptor.enhance.ClassEnhancePluginDefine;
|
||||
import org.skywalking.apm.api.util.StringUtil;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassEnhancePluginDefine;
|
||||
import org.skywalking.apm.util.StringUtil;
|
||||
import org.skywalking.apm.logging.ILog;
|
||||
import org.skywalking.apm.logging.LogManager;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin;
|
||||
package org.skywalking.apm.agent.core.plugin;
|
||||
|
||||
import net.bytebuddy.pool.TypePool;
|
||||
import org.skywalking.apm.logging.ILog;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package org.skywalking.apm.api.plugin;
|
||||
package org.skywalking.apm.agent.core.plugin;
|
||||
|
||||
import org.skywalking.apm.api.util.StringUtil;
|
||||
import org.skywalking.apm.util.StringUtil;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin;
|
||||
package org.skywalking.apm.agent.core.plugin;
|
||||
|
||||
public class PluginException extends RuntimeException {
|
||||
private static final long serialVersionUID = -6020188711867490724L;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin;
|
||||
package org.skywalking.apm.agent.core.plugin;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin;
|
||||
package org.skywalking.apm.agent.core.plugin;
|
||||
|
||||
import org.skywalking.apm.logging.ILog;
|
||||
import org.skywalking.apm.logging.LogManager;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin;
|
||||
package org.skywalking.apm.agent.core.plugin;
|
||||
|
||||
import net.bytebuddy.ByteBuddy;
|
||||
import net.bytebuddy.dynamic.ClassFileLocator;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin.bytebuddy;
|
||||
package org.skywalking.apm.agent.core.plugin.bytebuddy;
|
||||
|
||||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin.bytebuddy;
|
||||
package org.skywalking.apm.agent.core.plugin.bytebuddy;
|
||||
|
||||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.description.method.ParameterList;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor;
|
||||
|
||||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor;
|
||||
|
||||
import org.skywalking.apm.api.plugin.PluginException;
|
||||
import org.skywalking.apm.agent.core.plugin.PluginException;
|
||||
|
||||
public class EnhanceException extends PluginException {
|
||||
private static final long serialVersionUID = -2234782755784217255L;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor;
|
||||
|
||||
import org.skywalking.apm.api.plugin.AbstractClassEnhancePluginDefine;
|
||||
import org.skywalking.apm.api.plugin.interceptor.enhance.ClassEnhancePluginDefine;
|
||||
import org.skywalking.apm.agent.core.plugin.AbstractClassEnhancePluginDefine;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassEnhancePluginDefine;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor;
|
||||
|
||||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor;
|
||||
|
||||
public class InterceptorException extends RuntimeException {
|
||||
private static final long serialVersionUID = 7846035239994885019L;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor;
|
||||
|
||||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor.assist;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor.assist;
|
||||
|
||||
import org.skywalking.apm.api.plugin.interceptor.EnhancedClassInstanceContext;
|
||||
import org.skywalking.apm.api.plugin.interceptor.InterceptorException;
|
||||
import org.skywalking.apm.api.plugin.interceptor.enhance.InstanceMethodInvokeContext;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodInvokeContext;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.EnhancedClassInstanceContext;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.InterceptorException;
|
||||
|
||||
/**
|
||||
* {@link NoConcurrencyAccessObject} is method invocation counter,
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor.enhance;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor.enhance;
|
||||
|
||||
import net.bytebuddy.implementation.bind.annotation.AllArguments;
|
||||
import net.bytebuddy.implementation.bind.annotation.FieldProxy;
|
||||
import net.bytebuddy.implementation.bind.annotation.RuntimeType;
|
||||
import net.bytebuddy.implementation.bind.annotation.This;
|
||||
import org.skywalking.apm.api.plugin.interceptor.EnhancedClassInstanceContext;
|
||||
import org.skywalking.apm.api.plugin.interceptor.loader.InterceptorInstanceLoader;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.EnhancedClassInstanceContext;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.loader.InterceptorInstanceLoader;
|
||||
import org.skywalking.apm.logging.ILog;
|
||||
import org.skywalking.apm.logging.LogManager;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor.enhance;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor.enhance;
|
||||
|
||||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.dynamic.DynamicType;
|
||||
|
|
@ -6,10 +6,14 @@ import net.bytebuddy.implementation.MethodDelegation;
|
|||
import net.bytebuddy.implementation.SuperMethodCall;
|
||||
import net.bytebuddy.implementation.bind.annotation.FieldProxy;
|
||||
import net.bytebuddy.matcher.ElementMatchers;
|
||||
import org.skywalking.apm.api.plugin.AbstractClassEnhancePluginDefine;
|
||||
import org.skywalking.apm.api.plugin.PluginException;
|
||||
import org.skywalking.apm.api.plugin.interceptor.*;
|
||||
import org.skywalking.apm.api.util.StringUtil;
|
||||
import org.skywalking.apm.agent.core.plugin.PluginException;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.EnhanceException;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.EnhancedClassInstanceContext;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.StaticMethodsInterceptPoint;
|
||||
import org.skywalking.apm.util.StringUtil;
|
||||
import org.skywalking.apm.agent.core.plugin.AbstractClassEnhancePluginDefine;
|
||||
import org.skywalking.apm.logging.ILog;
|
||||
import org.skywalking.apm.logging.LogManager;
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor.enhance;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor.enhance;
|
||||
|
||||
import org.skywalking.apm.api.plugin.interceptor.StaticMethodsInterceptPoint;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.StaticMethodsInterceptPoint;
|
||||
|
||||
/**
|
||||
* Plugins, which only need enhance class static methods. Actually, inherit from {@link
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor.enhance;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor.enhance;
|
||||
|
||||
import net.bytebuddy.implementation.bind.annotation.*;
|
||||
import org.skywalking.apm.api.plugin.interceptor.EnhancedClassInstanceContext;
|
||||
import org.skywalking.apm.api.plugin.interceptor.loader.InterceptorInstanceLoader;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.loader.InterceptorInstanceLoader;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.EnhancedClassInstanceContext;
|
||||
import org.skywalking.apm.logging.ILog;
|
||||
import org.skywalking.apm.logging.LogManager;
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor.enhance;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor.enhance;
|
||||
|
||||
import org.skywalking.apm.api.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import org.skywalking.apm.api.plugin.interceptor.InstanceMethodsInterceptPoint;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
|
||||
|
||||
/**
|
||||
* Plugins, which only need enhance class static methods. Actually, inherit from {@link
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor.enhance;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor.enhance;
|
||||
|
||||
import net.bytebuddy.implementation.bind.annotation.AllArguments;
|
||||
import net.bytebuddy.implementation.bind.annotation.Origin;
|
||||
import net.bytebuddy.implementation.bind.annotation.RuntimeType;
|
||||
import net.bytebuddy.implementation.bind.annotation.SuperCall;
|
||||
import org.skywalking.apm.api.plugin.interceptor.loader.InterceptorInstanceLoader;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.loader.InterceptorInstanceLoader;
|
||||
import org.skywalking.apm.logging.ILog;
|
||||
import org.skywalking.apm.logging.LogManager;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor.enhance;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor.enhance;
|
||||
|
||||
/**
|
||||
* Constructor context.
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor.enhance;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor.enhance;
|
||||
|
||||
import net.bytebuddy.implementation.bind.annotation.AllArguments;
|
||||
import net.bytebuddy.implementation.bind.annotation.FieldProxy;
|
||||
import net.bytebuddy.implementation.bind.annotation.RuntimeType;
|
||||
import net.bytebuddy.implementation.bind.annotation.This;
|
||||
import org.skywalking.apm.api.plugin.interceptor.EnhancedClassInstanceContext;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.EnhancedClassInstanceContext;
|
||||
import org.skywalking.apm.logging.ILog;
|
||||
import org.skywalking.apm.logging.LogManager;
|
||||
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
package org.skywalking.apm.agent.core.plugin.interceptor.enhance;
|
||||
|
||||
public interface FieldGetter {
|
||||
Object getValue();
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor.enhance;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor.enhance;
|
||||
|
||||
public interface FieldSetter {
|
||||
void setValue(Object value);
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor.enhance;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor.enhance;
|
||||
|
||||
import org.skywalking.apm.api.plugin.interceptor.EnhancedClassInstanceContext;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.EnhancedClassInstanceContext;
|
||||
|
||||
/**
|
||||
* The instance constructor's interceptor interface.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor.enhance;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor.enhance;
|
||||
|
||||
/**
|
||||
* Instance method invoke context.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor.enhance;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor.enhance;
|
||||
|
||||
import org.skywalking.apm.api.plugin.interceptor.EnhancedClassInstanceContext;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.EnhancedClassInstanceContext;
|
||||
|
||||
/**
|
||||
* A interceptor, which intercept method's invocation. The target methods will be defined in {@link
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor.enhance;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor.enhance;
|
||||
|
||||
/**
|
||||
* This is a method return value manipulator. When a interceptor's method, such as {@link
|
||||
* InstanceMethodsAroundInterceptor#beforeMethod(org.skywalking.apm.api.plugin.interceptor.EnhancedClassInstanceContext, InstanceMethodInvokeContext,
|
||||
* InstanceMethodsAroundInterceptor#beforeMethod(org.skywalking.apm.agent.core.plugin.interceptor.EnhancedClassInstanceContext, InstanceMethodInvokeContext,
|
||||
* MethodInterceptResult)}, has this as a method argument, the interceptor can manipulate the method's return value. <p>
|
||||
* The new value set to this object, by {@link MethodInterceptResult#defineReturnValue(Object)}, will override the
|
||||
* origin return value.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor.enhance;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor.enhance;
|
||||
|
||||
/**
|
||||
* Method invoke context.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor.enhance;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor.enhance;
|
||||
|
||||
/**
|
||||
* Static method invoke context.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor.enhance;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor.enhance;
|
||||
|
||||
/**
|
||||
* The static method's interceptor interface.
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package org.skywalking.apm.api.plugin.interceptor.loader;
|
||||
package org.skywalking.apm.agent.core.plugin.interceptor.loader;
|
||||
|
||||
import org.skywalking.apm.api.plugin.interceptor.enhance.InstanceConstructorInterceptor;
|
||||
import org.skywalking.apm.api.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor;
|
||||
import org.skywalking.apm.api.plugin.interceptor.enhance.StaticMethodsAroundInterceptor;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceConstructorInterceptor;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.enhance.StaticMethodsAroundInterceptor;
|
||||
import org.skywalking.apm.logging.ILog;
|
||||
import org.skywalking.apm.logging.LogManager;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.queue;
|
||||
package org.skywalking.apm.agent.core.queue;
|
||||
|
||||
import com.lmax.disruptor.EventFactory;
|
||||
import org.skywalking.apm.trace.TraceSegment;
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
package org.skywalking.apm.api.queue;
|
||||
package org.skywalking.apm.agent.core.queue;
|
||||
|
||||
import com.lmax.disruptor.EventHandler;
|
||||
import com.lmax.disruptor.RingBuffer;
|
||||
import com.lmax.disruptor.dsl.Disruptor;
|
||||
import com.lmax.disruptor.util.DaemonThreadFactory;
|
||||
import org.skywalking.apm.api.boot.StatusBootService;
|
||||
import org.skywalking.apm.api.conf.Config;
|
||||
import org.skywalking.apm.api.context.TracerContext;
|
||||
import org.skywalking.apm.api.context.TracerContextListener;
|
||||
import org.skywalking.apm.agent.core.conf.Config;
|
||||
import org.skywalking.apm.agent.core.boot.StatusBootService;
|
||||
import org.skywalking.apm.agent.core.context.TracerContext;
|
||||
import org.skywalking.apm.agent.core.context.TracerContextListener;
|
||||
import org.skywalking.apm.logging.ILog;
|
||||
import org.skywalking.apm.logging.LogManager;
|
||||
import org.skywalking.apm.trace.TraceSegment;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.sampling;
|
||||
package org.skywalking.apm.agent.core.sampling;
|
||||
|
||||
/**
|
||||
* Use <code>IllegalSamplingRateException</code>, only if the rate can not be supported.
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package org.skywalking.apm.api.sampling;
|
||||
package org.skywalking.apm.agent.core.sampling;
|
||||
|
||||
import org.skywalking.apm.api.boot.BootService;
|
||||
import org.skywalking.apm.api.conf.Config;
|
||||
import org.skywalking.apm.api.context.ContextCarrier;
|
||||
import org.skywalking.apm.agent.core.boot.BootService;
|
||||
import org.skywalking.apm.agent.core.conf.Config;
|
||||
import org.skywalking.apm.agent.core.context.ContextCarrier;
|
||||
import org.skywalking.apm.logging.ILog;
|
||||
import org.skywalking.apm.logging.LogManager;
|
||||
import org.skywalking.apm.trace.TraceSegment;
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
org.skywalking.apm.agent.core.queue.TraceSegmentProcessQueue
|
||||
org.skywalking.apm.agent.core.context.ContextManager
|
||||
org.skywalking.apm.agent.core.client.CollectorClientService
|
||||
org.skywalking.apm.agent.core.sampling.SamplingService
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package org.skywalking.apm.api.boot;
|
||||
package org.skywalking.apm.agent.core.boot;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.skywalking.apm.api.context.ContextManager;
|
||||
import org.skywalking.apm.agent.core.context.ContextManager;
|
||||
|
||||
/**
|
||||
* @author wusheng
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.client;
|
||||
package org.skywalking.apm.agent.core.client;
|
||||
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
|
|
@ -1,11 +1,9 @@
|
|||
package org.skywalking.apm.api.conf;
|
||||
package org.skywalking.apm.agent.core.conf;
|
||||
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.skywalking.apm.api.logging.LogLevel.DEBUG;
|
||||
import static org.skywalking.apm.api.logging.LogLevel.INFO;
|
||||
import org.skywalking.apm.agent.core.logging.LogLevel;
|
||||
|
||||
/**
|
||||
* @author wusheng
|
||||
|
|
@ -24,11 +22,11 @@ public class SnifferConfigInitializerTest {
|
|||
Assert.assertNotNull(Config.Logging.FILE_NAME);
|
||||
Assert.assertNotNull(Config.Logging.MAX_FILE_SIZE);
|
||||
Assert.assertNotNull(Config.Logging.FILE_NAME);
|
||||
Assert.assertEquals(INFO, Config.Logging.LEVEL);
|
||||
Assert.assertEquals(LogLevel.INFO, Config.Logging.LEVEL);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void clear() {
|
||||
Config.Logging.LEVEL = DEBUG;
|
||||
Config.Logging.LEVEL = LogLevel.DEBUG;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.context;
|
||||
package org.skywalking.apm.agent.core.context;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package org.skywalking.apm.api.context;
|
||||
package org.skywalking.apm.agent.core.context;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Assert;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.skywalking.apm.api.boot.ServiceManager;
|
||||
import org.skywalking.apm.agent.core.boot.ServiceManager;
|
||||
import org.skywalking.apm.trace.Span;
|
||||
import org.skywalking.apm.trace.TraceSegment;
|
||||
import org.skywalking.apm.trace.tag.Tags;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.context;
|
||||
package org.skywalking.apm.agent.core.context;
|
||||
|
||||
import org.skywalking.apm.trace.TraceSegment;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.context;
|
||||
package org.skywalking.apm.agent.core.context;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Assert;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.logging;
|
||||
package org.skywalking.apm.agent.core.logging;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package org.skywalking.apm.api.logging;
|
||||
package org.skywalking.apm.agent.core.logging;
|
||||
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Assert;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
import org.skywalking.apm.api.conf.Constants;
|
||||
import org.skywalking.apm.agent.core.conf.Constants;
|
||||
|
||||
import java.io.PrintStream;
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ public class EasyLoggerTest {
|
|||
String formatLines = logger.format(exception);
|
||||
String[] lines = formatLines.split(Constants.LINE_SEPARATOR);
|
||||
Assert.assertEquals("java.lang.NullPointerException", lines[1]);
|
||||
Assert.assertEquals("\tat org.skywalking.apm.api.logging.EasyLoggerTest.testFormat(EasyLoggerTest.java:58)", lines[2]);
|
||||
Assert.assertEquals("\tat org.skywalking.apm.agent.core.logging.EasyLoggerTest.testFormat(EasyLoggerTest.java:58)", lines[2]);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package org.skywalking.apm.api.logging;
|
||||
package org.skywalking.apm.agent.core.logging;
|
||||
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.skywalking.apm.api.conf.Config;
|
||||
import org.skywalking.apm.api.conf.Constants;
|
||||
import org.skywalking.apm.agent.core.conf.Config;
|
||||
import org.skywalking.apm.agent.core.conf.Constants;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.logging;
|
||||
package org.skywalking.apm.agent.core.logging;
|
||||
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package org.skywalking.apm.api.logging;
|
||||
package org.skywalking.apm.agent.core.logging;
|
||||
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Assert;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
import org.skywalking.apm.api.conf.Config;
|
||||
import org.skywalking.apm.agent.core.conf.Config;
|
||||
|
||||
import java.io.PrintStream;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin;
|
||||
package org.skywalking.apm.agent.core.plugin;
|
||||
|
||||
import net.bytebuddy.agent.ByteBuddyAgent;
|
||||
import net.bytebuddy.agent.builder.AgentBuilder;
|
||||
|
|
@ -12,7 +12,7 @@ import org.junit.Before;
|
|||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
import org.skywalking.apm.api.plugin.utility.ClassFileExtraction;
|
||||
import org.skywalking.apm.agent.core.plugin.utility.ClassFileExtraction;
|
||||
|
||||
import java.lang.instrument.ClassFileTransformer;
|
||||
|
||||
|
|
@ -21,8 +21,8 @@ import static org.hamcrest.MatcherAssert.assertThat;
|
|||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
public class AbstractClassEnhancePluginDefineTest {
|
||||
static final String WEAVE_CLASS = "org.skywalking.apm.api.plugin.TargetObject";
|
||||
static final String INTERCEPTOR_CLASS = "org.skywalking.apm.api.plugin.MockPluginInterceptor";
|
||||
static final String WEAVE_CLASS = "org.skywalking.apm.agent.core.plugin.pluginTargetObject";
|
||||
static final String INTERCEPTOR_CLASS = "org.skywalking.apm.agent.core.plugin.MockPluginInterceptor";
|
||||
static final String WEAVE_INSTANCE_METHOD_NAME = "instanceMethod";
|
||||
static final String WEAVE_INSTANCE_WITH_EXCEPTION_METHOD_NAME = "instanceMethodWithException";
|
||||
static final String WEAVE_STATIC_METHOD_NAME = "staticMethod";
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin;
|
||||
package org.skywalking.apm.agent.core.plugin;
|
||||
|
||||
import net.bytebuddy.dynamic.DynamicType;
|
||||
|
||||
|
|
@ -1,19 +1,18 @@
|
|||
package org.skywalking.apm.api.plugin;
|
||||
package org.skywalking.apm.agent.core.plugin;
|
||||
|
||||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
import org.skywalking.apm.api.plugin.bytebuddy.AllObjectDefaultMethodsMatch;
|
||||
import org.skywalking.apm.api.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import org.skywalking.apm.api.plugin.interceptor.InstanceMethodsInterceptPoint;
|
||||
import org.skywalking.apm.api.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
|
||||
import org.skywalking.apm.agent.core.plugin.bytebuddy.AllObjectDefaultMethodsMatch;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
|
||||
|
||||
import static net.bytebuddy.matcher.ElementMatchers.*;
|
||||
import static org.skywalking.apm.api.plugin.AbstractClassEnhancePluginDefineTest.*;
|
||||
|
||||
public class MockPluginInstanceMethodInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
|
||||
@Override
|
||||
protected String enhanceClassName() {
|
||||
return WEAVE_CLASS;
|
||||
return AbstractClassEnhancePluginDefineTest.WEAVE_CLASS;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -27,7 +26,7 @@ public class MockPluginInstanceMethodInstrumentation extends ClassInstanceMethod
|
|||
|
||||
@Override
|
||||
public String getConstructorInterceptor() {
|
||||
return INTERCEPTOR_CLASS;
|
||||
return AbstractClassEnhancePluginDefineTest.INTERCEPTOR_CLASS;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -39,23 +38,23 @@ public class MockPluginInstanceMethodInstrumentation extends ClassInstanceMethod
|
|||
new InstanceMethodsInterceptPoint() {
|
||||
@Override
|
||||
public ElementMatcher<MethodDescription> getMethodsMatcher() {
|
||||
return named(WEAVE_INSTANCE_METHOD_NAME).and(not(AllObjectDefaultMethodsMatch.INSTANCE));
|
||||
return named(AbstractClassEnhancePluginDefineTest.WEAVE_INSTANCE_METHOD_NAME).and(not(AllObjectDefaultMethodsMatch.INSTANCE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMethodsInterceptor() {
|
||||
return INTERCEPTOR_CLASS;
|
||||
return AbstractClassEnhancePluginDefineTest.INTERCEPTOR_CLASS;
|
||||
}
|
||||
},
|
||||
new InstanceMethodsInterceptPoint() {
|
||||
@Override
|
||||
public ElementMatcher<MethodDescription> getMethodsMatcher() {
|
||||
return named(WEAVE_INSTANCE_WITH_EXCEPTION_METHOD_NAME);
|
||||
return named(AbstractClassEnhancePluginDefineTest.WEAVE_INSTANCE_WITH_EXCEPTION_METHOD_NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMethodsInterceptor() {
|
||||
return INTERCEPTOR_CLASS;
|
||||
return AbstractClassEnhancePluginDefineTest.INTERCEPTOR_CLASS;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -1,7 +1,14 @@
|
|||
package org.skywalking.apm.api.plugin;
|
||||
package org.skywalking.apm.agent.core.plugin;
|
||||
|
||||
import org.skywalking.apm.api.plugin.interceptor.EnhancedClassInstanceContext;
|
||||
import org.skywalking.apm.api.plugin.interceptor.enhance.*;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.enhance.ConstructorInvokeContext;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceConstructorInterceptor;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodInvokeContext;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInvokeContext;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.enhance.StaticMethodInvokeContext;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.enhance.StaticMethodsAroundInterceptor;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.EnhancedClassInstanceContext;
|
||||
|
||||
public class MockPluginInterceptor implements InstanceMethodsAroundInterceptor, StaticMethodsAroundInterceptor, InstanceConstructorInterceptor {
|
||||
@Override
|
||||
|
|
@ -1,17 +1,16 @@
|
|||
package org.skywalking.apm.api.plugin;
|
||||
package org.skywalking.apm.agent.core.plugin;
|
||||
|
||||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
import org.skywalking.apm.api.plugin.interceptor.StaticMethodsInterceptPoint;
|
||||
import org.skywalking.apm.api.plugin.interceptor.enhance.ClassStaticMethodsEnhancePluginDefine;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.StaticMethodsInterceptPoint;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassStaticMethodsEnhancePluginDefine;
|
||||
|
||||
import static net.bytebuddy.matcher.ElementMatchers.named;
|
||||
import static org.skywalking.apm.api.plugin.AbstractClassEnhancePluginDefineTest.*;
|
||||
|
||||
public class MockPluginStaticMethodInstrumentation extends ClassStaticMethodsEnhancePluginDefine {
|
||||
@Override
|
||||
protected String enhanceClassName() {
|
||||
return WEAVE_CLASS;
|
||||
return AbstractClassEnhancePluginDefineTest.WEAVE_CLASS;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -20,12 +19,12 @@ public class MockPluginStaticMethodInstrumentation extends ClassStaticMethodsEnh
|
|||
new StaticMethodsInterceptPoint() {
|
||||
@Override
|
||||
public ElementMatcher<MethodDescription> getMethodsMatcher() {
|
||||
return named(WEAVE_STATIC_METHOD_NAME);
|
||||
return named(AbstractClassEnhancePluginDefineTest.WEAVE_STATIC_METHOD_NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMethodsInterceptor() {
|
||||
return INTERCEPTOR_CLASS;
|
||||
return AbstractClassEnhancePluginDefineTest.INTERCEPTOR_CLASS;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin;
|
||||
package org.skywalking.apm.agent.core.plugin;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin;
|
||||
package org.skywalking.apm.agent.core.plugin;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Assert;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin;
|
||||
package org.skywalking.apm.agent.core.plugin;
|
||||
|
||||
import net.bytebuddy.dynamic.DynamicType;
|
||||
import org.junit.Assert;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin;
|
||||
package org.skywalking.apm.agent.core.plugin;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin;
|
||||
package org.skywalking.apm.agent.core.plugin;
|
||||
|
||||
public class TargetObject {
|
||||
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
package org.skywalking.apm.api.plugin.assist;
|
||||
package org.skywalking.apm.agent.core.plugin.assist;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.runners.MockitoJUnitRunner;
|
||||
import org.skywalking.apm.api.plugin.interceptor.EnhancedClassInstanceContext;
|
||||
import org.skywalking.apm.api.plugin.interceptor.assist.NoConcurrencyAccessObject;
|
||||
import org.skywalking.apm.api.plugin.interceptor.enhance.InstanceMethodInvokeContext;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.EnhancedClassInstanceContext;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.assist.NoConcurrencyAccessObject;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodInvokeContext;
|
||||
|
||||
/**
|
||||
* @author wusheng
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin.bytebuddy;
|
||||
package org.skywalking.apm.agent.core.plugin.bytebuddy;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.skywalking.apm.api.plugin.bytebuddy;
|
||||
package org.skywalking.apm.agent.core.plugin.bytebuddy;
|
||||
|
||||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.description.method.ParameterDescription;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue