Optimize document and fix typo (#148)
This commit is contained in:
parent
74d11ce7a2
commit
3c8e5347f5
|
|
@ -21,7 +21,7 @@ package org.apache.skywalking.apm.toolkit.log.logback.v1.x;
|
|||
import ch.qos.logback.classic.PatternLayout;
|
||||
|
||||
/**
|
||||
* Based on the logback-compoenent convert register mechanism, register {@link LogbackPatternConverter} as a new
|
||||
* Based on the logback-component convert register mechanism, register {@link LogbackPatternConverter} as a new
|
||||
* convert, match to "tid" and "sw_ctx". You can use "%tid" or "sw_ctx" in logback config file, "Pattern" section.
|
||||
* <p>
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public class Histogram extends BaseMeter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set bucket steps, the minimal values of every buckets besides the {@link #minValue}.
|
||||
* Set bucket steps, the minimal values of every bucket besides the {@link #minValue}.
|
||||
*/
|
||||
public Builder steps(List<Double> steps) {
|
||||
this.steps = new ArrayList<>(steps);
|
||||
|
|
|
|||
|
|
@ -18,13 +18,14 @@
|
|||
|
||||
package org.apache.skywalking.apm.toolkit.meter;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class CounterTest {
|
||||
|
||||
@Test
|
||||
public void testBuild() {
|
||||
MeterFactory.counter("test_counter").tag("k1", "v1").build();
|
||||
Assert.assertNotNull(MeterFactory.counter("test_counter").tag("k1", "v1").build());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,13 +18,14 @@
|
|||
|
||||
package org.apache.skywalking.apm.toolkit.meter;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class GaugeTest {
|
||||
|
||||
@Test
|
||||
public void testBuild() {
|
||||
MeterFactory.gauge("test_gauge1", () -> 1d).tag("k1", "v1").build();
|
||||
Assert.assertNotNull(MeterFactory.gauge("test_gauge1", () -> 1d).tag("k1", "v1").build());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
package org.apache.skywalking.apm.toolkit.meter;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
|
@ -27,8 +28,8 @@ public class HistogramTest {
|
|||
@Test
|
||||
public void testBuild() {
|
||||
// normal
|
||||
MeterFactory.histogram("test_histogram1").steps(Arrays.asList(1d, 5d, 10d)).minValue(-10)
|
||||
.tag("k1", "v1").build();
|
||||
Assert.assertNotNull(MeterFactory.histogram("test_histogram1").steps(Arrays.asList(1d, 5d, 10d)).minValue(-10)
|
||||
.tag("k1", "v1").build());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public class SkywalkingCounterTest {
|
|||
|
||||
@Test
|
||||
public void testCounter() {
|
||||
// Creating a simplify micrometer counter
|
||||
// Creating a simplified micrometer counter
|
||||
final SkywalkingMeterRegistry registry = new SkywalkingMeterRegistry();
|
||||
Counter counter = registry.counter("test_counter", "skywalking", "test");
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public class SkywalkingDistributionSummaryTest {
|
|||
|
||||
@Test
|
||||
public void testSimple() {
|
||||
// Creating a simplify distribution summary
|
||||
// Creating a simplified distribution summary
|
||||
final SkywalkingMeterRegistry registry = new SkywalkingMeterRegistry();
|
||||
final DistributionSummary summary = registry.summary("test_simple_distribution_summary", "skywalking", "test");
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public class SkywalkingLongTaskTimerTest {
|
|||
|
||||
@Test
|
||||
public void testSimple() throws InterruptedException {
|
||||
// Creating a simplify long task timer
|
||||
// Creating a simplified long task timer
|
||||
final SkywalkingMeterRegistry registry = new SkywalkingMeterRegistry();
|
||||
final LongTaskTimer longTaskTimer = registry.more().longTaskTimer("test_simple_long_task_timer", "skywalking", "test");
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public class SkywalkingTimerTest {
|
|||
|
||||
@Test
|
||||
public void testSimpleTimer() {
|
||||
// Creating a simplify timer
|
||||
// Creating a simplified timer
|
||||
final SkywalkingMeterRegistry registry = new SkywalkingMeterRegistry();
|
||||
final Timer timer = registry.timer("test_simple_timer", "skywalking", "test");
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public class SkywalkingSpan implements Span {
|
|||
/**
|
||||
* Stop the active span
|
||||
*/
|
||||
@NeedSnifferActivation("1.ContextManager#stopSpan(AbstractSpan span)" + "2. The parameter of stop methed is from the dynamic field of enhanced SkywalkingSpan")
|
||||
@NeedSnifferActivation("1.ContextManager#stopSpan(AbstractSpan span)" + "2. The parameter of stop method is from the dynamic field of enhanced SkywalkingSpan")
|
||||
@Override
|
||||
public void finish(long finishMicros) {
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ public class ConsumerThread<T> extends Thread {
|
|||
}
|
||||
|
||||
/**
|
||||
* DataSource is a refer to {@link Buffer}.
|
||||
* DataSource is a reference to {@link Buffer}.
|
||||
*/
|
||||
class DataSource {
|
||||
private QueueBuffer<T> sourceBuffer;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ package org.apache.skywalking.apm.agent.core.context.util;
|
|||
import org.apache.skywalking.apm.network.common.v3.KeyStringValuePair;
|
||||
|
||||
/**
|
||||
* The <code>KeyValuePair</code> represents a object which contains a string key and a string value.
|
||||
* The <code>KeyValuePair</code> represents an object which contains a string key and a string value.
|
||||
*/
|
||||
public class KeyValuePair {
|
||||
private String key;
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ public class Histogram extends BaseMeter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set bucket steps, the minimal values of every buckets besides the {@link #minValue}.
|
||||
* Set bucket steps, the minimal values of every bucket besides the {@link #minValue}.
|
||||
*/
|
||||
public Builder steps(List<Double> steps) {
|
||||
this.steps = new ArrayList<>(steps);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import org.apache.skywalking.apm.agent.core.plugin.loader.InterceptorInstanceLoa
|
|||
import org.apache.skywalking.apm.agent.core.logging.api.ILog;
|
||||
|
||||
/**
|
||||
* The actual byte-buddy's interceptor to intercept constructor methods. In this class, it provide a bridge between
|
||||
* The actual byte-buddy's interceptor to intercept constructor methods. In this class, it provides a bridge between
|
||||
* byte-buddy and sky-walking plugin.
|
||||
*/
|
||||
public class ConstructorInter {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import org.apache.skywalking.apm.agent.core.plugin.loader.InterceptorInstanceLoa
|
|||
import org.apache.skywalking.apm.agent.core.logging.api.ILog;
|
||||
|
||||
/**
|
||||
* The actual byte-buddy's interceptor to intercept class instance methods. In this class, it provide a bridge between
|
||||
* The actual byte-buddy's interceptor to intercept class instance methods. In this class, it provides a bridge between
|
||||
* byte-buddy and sky-walking plugin.
|
||||
*/
|
||||
public class InstMethodsInter {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ import org.apache.skywalking.apm.agent.core.logging.api.ILog;
|
|||
import org.apache.skywalking.apm.agent.core.logging.api.LogManager;
|
||||
|
||||
/**
|
||||
* The actual byte-buddy's interceptor to intercept class instance methods. In this class, it provide a bridge between
|
||||
* The actual byte-buddy's interceptor to intercept class instance methods. In this class, it provides a bridge between
|
||||
* byte-buddy and sky-walking plugin.
|
||||
*/
|
||||
public class InstMethodsInterWithOverrideArgs {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import org.apache.skywalking.apm.agent.core.logging.api.ILog;
|
|||
import org.apache.skywalking.apm.agent.core.logging.api.LogManager;
|
||||
|
||||
/**
|
||||
* The actual byte-buddy's interceptor to intercept class static methods. In this class, it provide a bridge between
|
||||
* The actual byte-buddy's interceptor to intercept class static methods. In this class, it provides a bridge between
|
||||
* byte-buddy and sky-walking plugin.
|
||||
*/
|
||||
public class StaticMethodsInter {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import org.apache.skywalking.apm.agent.core.logging.api.ILog;
|
|||
import org.apache.skywalking.apm.agent.core.logging.api.LogManager;
|
||||
|
||||
/**
|
||||
* The actual byte-buddy's interceptor to intercept class static methods. In this class, it provide a bridge between
|
||||
* The actual byte-buddy's interceptor to intercept class static methods. In this class, it provides a bridge between
|
||||
* byte-buddy and sky-walking plugin.
|
||||
*/
|
||||
public class StaticMethodsInterWithOverrideArgs {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedI
|
|||
import org.apache.skywalking.apm.agent.core.plugin.loader.InterceptorInstanceLoader;
|
||||
|
||||
/**
|
||||
* The actual byte-buddy's interceptor to intercept class instance methods. In this class, it provide a bridge between
|
||||
* The actual byte-buddy's interceptor to intercept class instance methods. In this class, it provides a bridge between
|
||||
* byte-buddy and sky-walking plugin.
|
||||
*/
|
||||
public class InstMethodsInterV2 {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.OverrideC
|
|||
import org.apache.skywalking.apm.agent.core.plugin.loader.InterceptorInstanceLoader;
|
||||
|
||||
/**
|
||||
* The actual byte-buddy's interceptor to intercept class instance methods. In this class, it provide a bridge between
|
||||
* The actual byte-buddy's interceptor to intercept class instance methods. In this class, it provides a bridge between
|
||||
* byte-buddy and sky-walking plugin.
|
||||
*/
|
||||
public class InstMethodsInterV2WithOverrideArgs {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import org.apache.skywalking.apm.agent.core.logging.api.LogManager;
|
|||
import org.apache.skywalking.apm.agent.core.plugin.loader.InterceptorInstanceLoader;
|
||||
|
||||
/**
|
||||
* The actual byte-buddy's interceptor to intercept class instance methods. In this class, it provide a bridge between
|
||||
* The actual byte-buddy's interceptor to intercept class instance methods. In this class, it provides a bridge between
|
||||
* byte-buddy and sky-walking plugin.
|
||||
*/
|
||||
public class StaticMethodsInterV2 {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.OverrideC
|
|||
import org.apache.skywalking.apm.agent.core.plugin.loader.InterceptorInstanceLoader;
|
||||
|
||||
/**
|
||||
* The actual byte-buddy's interceptor to intercept class instance methods. In this class, it provide a bridge between
|
||||
* The actual byte-buddy's interceptor to intercept class instance methods. In this class, it provides a bridge between
|
||||
* byte-buddy and sky-walking plugin.
|
||||
*/
|
||||
public class StaticMethodsInterV2WithOverrideArgs {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class MethodUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* This is a low-performance method, recommand to use this when have to, make sure it is only executed once and the
|
||||
* This is a low-performance method, recommend to use this when have to, make sure it is only executed once and the
|
||||
* result is being cached.
|
||||
*/
|
||||
public static boolean isMethodExist(ClassLoader classLoader, String className, String methodName,
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public final class StaticLoggerBinder implements LoggerFactoryBinder {
|
|||
|
||||
/**
|
||||
* Returns the singleton of this class.
|
||||
* Dot't delete this method, this method will called by {@link org.slf4j.LoggerFactory#bind()}
|
||||
* Don't delete this method, this method will called by {@link org.slf4j.LoggerFactory#bind()}
|
||||
*
|
||||
* @return the StaticLoggerBinder singleton
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ import static org.apache.skywalking.apm.agent.core.plugin.match.NameMatch.byName
|
|||
|
||||
/**
|
||||
* The dubbo conflict plugin resolver the problem about the wrapper class generated by Dubbo core cannot be compiled
|
||||
* successfully. As we known, The wrapper class traverses all the methods. In usual, it works unless this class has been
|
||||
* enhanced by Skywalking. The javasist cannot found the `EnhanceInstance` method when generate.
|
||||
* successfully. As we have known, The wrapper class traverses all the methods. In usual, it works unless this class has been
|
||||
* enhanced by Skywalking. The javasist cannot found the `EnhanceInstance` method when generated.
|
||||
* <p>
|
||||
* The plugin excludes {@link org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance} methods
|
||||
* to ensure the correct compilation of the code.
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ import static org.apache.skywalking.apm.agent.core.plugin.match.NameMatch.byName
|
|||
|
||||
/**
|
||||
* The dubbo conflict plugin resolver the problem about the wrapper class generated by Dubbo core cannot be compiled
|
||||
* successfully. As we known, The wrapper class traverses all the methods. In usual, it works unless this class has been
|
||||
* enhanced by Skywalking. The javasist cannot found the `EnhanceInstance` method when generate.
|
||||
* successfully. As we have known, The wrapper class traverses all the methods. In usual, it works unless this class has been
|
||||
* enhanced by Skywalking. The javasist cannot found the `EnhanceInstance` method when generated.
|
||||
* <p>
|
||||
* The plugin excludes {@link org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance} methods
|
||||
* to ensure the correct compilation of the code.
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import static net.bytebuddy.matcher.ElementMatchers.takesArguments;
|
|||
* org.apache.http.impl.nio.client.MinimalHttpAsyncClient#execute(HttpAsyncRequestProducer, HttpAsyncResponseConsumer,
|
||||
* HttpContext, FutureCallback) and InternalHttpAsyncClient#execute(HttpAsyncRequestProducer, HttpAsyncResponseConsumer,
|
||||
* HttpContext, FutureCallback) can be instrumented for single request.pipeline is not support now for some complex
|
||||
* situation.this is run in main thread.
|
||||
* situation. This is run in main thread.
|
||||
*/
|
||||
public class HttpAsyncClientInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ import static org.apache.skywalking.apm.agent.core.plugin.match.NameMatch.byName
|
|||
|
||||
/**
|
||||
* this is a bridge for main thread and real request thread which mean hold the {@link
|
||||
* org.apache.skywalking.apm.agent.core.context.ContextSnapshot} object to be continued in "completed" method.that is
|
||||
* org.apache.skywalking.apm.agent.core.context.ContextSnapshot} object to be continued in "completed" method. That is
|
||||
* mean the request is ready to submit
|
||||
*/
|
||||
public class SessionRequestInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import com.netflix.hystrix.strategy.concurrency.HystrixConcurrencyStrategy;
|
|||
* <p>
|
||||
* This implementation also returns null when {@link #get()} is called while the {@link HystrixRequestContext} has not
|
||||
* been initialized rather than throwing an exception, allowing for use in a {@link HystrixConcurrencyStrategy} which
|
||||
* does not depend on an a HystrixRequestContext
|
||||
* does not depend on an HystrixRequestContext
|
||||
*/
|
||||
public class SWHystrixLifecycleForwardingRequestVariable<T> extends HystrixRequestVariableDefault<T> {
|
||||
private final HystrixRequestVariableLifecycle<T> lifecycle;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ This is the properties list supported in `agent/config/agent.config`.
|
|||
| `log.max_message_size` | The max size of message to send to server.Default is 10 MB. | SW_GRPC_LOG_MAX_MESSAGE_SIZE | `10485760` |
|
||||
| `plugin.mount` | Mount the specific folders of the plugins. Plugins in mounted folders would work. | SW_MOUNT_FOLDERS | `plugins,activations` |
|
||||
| `plugin.peer_max_length ` | Peer maximum description limit. | SW_PLUGIN_PEER_MAX_LENGTH | `200` |
|
||||
| `plugin.exclude_plugins ` | Exclude some plugins define in plugins dir.Plugin names is defined in [Agent plugin list](Plugin-list.md) | SW_EXCLUDE_PLUGINS | `""` |
|
||||
| `plugin.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` |
|
||||
|
|
|
|||
Loading…
Reference in New Issue