You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by li...@apache.org on 2023/10/24 07:55:36 UTC
[skywalking-go] branch main updated: fix: Update toolkit-trace.md (#131)
This is an automated email from the ASF dual-hosted git repository.
liuhan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-go.git
The following commit(s) were added to refs/heads/main by this push:
new 31a3cd0 fix: Update toolkit-trace.md (#131)
31a3cd0 is described below
commit 31a3cd0df6d2d2b5f8f8987325fe7b961d8ea20e
Author: Sebastian Scheibe <Ec...@users.noreply.github.com>
AuthorDate: Tue Oct 24 15:55:31 2023 +0800
fix: Update toolkit-trace.md (#131)
---
docs/en/advanced-features/manual-apis/toolkit-trace.md | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/docs/en/advanced-features/manual-apis/toolkit-trace.md b/docs/en/advanced-features/manual-apis/toolkit-trace.md
index b32a12f..1e0073a 100644
--- a/docs/en/advanced-features/manual-apis/toolkit-trace.md
+++ b/docs/en/advanced-features/manual-apis/toolkit-trace.md
@@ -60,12 +60,12 @@ trace.StopSpan()
### Add Span’s Tag and Log
-Use `trace.SetLog` to record log in span.
+Use `trace.AddLog()` to record log in span.
-Use `trace.SetTag` to add tag to span, the parameters of tag are two String which are key and value respectively.
+Use `trace.SetTag()` to add tag to span, the parameters of tag are two String which are key and value respectively.
```go
-trace.SetLog(...string)
+trace.AddLog(...string)
trace.SetTag("key","value")
```
@@ -76,7 +76,7 @@ Use `trace.PrepareAsync()` to make current span still alive until `trace.AsyncFi
### Capture/Continue Context Snapshot
-1. Use `trace.CaptureContext()` to get tthe segment info and store it in `ContextSnapshotRef`.
+1. Use `trace.CaptureContext()` to get the segment info and store it in `ContextSnapshotRef`.
2. Propagate the snapshot context to any other goroutine.
3. Use `trace.ContinueContext(snapshotRef)` to load the snapshotRef in the target goroutine.
@@ -90,7 +90,7 @@ All following APIs provide **readonly** features for the tracing context from tr
traceID := trace.GetTraceID()
```
-- Use `trace.GetSegmentID` API to get segmentID.
+- Use `trace.GetSegmentID()` API to get segmentID.
```go
segmentID := trace.GetSegmentID()
@@ -117,8 +117,8 @@ trace.SetCorrelation("key","value")
CorrelationContext will remove the key when the value is empty.
-Use `trace.GetCorrelation` API to get custom data.
+Use `trace.GetCorrelation()` API to get custom data.
```go
-value := trace.GetCorrealtion("key")
+value := trace.GetCorrelation("key")
```