You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2023/05/10 03:24:16 UTC

[skywalking-go] branch main updated: Split the build documentation into development version and user setup version (#29)

This is an automated email from the ASF dual-hosted git repository.

wusheng 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 e173bdb  Split the build documentation into development version and user setup version (#29)
e173bdb is described below

commit e173bdb7d3e867d0e78961dc71606c54b609c198
Author: mrproliu <74...@qq.com>
AuthorDate: Wed May 10 11:24:11 2023 +0800

    Split the build documentation into development version and user setup version (#29)
---
 .../build-and-use-agent.md                         | 45 ++++++++++++++++++++++
 docs/en/setup/gobuild.md                           | 16 ++++----
 docs/menu.yml                                      |  2 +
 3 files changed, 55 insertions(+), 8 deletions(-)

diff --git a/docs/en/development-and-contribution/build-and-use-agent.md b/docs/en/development-and-contribution/build-and-use-agent.md
new file mode 100644
index 0000000..4b3195c
--- /dev/null
+++ b/docs/en/development-and-contribution/build-and-use-agent.md
@@ -0,0 +1,45 @@
+# Build and use the Agent from source codes
+
+When you want to build and use the Agent from source code, please follow these steps.
+
+## Install SkyWalking Go
+
+Use `go get` to import the `skywalking-go` program.
+
+```shell
+// latest or any commit ID
+go get github.com/apache/skywalking-go@latest
+```
+
+Also, import the module to your `main` package: 
+
+```go
+import _ "github.com/apache/skywalking-go"
+```
+
+## Build the Agent
+
+When building the project, you need to clone the project and build it.
+
+```shell
+// git clone the same version(tag or commit ID) as your dependency version.
+git clone https://github.com/apache/skywalking-go.git
+cd skywalking-go && make build
+```
+
+Next, you would find several versions of the Go Agent program for different systems in the **bin** directory of the current project. 
+When you need to compile the program, please add the following statement with the agent program which matches your system:
+
+```shell
+-toolexec="/path/to/go-agent" -a
+```
+
+1. `-toolexec` is the path to the Golang enhancement program.
+2. `-a` is the parameter for rebuilding all packages forcibly.
+
+If you want to customize the configuration information for the current service, please add the following parameters, 
+[read more please refer the settings override documentation](../advanced-features/settings-override.md)):
+
+```shell
+-toolexec="/path/to/go-agent -config /path/to/config.yaml" -a
+```
\ No newline at end of file
diff --git a/docs/en/setup/gobuild.md b/docs/en/setup/gobuild.md
index 5e6e658..1145705 100644
--- a/docs/en/setup/gobuild.md
+++ b/docs/en/setup/gobuild.md
@@ -10,20 +10,20 @@ Use `go get` to import the `skywalking-go` program.
 go get github.com/apache/skywalking-go
 ```
 
-Also, import the module to your main package: 
+Also, import the module to your `main` package: 
 
 ```go
 import _ "github.com/apache/skywalking-go"
 ```
 
-## Build the project
-When building the project, you need to download the Golang enhancement program first:
+## Download Agent
 
-```shell
-go install github.com/apache/skywalking-go/tools/go-agent
-```
+Download the Agent from the [official website](https://skywalking.apache.org/downloads/#GoAgent). 
+
+**NOTICE**: Please ensure that the version of the Agent you downloaded is consistent with the version installed via `go get` in the previous section, 
+to prevent errors such as missing package references during compilation.
 
-When using go build, add the following parameters:
+Next, add the following parameters in `go build`:
 
 ```shell
 -toolexec="/path/to/go-agent" -a
@@ -36,5 +36,5 @@ If you want to customize the configuration information for the current service,
 [read more please refer the settings override documentation](../advanced-features/settings-override.md)):
 
 ```shell
--toolexec="/path/to/skywalking-enhance -config /path/to/config.yaml" -a
+-toolexec="/path/to/go-agent -config /path/to/config.yaml" -a
 ```
\ No newline at end of file
diff --git a/docs/menu.yml b/docs/menu.yml
index 792938e..8f3cb11 100644
--- a/docs/menu.yml
+++ b/docs/menu.yml
@@ -43,3 +43,5 @@ catalog:
           path: /en/development-and-contribution/write-plugin-testing
         - name: Running And Debugging
           path: /en/development-and-contribution/running-and-debugging
+        - name: Build and Use Agent from source codes
+          path: /en/development-and-contribution/build-and-use-agent