README.md 3.8 KB
Newer Older
wu-sheng's avatar
wu-sheng 已提交
1
# Protocols
wu-sheng's avatar
wu-sheng 已提交
2
There are two types of protocols list here. 
wu-sheng's avatar
wu-sheng 已提交
3

4
- [**Probe Protocol**](#probe-protocols). Include the descriptions and definitions about how agent send collected metrics data and traces, also the formats of each entities.
wu-sheng's avatar
wu-sheng 已提交
5

wu-sheng's avatar
wu-sheng 已提交
6
- [**Query Protocol**](#query-protocol). The backend provide query capability to SkyWalking own UI and others. These queries are based on GraphQL.
wu-sheng's avatar
wu-sheng 已提交
7

wu-sheng's avatar
wu-sheng 已提交
8

9
## Probe Protocols
wu-sheng's avatar
wu-sheng 已提交
10
They also related to the probe group, for understand that, look [Concepts and Designs](../concepts-and-designs/overview.md) document.
wu-sheng's avatar
wu-sheng 已提交
11 12
These groups are **Language based native agent protocol**, **Service Mesh protocol** and **3rd-party instrument protocol**.

13
### Language based native agent protocol
14
There are two types of protocols to make language agents work in distributed environments.
15 16
1. **Cross Process Propagation Headers Protocol** and **Cross Process Correlation Headers Protocol** are in wire data format, 
agent/SDK usually uses HTTP/MQ/HTTP2 headers
17 18 19 20 21
to carry the data with rpc request. The remote agent will receive this in the request handler, and bind the context 
with this specific request.
1. **Trace Data Protocol** is out of wire data, agent/SDK uses this to send traces and metrics to skywalking or other
compatible backend. 

22 23
[Cross Process Propagation Headers Protocol v3](Skywalking-Cross-Process-Propagation-Headers-Protocol-v3.md) is the new protocol for 
in-wire context propagation, started in 8.0.0 release.
24

25 26
[Cross Process Correlation Headers Protocol v1](Skywalking-Cross-Process-Correlation-Headers-Protocol-v1.md) is a new in-wire context propagation additional and optional protocols. 
Please read SkyWalking language agents documentations to see whether it is supported. 
27
This protocol defines the data format of transporting custom data with `Cross Process Propagation Headers Protocol`.
28
SkyWalking javaagent begins to support this since 8.0.0.
29

30
[SkyWalking Trace Data Protocol v3](Trace-Data-Protocol-v3.md) defines the communication way and format between agent and backend.
wu-sheng's avatar
wu-sheng 已提交
31

32 33
[SkyWalking Log Data Protocol](Log-Data-Protocol.md) defines the communication way and format between agent and backend.

34 35 36 37 38 39
### Browser probe protocol

The browser probe, such as  [skywalking-client-js](https://github.com/apache/skywalking-client-js) could use this protocol to send to backend. This service provided by gRPC.

[SkyWalking Browser Protocol](Browser-Protocol.md) define the communication way and format between `skywalking-client-js` and backend.

40 41 42 43 44 45 46 47 48 49 50 51 52
### Service Mesh probe protocol
The probe in sidecar or proxy could use this protocol to send data to backendEnd. This service provided by gRPC, requires 
the following key info:

1. Service Name or ID at both sides.
1. Service Instance Name or ID at both sides.
1. Endpoint. URI in HTTP, service method full signature in gRPC.
1. Latency. In milliseconds.
1. Response code in HTTP
1. Status. Success or fail.
1. Protocol. HTTP, gRPC
1. DetectPoint. In Service Mesh sidecar, `client` or `server`. In normal L7 proxy, value is `proxy`.

53 54 55
### Events Report Protocol

The protocol is used to report events to the backend. The [doc](../concepts-and-designs/event.md) introduces the definition of an event, and [the protocol repository](https://github.com/apache/skywalking-data-collect-protocol/blob/master/event) defines gRPC services and messages formats of events.
56 57 58 59 60

### 3rd-party instrument protocol
3rd-party instrument protocols are not defined by SkyWalking. They are just protocols/formats, which SkyWalking is compatible and
could receive from their existed libraries. SkyWalking starts with supporting Zipkin v1, v2 data formats.

K
kezhenxu94 已提交
61
Backend is based on modularization principle, so very easy to extend a new receiver to support new protocol/format.
wu-sheng's avatar
wu-sheng 已提交
62 63 64

## Query Protocol
Query protocol follows GraphQL grammar, provides data query capabilities, which depends on your analysis metrics.
65
Read [query protocol doc](query-protocol.md) for more details.