Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions server/ingester/flow_log/dbwriter/span_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,10 @@ func (t *SpanWithTraceID) Encode() {
// topic: currently only taken from Kafka's RequestDomain
if t.L7Protocol == uint8(datatype.L7_PROTOCOL_KAFKA) {
encoder.WriteString255(t.RequestDomain)
encoder.WriteString255(t.RequestType)
} else {
encoder.WriteString255("")
encoder.WriteString255("")
}
encoder.WriteVarintU64(t.SyscallTraceIDRequest)
encoder.WriteVarintU64(t.SyscallTraceIDResponse)
Expand Down
6 changes: 4 additions & 2 deletions server/libs/tracetree/spantrace.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/deepflowio/deepflow/server/libs/pool"
)

const SPAN_TRACE_VERSION = 0x11
const SPAN_TRACE_VERSION = 0x12

type SpanTrace struct {
Time uint32 // not store, easy to use when calculating
Expand Down Expand Up @@ -53,7 +53,8 @@ type SpanTrace struct {
SpanId string
ParentSpanId string
AppService string
Topic string
Topic string // only valid when is Kafka protocol, from l7FlowLog RequestDomain
RequestType string // only valid when is Kafka protocol
SyscallTraceIDRequest uint64
SyscallTraceIDResponse uint64

Expand Down Expand Up @@ -93,6 +94,7 @@ func (t *SpanTrace) Decode(decoder *codec.SimpleDecoder) error {
t.ParentSpanId = decoder.ReadString255()
t.AppService = decoder.ReadString255()
t.Topic = decoder.ReadString255()
t.RequestType = decoder.ReadString255()

t.SyscallTraceIDRequest = decoder.ReadVarintU64()
t.SyscallTraceIDResponse = decoder.ReadVarintU64()
Expand Down