Polish docs for preparing release. (#490)
This commit is contained in:
parent
1f30e38864
commit
89e5262f99
|
|
@ -20,6 +20,9 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pattern": "https://kotlinlang.org.*"
|
"pattern": "https://kotlinlang.org.*"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pattern": "^https://mvnrepository.com/"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"timeout": "10s",
|
"timeout": "10s",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
Dependency the toolkit, such as using maven or gradle
|
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
|
```xml
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
||||||
|
|
@ -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.
|
* Use `TraceContext.putCorrelation()` API to put custom data in tracing context.
|
||||||
```java
|
```java
|
||||||
Optional<String> previous = TraceContext.putCorrelation("customKey", "customValue");
|
Optional<String> previous = TraceContext.putCorrelation("customKey", "customValue");
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
# trace cross thread
|
# Trace Cross Thread
|
||||||
There are some other ways to trace cross thread except the methods in `Tracer`.
|
These APIs provide ways to continuous tracing in the cross thread scenario with minimal code changes.
|
||||||
* usage 1.
|
All following are sample codes only to demonstrate how to adopt cross thread cases easier.
|
||||||
|
|
||||||
|
* Case 1.
|
||||||
```java
|
```java
|
||||||
@TraceCrossThread
|
@TraceCrossThread
|
||||||
public static class MyCallable<String> implements Callable<String> {
|
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 executorService = Executors.newFixedThreadPool(1);
|
||||||
executorService.submit(new MyCallable());
|
executorService.submit(new MyCallable());
|
||||||
```
|
```
|
||||||
* usage 2.
|
* Case 2.
|
||||||
```java
|
```java
|
||||||
ExecutorService executorService = Executors.newFixedThreadPool(1);
|
ExecutorService executorService = Executors.newFixedThreadPool(1);
|
||||||
executorService.submit(CallableWrapper.of(new Callable<String>() {
|
executorService.submit(CallableWrapper.of(new Callable<String>() {
|
||||||
|
|
@ -31,7 +33,7 @@ or
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
```
|
```
|
||||||
* usage 3.
|
* Case 3.
|
||||||
```java
|
```java
|
||||||
@TraceCrossThread
|
@TraceCrossThread
|
||||||
public class MySupplier<String> implements Supplier<String> {
|
public class MySupplier<String> implements Supplier<String> {
|
||||||
|
|
@ -49,7 +51,7 @@ or
|
||||||
return "SupplierWrapper";
|
return "SupplierWrapper";
|
||||||
})).thenAccept(System.out::println);
|
})).thenAccept(System.out::println);
|
||||||
```
|
```
|
||||||
* usage 4.
|
* Case 4.
|
||||||
```java
|
```java
|
||||||
CompletableFuture.supplyAsync(SupplierWrapper.of(() -> {
|
CompletableFuture.supplyAsync(SupplierWrapper.of(() -> {
|
||||||
return "SupplierWrapper";
|
return "SupplierWrapper";
|
||||||
|
|
@ -67,7 +69,6 @@ or
|
||||||
return "FunctionWrapper";
|
return "FunctionWrapper";
|
||||||
}));
|
}));
|
||||||
```
|
```
|
||||||
_Sample codes only_
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.
|
* Use `TraceContext.traceId()` API to obtain traceId.
|
||||||
```java
|
```java
|
||||||
import org.apache.skywalking.apm.toolkit.trace.TraceContext;
|
import org.apache.skywalking.apm.toolkit.trace.TraceContext;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,11 @@
|
||||||
* Dependency the toolkit, such as using maven or gradle
|
* 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
|
```xml
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.skywalking</groupId>
|
<groupId>org.apache.skywalking</groupId>
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ catalog:
|
||||||
path: "/en/setup/service-agent/java-agent/application-toolkit-trace-correlation-context"
|
path: "/en/setup/service-agent/java-agent/application-toolkit-trace-correlation-context"
|
||||||
- name: "Across Thread Solution"
|
- name: "Across Thread Solution"
|
||||||
path: "/en/setup/service-agent/java-agent/application-toolkit-trace-cross-thread"
|
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"
|
path: "/en/setup/service-agent/java-agent/opentracing"
|
||||||
- name: "Meter APIs"
|
- name: "Meter APIs"
|
||||||
path: "/en/setup/service-agent/java-agent/application-toolkit-meter"
|
path: "/en/setup/service-agent/java-agent/application-toolkit-meter"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue