Polish docs for preparing release. (#490)

This commit is contained in:
吴晟 Wu Sheng 2023-03-29 11:21:50 +08:00 committed by GitHub
parent 1f30e38864
commit 89e5262f99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 33 additions and 8 deletions

View File

@ -20,6 +20,9 @@
},
{
"pattern": "https://kotlinlang.org.*"
},
{
"pattern": "^https://mvnrepository.com/"
}
],
"timeout": "10s",

View File

@ -1,4 +1,9 @@
Dependency the toolkit, such as using maven or gradle
# Add Trace Toolkit
[`apm-toolkit-trace`](https://mvnrepository.com/artifact/org.apache.skywalking/apm-toolkit-trace) provides the APIs to enhance the trace context,
such as `createLocalSpan`, `createExitSpan`, `createEntrySpan`, `log`, `tag`, `prepareForAsync` and `asyncFinish`.
Add the toolkit dependency to your project.
```xml
<dependency>

View File

@ -1,3 +1,7 @@
# Trace Correlation Context
Trace correlation context APIs provide a way to put custom data in tracing context. All the data in
the context will be propagated with the in-wire process automatically.
* Use `TraceContext.putCorrelation()` API to put custom data in tracing context.
```java
Optional<String> previous = TraceContext.putCorrelation("customKey", "customValue");

View File

@ -1,6 +1,8 @@
# trace cross thread
There are some other ways to trace cross thread except the methods in `Tracer`.
* usage 1.
# Trace Cross Thread
These APIs provide ways to continuous tracing in the cross thread scenario with minimal code changes.
All following are sample codes only to demonstrate how to adopt cross thread cases easier.
* Case 1.
```java
@TraceCrossThread
public static class MyCallable<String> implements Callable<String> {
@ -13,7 +15,7 @@ There are some other ways to trace cross thread except the methods in `Tracer`.
ExecutorService executorService = Executors.newFixedThreadPool(1);
executorService.submit(new MyCallable());
```
* usage 2.
* Case 2.
```java
ExecutorService executorService = Executors.newFixedThreadPool(1);
executorService.submit(CallableWrapper.of(new Callable<String>() {
@ -31,7 +33,7 @@ or
}
}));
```
* usage 3.
* Case 3.
```java
@TraceCrossThread
public class MySupplier<String> implements Supplier<String> {
@ -49,7 +51,7 @@ or
return "SupplierWrapper";
})).thenAccept(System.out::println);
```
* usage 4.
* Case 4.
```java
CompletableFuture.supplyAsync(SupplierWrapper.of(() -> {
return "SupplierWrapper";
@ -67,7 +69,6 @@ or
return "FunctionWrapper";
}));
```
_Sample codes only_

View File

@ -1,3 +1,8 @@
# Reading Context
All following APIs provide **readonly** features for the tracing context from tracing system.
The values are only available when the current thread is traced.
* Use `TraceContext.traceId()` API to obtain traceId.
```java
import org.apache.skywalking.apm.toolkit.trace.TraceContext;

View File

@ -1,4 +1,11 @@
* Dependency the toolkit, such as using maven or gradle
# OpenTracing (Deprecated)
OpenTracing is a vendor-neutral standard for distributed tracing. It is a set of APIs that can be used to instrument, generate, collect, and report telemetry data for distributed systems. It is designed to be extensible so that new implementations can be created for new platforms or languages.
It had been archived by the CNCF TOC. [Learn more](https://www.cncf.io/blog/2022/01/31/cncf-archives-the-opentracing-project/).
SkyWalking community keeps the API compatible with 0.30.0 only. All further development will not be accepted.
```xml
<dependency>
<groupId>org.apache.skywalking</groupId>

View File

@ -50,7 +50,7 @@ catalog:
path: "/en/setup/service-agent/java-agent/application-toolkit-trace-correlation-context"
- name: "Across Thread Solution"
path: "/en/setup/service-agent/java-agent/application-toolkit-trace-cross-thread"
- name: "OpenTracing Tracer"
- name: "OpenTracing (Deprecated)"
path: "/en/setup/service-agent/java-agent/opentracing"
- name: "Meter APIs"
path: "/en/setup/service-agent/java-agent/application-toolkit-meter"