Trace Data Protocol describes the data format between SkyWalking agent/sniffer and backend.
## Overview
Trace data protocol is defined and provided in [gRPC format](https://github.com/apache/skywalking-data-collect-protocol), and implemented in [HTTP 1.1](HTTP-API-Protocol.md).
### Report service instance status
## Report service instance status
1. Service Instance Properties
Service instance contains more information than just a name. In order for the agent to report service instance status, use `ManagementService#reportInstanceProperties` service to provide a string-key/string-value pair list as the parameter. The `language` of target instance must be provided as the minimum requirement.
2. Service Ping
Service instance should keep alive with the backend. The agent should set a scheduler using `ManagementService#keepAlive` service every minute.
### Send trace and metrics
## Send trace and JVM metrics
After you have the service ID and service instance ID ready, you could send traces and metrics. Now we
have
1.`TraceSegmentReportService#collect` for the SkyWalking native trace format
...
...
@@ -40,7 +39,7 @@ See [Cross Process Propagation Headers Protocol v3](Skywalking-Cross-Process-Pro
4.`Span#skipAnalysis` may be TRUE, if this span doesn't require backend analysis.
### Protocol Definition
## Trace Report Protocol
```protobuf
// The segment is a collection of spans. It includes all collected spans in a simple one request context, such as a HTTP request process.
//
...
...
@@ -220,3 +219,70 @@ message SegmentCollection {
repeatedSegmentObjectsegments=1;
}
```
## Report Span Attached Events
Besides in-process agents, there are other out-of-process agent, such as ebpf agent, could report additional information
as attached events for the relative spans.
`SpanAttachedEventReportService#collect` for attached event reporting.