Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ httpMethod <br>
dbUser <br>
messageBusDestination <br>

## Quick Start
# Quick Start

### Start Jaeger

Expand Down Expand Up @@ -79,7 +79,7 @@ go get github.com/codeandcode0x/traceandtrace-go
### HTTP tracing

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


Expand Down Expand Up @@ -134,20 +134,20 @@ newRpcServiceReq(tracer)
```

### Http to gRPC tracing
![http to grpc client](wiki/imgs/httptogrpc_client.jpg)
<img src="wiki/imgs/httptogrpc_client.jpg" width="90%" alt="http to grpc client"><br>
**ptx** is parent context, it can create sub-context trace span <br>
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) .

## Concurrent Processing
### goroutine context control
# Concurrent Processing
## goroutine context control

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

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

### Trace Job Control
## Trace Job Control
start and end trace job

```go
Expand All @@ -171,9 +171,14 @@ for {
}
```

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

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







Binary file added wiki/imgs/wx.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wiki/imgs/zipkin.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.