Skip to content

Commit

Permalink
enhance doc (#565)
Browse files Browse the repository at this point in the history
  • Loading branch information
eeliu authored Nov 28, 2023
1 parent 1992a08 commit 28af851
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 294 deletions.
26 changes: 1 addition & 25 deletions DOC/API/collector-agent/Readme.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
## Json string map to Pinpoint item

Json String | Pinpoint Name | Details
:---|:---|:---
tid|transactionId|Transaction ID
sid|SpanId|Span ID
S|startTime|Start time of request
E|elapsed|Elapse time
FT|front type|Language type(PHP:1500, Python:1700)
appname|applicationName|Application name
appid|agentId|Agent ID
stp|serviceType|Service type([See details](https://github.com/naver/pinpoint/blob/master/commons/src/main/java/com/navercorp/pinpoint/common/trace/ServiceType.java))
name| apids|Function name
uri|rpc|URI
clues|TAnnotation|-1:arguments<br>14:return<br>40:http url<br>41:http param<br>42:http param entity<br>45:cookies<br>46:http status code
psid|parentSpanId|Parent span ID
nsid|nextSpanId|Next span ID
dst|destinationId|Destination ID
client|remoteAddr|Client address
server|endPoint|Server address
ERR|err|Error
EXP|exp|Exception
pname|parentApplicationName|Parent application name
ptype|parentApplicationType|Parent application type
Ah|acceptorHost|Acceptor host
NP|NginxProxy header|Nginx proxy header
AP|ApacheProxy header|Apache proxy header
Go to file https://github.com/pinpoint-apm/pinpoint-c-agent/blob/1992a082d370cac1496e48fbe8de3851016ef20a/collector-agent/agent/AgentRouter.go#L73
2 changes: 1 addition & 1 deletion DOC/C-CPP/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ FetchContent_Declare(
GIT_REPOSITORY https://github.com/pinpoint-c-agent/pinpoint-c-agent.git
# GIT_TAG 74bc39d813d664cb56b78b1506d91932c8131396
# not recommended, please use hash key like `74bc39d813d664cb56b78b1506d91932c8131396`
GIT_TAG origin/dev
GIT_TAG origin/v0.4.13
)

FetchContent_GetProperties(pinpoint)
Expand Down
2 changes: 1 addition & 1 deletion DOC/PHP/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ collector-agent| [installed ?](../collector-agent/readme.md)

1. Use `composer require`
```
composer require pinpoint-apm/pinpoint-php-aop
composer require pinpoint-apm/pinpoint-php-aop:v2.1.0
```
2. Add the following constants in the index file of your project:

Expand Down
105 changes: 0 additions & 105 deletions DOC/PHP/User Manual-CN.md

This file was deleted.

106 changes: 0 additions & 106 deletions DOC/PHP/User Manual.md

This file was deleted.

5 changes: 1 addition & 4 deletions DOC/PY/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@
Dependency| Version| More
---|----|---
python |3+ | (async must 3.7.1+)
GO | |
gcc|gcc 4.7+| c++11
*inux| | `windows` is on the way
pinpoint| 2.0+(GRPC)|
collector-agent| [installed ?](../collector-agent/readme.md)

### Installation

```shell
$ pip install pinpointPy
$ pip install pinpointPy==1.1.0
```

### How to Use
Expand Down
39 changes: 33 additions & 6 deletions DOC/collector-agent/readme.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## Install Collector Agent
`Collector-Agent`, who formats the span from PHP/Python/C/CPP-Agent and send to `Pinpoint-Collector`, is an agent written by [golang](https://golang.google.cn/).Please install golang before the following steps.[Install GO](https://golang.google.cn/doc/install)
`Collector-Agent` formats the span from PHP/Python/C/CPP-Agent and send to `Pinpoint-Collector`.

### Steps
### 1. build from source
1. Goto collector-agent(`pinpoint-c-agent/collector-agent`)
2. Execute command `go build`
2. Execute command `make`
3. Add environment variables:
```
export PP_COLLECTOR_AGENT_SPAN_IP=dev-pinpoint
Expand All @@ -24,11 +24,38 @@
5. `PP_ADDRESS`: Set the address of `Collector-Agent`, then `PHP/Python-Agent` will connect Collector-Agent through this address.
4. Run `Collector-Agent` by executing command `./CollectorAgent`
### Use docker images
### 2. Use docker images
```sh
docker run -itd -p 9999:9999 --env-file ./env.list ghcr.io/pinpoint-apm/pinpoint-c-agent/collector-agent:0.4.25
docker run -itd -p 9999:9999 --env-file ./env.list ghcr.io/pinpoint-apm/pinpoint-c-agent/collector-agent:0.4.13
```
### 3. K8s side car

server.yaml sample


``` yml
- image: ghcr.io/pinpoint-apm/pinpoint-c-agent/collector-agent:0.4.13
name: collector-agent
args: ["-RecvBufSize=1048576"]
securityContext:
runAsUser: 0
env:
- name: "PP_COLLECTOR_AGENT_SPAN_IP"
value: "pinpoint-collector.hostname"
- name: "PP_COLLECTOR_AGENT_SPAN_PORT"
value: "9993"
- name: "PP_COLLECTOR_AGENT_AGENT_IP"
value: "pinpoint-collector.hostname"
- name: "PP_COLLECTOR_AGENT_AGENT_PORT"
value: "9991"
- name: "PP_COLLECTOR_AGENT_STAT_IP"
value: "pinpoint-collector.hostname"
- name: "PP_COLLECTOR_AGENT_STAT_PORT"
value: "9992"
- name: "PP_Log_Level"
value: "INFO"
- name: "PP_ADDRESS"
value: "localhost@9999"
- name: "PP_COLLECTOR_AGENT_ISDOCKER"
value: "true"
```
44 changes: 0 additions & 44 deletions DOC/common/Readme.md

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ language| tutorial
php|[English](DOC/PHP/Readme.md) [中文](DOC/PHP/Readme-CN.md) [한국어](DOC/PHP/Readme-KR.md)
python3|[English](DOC/PY/Readme.md) [中文](DOC/PY/Readme-CN.md) [한국어](DOC/PY/Readme-KR.md)
c/cpp|[English](DOC/C-CPP/Readme.md)
golang|[go-aop-agent](https://github.com/pinpoint-apm/go-aop-agent)
golang|[go-aop-agent](https://github.com/pinpoint-apm/go-aop-agent) (_experiment_)

> [Try playground](/testapps/readme.md)
Expand Down
Loading

0 comments on commit 28af851

Please sign in to comment.