File tree Expand file tree Collapse file tree 3 files changed +43
-2
lines changed Expand file tree Collapse file tree 3 files changed +43
-2
lines changed Original file line number Diff line number Diff line change 23
23
24
24
(defn- server-span? [{:keys [tags]}] (has-tag? " span.kind" " server" tags))
25
25
26
+ (defn- consumer-span? [{:keys [tags]}] (has-tag? " span.kind" " consumer" tags))
27
+
26
28
(defn- client-span? [{:keys [tags]}] (has-tag? " span.kind" " client" tags))
27
29
28
30
(defn- producer-span? [{:keys [tags]}] (has-tag? " span.kind" " producer" tags))
88
90
89
91
(s/defn execution-boxes :- [s-sequence-diagram/ExecutionBox]
90
92
[trace :- s-jaeger/Trace]
91
- (let [server-spans (->> trace :spans (filter server-span?))]
92
- (map (span->execution-box trace) server-spans)))
93
+ (let [server-spans (->> trace :spans (filter server-span?))
94
+ consumer-spans (->> trace :spans (filter consumer-span?))]
95
+ (map (span->execution-box trace) (concat server-spans consumer-spans))))
93
96
94
97
(s/defn arrows :- [s-sequence-diagram/Arrow]
95
98
[trace :- s-jaeger/Trace]
Original file line number Diff line number Diff line change 71
71
:tags [{:key " span.kind"
72
72
:type " string"
73
73
:value " producer" }
74
+ {:key " message_bus.destination"
75
+ :type " string"
76
+ :value " PROCESS_ORDER" }]}
77
+ {:trace-id " 1"
78
+ :span-id " 5"
79
+ :process-id :p2
80
+ :operation-name " kafka.in PROCESS_ORDER"
81
+ :start-time 1500000000350000
82
+ :duration 50
83
+ :references [{:ref-type :child-of
84
+ :trace-id " 1"
85
+ :span-id " 4" }]
86
+ :tags [{:key " span.kind"
87
+ :type " string"
88
+ :value " consumer" }
74
89
{:key " message_bus.destination"
75
90
:type " string"
76
91
:value " PROCESS_ORDER" }]}]
104
119
{:id " 3"
105
120
:start-time #epoch 1500000000200
106
121
:duration-ms 100
122
+ :lifeline " orders" }
123
+ {:id " 5"
124
+ :start-time #epoch 1500000000350
125
+ :duration-ms 50
107
126
:lifeline " orders" }]
108
127
(nut/execution-boxes trace)))))
109
128
Original file line number Diff line number Diff line change 72
72
" tags" [{" key" " span.kind"
73
73
" type" " string"
74
74
" value" " producer" }
75
+ {" key" " message_bus.destination"
76
+ " type" " string"
77
+ " value" " PROCESS_ORDER" }]}
78
+ {" traceID" " 1"
79
+ " spanID" " 5"
80
+ " processID" " p2"
81
+ " operationName" " kafka.in PROCESS_ORDER"
82
+ " startTime" 1500000000350000
83
+ " duration" 50
84
+ " references" [{" ref-type" " CHILD_OF"
85
+ " traceID" " 1"
86
+ " spanID" " 4" }]
87
+ " tags" [{" key" " span.kind"
88
+ " type" " string"
89
+ " value" " consumer" }
75
90
{" key" " message_bus.destination"
76
91
" type" " string"
77
92
" value" " PROCESS_ORDER" }]}]
97
112
{" id" " 3"
98
113
" start_time" 1500000000200
99
114
" duration_ms" 100
115
+ " lifeline" " orders" }
116
+ {" id" " 5"
117
+ " start_time" 1500000000350
118
+ " duration_ms" 50
100
119
" lifeline" " orders" }]
101
120
" arrows" [{" id" " 2"
102
121
" from" " bff"
You can’t perform that action at this time.
0 commit comments