Spring Cloud Sleuth use case
Span Terminology (terminology)
Span: basic unit of work, for example, sending an RPC in a new span is equivalent to sending a response request to rpc,span through a 64-bit ID that uniquely identifies the trace with another 64-bit ID, and span has other data information such as a digest, timestamp event, Key value Comments (tags), the ID of the span, and the progress ID (usually the IP address)
Span is constantly starting and stopping, while recording time information, when you create a span, you must stop it at some point in the future.
Trace: A tree-like structure consisting of a series of spans, for example, if you are running a distributed Big Data project, you may need to create a trace.
Annotation: Used to record the existence of an event in a timely manner, some core annotations used to define the start and end of a request
- Cs-client Sent-The client initiates a request, and this annotion describes the beginning of the span
- Sr-server Received-The server gets the request and is ready to start processing it, if its SR minus CS Timestamp can get network delay
- Ss-server Sent-Annotations indicate the completion of the request processing (when the request is returned to the client), if the SS minus the SR timestamp can get the processing request time required by the server
- Cr-client Received-Indicates the end of span, the client successfully receives a reply from the server, and if the CR minus CS timestamp can get the client to get reply from the server all the time required
Spring Cloud Sleuth Use tutorial