Optimize document and fix typo (#148)

This commit is contained in:
Oliver 2022-04-10 20:17:02 +08:00 committed by GitHub
parent 74d11ce7a2
commit 3c8e5347f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 36 additions and 33 deletions

View File

@ -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>
*/

View File

@ -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);

View File

@ -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());
}
}

View File

@ -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());
}
}

View File

@ -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());
}
}

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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) {

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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,

View File

@ -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
*/

View File

@ -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.

View File

@ -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.

View File

@ -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 {

View File

@ -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 {

View File

@ -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;

View File

@ -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` |