SkyWalking
Created:2025-01-21 Last Modified:2025-08-29
This document was translated by ChatGPT
By parsing the SkyWalking sw8 protocol, the fields in the SkyWalking protocol data structure are mapped to the corresponding fields in l7_flow_log. The mapping relationship is shown in the table below:
Tag field mapping table — the table below only includes fields that have a mapping relationship
| Name | Chinese | SkyWalking Data Structure | Description |
|---|---|---|---|
| start_time | 开始时间 | span.startTime | -- |
| end_time | 结束时间 | span.endTime | -- |
| protocol | 网络协议 | TCP | Fixed enumeration value |
| attributes | 标签 | span.tags | -- |
| ip | IP 地址 | -- | Obtained from the upstream SkyWalking Agent data source |
| l7_protocol | 应用协议 | span.tags.[db.type/http.scheme/db.system/rpc.system/messaging.system/messaging.protocol] | If there are any tags starting with http., mark as HTTP protocol; otherwise, try to obtain from span.tags |
| l7_protocol_str | 应用协议 | span.tags.[db.type/http.scheme/db.system/rpc.system/messaging.system/messaging.protocol] | First try to convert from l7_protocol to a description; if conversion fails, record directly as tag value |
| version | 协议版本 | span.tags.http.flavor | -- |
| type | 日志类型 | SESSION | Fixed enumeration value |
| request_type | 请求类型 | span.tags.[http.method/cache.cmd/db.operation/rpc.method] | -- |
| request_domain | 请求域名 | span.tags.[http.host/db.connection_string] | -- |
| request_resource | 请求资源 | span.endpointName/span.tags.[http.target/db.statement/messaging.url/rpc.service/cache.key] | If span.tags.http.target exists, read it; if not, extract from http.url, only keeping the call info after the domain name |
| request_id | 请求 ID | -- | |
| response_status | 响应状态 | Try to convert based on response_code; if conversion fails, get span.isError — if true: STATUS_SERVER_ERROR, otherwise STATUS_SERVER_OK | -- |
| response_code | 响应码 | span.tags.[status_code/http.status_code/status.code] | Prefer span.tags.http.status_code |
| response_exception | 响应异常 | Convert to the corresponding exception description based on response_code | -- |
| app_service | 服务名称 | segment.service | -- |
| app_instance | 服务实例 | segment.serviceInstance | -- |
| endpoint | 端点 | span.operationName | -- |
| trace_id | TraceID | span.traceID | -- |
| span_id | SpanID | span.TraceSegmentID-span.spanID | -- |
| parent_span_id | ParentSpanID | segment.ID-span.parentSpanID/span.ref.parentTraceSegmentID-span.ref.parentSpanID | Prefer segment.ID-span.parentSpanID; if span.parentSpanID = -1, then get ParentSpanID from span.ref |
| span_kind | Span 类型 | span.spanType.Exit: SPAN_KIND_CLIENT, span.spanType.Entry: SPAN_KIND_SERVER, span.spanType.Local: SPAN_KIND_INTERNAL, span.spanType.Entry && span.spanLayer.MQ: SPAN_KIND_CONSUMER, span.spanType.Exit && span.spanLayer.MQ: SPAN_KIND_PRODUCER | -- |
| events | 事件 | -- | -- |
| observation_point | 观测点 | span.spanType.Exit: Client Application (C-APP), span.spanType.Entry: Server Application (S-APP), span.spanType.Local: Application (APP) | -- |