From 89e5262f999332edf1251e12175d50273b6e6705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=99=9F=20Wu=20Sheng?= Date: Wed, 29 Mar 2023 11:21:50 +0800 Subject: [PATCH] Polish docs for preparing release. (#490) --- .dlc.json | 3 +++ .../java-agent/Application-toolkit-dependency.md | 5 +++++ ...plication-toolkit-trace-correlation-context.md | 4 ++++ .../Application-toolkit-trace-cross-thread.md | 15 ++++++++------- .../Application-toolkit-trace-read-context.md | 5 +++++ .../setup/service-agent/java-agent/Opentracing.md | 7 +++++++ docs/menu.yml | 2 +- 7 files changed, 33 insertions(+), 8 deletions(-) diff --git a/.dlc.json b/.dlc.json index c86d443f4..3e5538313 100644 --- a/.dlc.json +++ b/.dlc.json @@ -20,6 +20,9 @@ }, { "pattern": "https://kotlinlang.org.*" + }, + { + "pattern": "^https://mvnrepository.com/" } ], "timeout": "10s", diff --git a/docs/en/setup/service-agent/java-agent/Application-toolkit-dependency.md b/docs/en/setup/service-agent/java-agent/Application-toolkit-dependency.md index 17140f116..0f50f7c2e 100644 --- a/docs/en/setup/service-agent/java-agent/Application-toolkit-dependency.md +++ b/docs/en/setup/service-agent/java-agent/Application-toolkit-dependency.md @@ -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 diff --git a/docs/en/setup/service-agent/java-agent/Application-toolkit-trace-correlation-context.md b/docs/en/setup/service-agent/java-agent/Application-toolkit-trace-correlation-context.md index 20ca58e1e..0484b101c 100644 --- a/docs/en/setup/service-agent/java-agent/Application-toolkit-trace-correlation-context.md +++ b/docs/en/setup/service-agent/java-agent/Application-toolkit-trace-correlation-context.md @@ -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 previous = TraceContext.putCorrelation("customKey", "customValue"); diff --git a/docs/en/setup/service-agent/java-agent/Application-toolkit-trace-cross-thread.md b/docs/en/setup/service-agent/java-agent/Application-toolkit-trace-cross-thread.md index e5bbcbf5f..7a35fd028 100644 --- a/docs/en/setup/service-agent/java-agent/Application-toolkit-trace-cross-thread.md +++ b/docs/en/setup/service-agent/java-agent/Application-toolkit-trace-cross-thread.md @@ -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 implements Callable { @@ -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() { @@ -31,7 +33,7 @@ or } })); ``` -* usage 3. +* Case 3. ```java @TraceCrossThread public class MySupplier implements Supplier { @@ -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_ diff --git a/docs/en/setup/service-agent/java-agent/Application-toolkit-trace-read-context.md b/docs/en/setup/service-agent/java-agent/Application-toolkit-trace-read-context.md index 76bcdfd73..c6b9e197f 100644 --- a/docs/en/setup/service-agent/java-agent/Application-toolkit-trace-read-context.md +++ b/docs/en/setup/service-agent/java-agent/Application-toolkit-trace-read-context.md @@ -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; diff --git a/docs/en/setup/service-agent/java-agent/Opentracing.md b/docs/en/setup/service-agent/java-agent/Opentracing.md index e6215f1e9..cd311ca17 100644 --- a/docs/en/setup/service-agent/java-agent/Opentracing.md +++ b/docs/en/setup/service-agent/java-agent/Opentracing.md @@ -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 org.apache.skywalking diff --git a/docs/menu.yml b/docs/menu.yml index e13aeadc0..3964b059b 100644 --- a/docs/menu.yml +++ b/docs/menu.yml @@ -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"