luozenglin opened a new pull request, #9608:
URL: https://github.com/apache/incubator-doris/pull/9608
The collection of query traces is implemented in fe and be, and the spans
are exported to zipkin.
# Proposed changes
Issue Number: #9577
I plan to introduce OpenTelemetry to collect telemetry data, such as traces,
metrics, logs, to improve the observability of Doris.
### The first phase uses OpenTelemetry to implement the collection and
export of traces.
A trace represents the execution process of a single request in the system,
span represents a logical operation unit with start time and execution duration
in the system, and multiple spans form a trace.
1. support the collection and export of query traces
2. support the collection and export of load traces
### The second phase integrates metrics and logs to OpenTelemtry standard.
## Problem Summary:
This pr implements the collection and sending of query traces. fe turns on
traces, collects spans and propagates the traces information to be via prc.
eventually each node exports the collected spans to zipkin.
```
┌──────────────────────┐
│ fe │
│ │
│ span root │
│ │ │
│ ┌───────┴────┐ ├────────────────┐
│ │ │ │ │
│ span A span B │ │
│ │ │ │
│ │ │ │
└────────────────┼─────┘ │
│ │
┌─────┴───────────────┐ │
│ │ │
┌──────────┼───────────┐ │
│ │ be │ be │ ┌────────────┐
│ │ │ │ │ │
│ span C │ │ span │ │
│ │ ├────────────────┴──────────► zipkin │
│ ┌─────┴───────┐ │ │ │
│ │ │ │ │ │
│ span D span E │ │ │
│ │ └────────────┘
└──────────────────────┘
```
### Example:
1. Start zipkin:
```
curl -sSL https://zipkin.io/quickstart.sh | bash -s
java -jar zipkin.jar
```
2. Add Configuration:
fe.conf:
```
enable_tracing=true
trace_export_url=http://127.0.0.1:9411/api/v2/spans
```
be.conf:
```
enable_tracing=true
trace_export_url=http://127.0.0.1:9411/api/v2/spans
```
3. Execute a query
4. From zipkin UI:

## Checklist(Required)
1. Does it affect the original behavior: (No)
2. Has unit tests been added: (No)
3. Has document been added or modified: (No)
4. Does it need to update dependencies: (Yes)
5. Are there any changes that cannot be rolled back: (No)
## Further comments
If this is a relatively large or complex change, kick off the discussion at
[[email protected]](mailto:[email protected]) by explaining why you
chose the solution you did and what alternatives you considered, etc...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]