Skip to content

Commit 80b89d3

Browse files
Merge pull request #2 from codeandcode0x/feature/trace_interface
Feature/trace interface
2 parents cbed265 + e393730 commit 80b89d3

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ httpMethod <br>
5050
dbUser <br>
5151
messageBusDestination <br>
5252

53-
## Quick Start
53+
# Quick Start
5454

5555
### Start Jaeger
5656

@@ -79,7 +79,7 @@ go get github.com/codeandcode0x/traceandtrace-go
7979
### HTTP tracing
8080

8181
Create a trace on the http request method side.
82-
![http to grpc client](wiki/imgs/http_client_2.jpg)
82+
<img src="wiki/imgs/http_client_2.jpg" width="90%" alt="http to grpc client"><br>
8383
tags are map[string]string type, you can pass logs k-v, tag and field.
8484

8585

@@ -134,20 +134,20 @@ newRpcServiceReq(tracer)
134134
```
135135

136136
### Http to gRPC tracing
137-
![http to grpc client](wiki/imgs/httptogrpc_client.jpg)
137+
<img src="wiki/imgs/httptogrpc_client.jpg" width="90%" alt="http to grpc client"><br>
138138
**ptx** is parent context, it can create sub-context trace span <br>
139139
To call gRPC on the http server side, you need to add the parent context to the gRPC client. For details, you can see the [example](example/http/httpServer.go) .
140140

141-
## Concurrent Processing
142-
### goroutine context control
141+
# Concurrent Processing
142+
## goroutine context control
143143

144144
- By context.Background() create sub-coroutine context, form a session tree (coroutine tree), which is thread-safe (there is no data race problem) ;
145145
- By context WithCancel() create sub-coroutine sessions and manage coroutine tasks ;
146146
- every context will carry related data of parent trace and child span ;
147147

148-
![goroutine session](wiki/imgs/goroutine.png)
148+
<img src="wiki/imgs/goroutine.png" width="80%" alt="goroutine session">
149149

150-
### Trace Job Control
150+
## Trace Job Control
151151
start and end trace job
152152

153153
```go
@@ -171,9 +171,14 @@ for {
171171
}
172172
```
173173

174+
# Jaeger or Zipkin Tracing
175+
<img src="wiki/imgs/zipkin.jpg" width="100%" alt="tracing">
174176

177+
# Maintainer
178+
<img src="wiki/imgs/wx.jpeg" width="350" >
175179

176180

177181

178182

179-
183+
184+

wiki/imgs/wx.jpeg

42.2 KB
Loading

wiki/imgs/zipkin.jpg

290 KB
Loading

0 commit comments

Comments
 (0)