Skip to content

Commit d30630a

Browse files
Bigdellepchaigno
authored andcommitted
feat: add IPTraceID into flow struct
This change introduces the IPTraceID field to the Hubble protobuf. This allows IP-based tracing information to be propagated and associated with flows observed by Hubble. The following changes are included: - A new `IPTraceID` message type is defined in `flow.proto`, containing the trace ID and the IP option type. - The Hubble parser is updated to decode the IP trace ID from monitor events (both drop and trace notifications) and populate the `ip_trace_id` field in the resulting `Flow` message. - The Hubble printer is updated to display the IP trace ID in the output. Signed-off-by: Ben Bigdelle <bigdelle@google.com>
1 parent 3a78b98 commit d30630a

10 files changed

Lines changed: 421 additions & 147 deletions

File tree

api/v1/flow/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
- [ICMPv6](#flow-ICMPv6)
2525
- [IP](#flow-IP)
2626
- [IPCacheNotification](#flow-IPCacheNotification)
27+
- [IPTraceID](#flow-IPTraceID)
2728
- [Kafka](#flow-Kafka)
2829
- [Layer4](#flow-Layer4)
2930
- [Layer7](#flow-Layer7)
@@ -312,6 +313,7 @@ EventTypeFilter is a filter describing a particular event type.
312313
| trace_observation_point | [TraceObservationPoint](#flow-TraceObservationPoint) | | Only applicable to cilium trace notifications, blank for other types. |
313314
| trace_reason | [TraceReason](#flow-TraceReason) | | Cilium datapath trace reason info. |
314315
| file | [FileInfo](#flow-FileInfo) | | Cilium datapath filename and line number. Currently only applicable when Verdict = DROPPED. |
316+
| ip_trace_id | [IPTraceID](#flow-IPTraceID) | | IPTraceID relates to the trace ID in the IP options of a packet. |
315317
| drop_reason_desc | [DropReason](#flow-DropReason) | | only applicable to Verdict = DROPPED. |
316318
| is_reply | [google.protobuf.BoolValue](#google-protobuf-BoolValue) | | is_reply indicates that this was a packet (L4) or message (L7) in the reply direction. May be absent (in which case it is unknown whether it is a reply or not). |
317319
| debug_capture_point | [DebugCapturePoint](#flow-DebugCapturePoint) | | Only applicable to cilium debug capture events, blank for other types |
@@ -381,6 +383,7 @@ multiple fields are set, then all fields must match for the filter to match.
381383
| node_labels | [string](#string) | repeated | node_labels filters on a list of node label selectors. Selectors support the full Kubernetes label selector syntax. |
382384
| ip_version | [IPVersion](#flow-IPVersion) | repeated | filter based on IP version (ipv4 or ipv6) |
383385
| trace_id | [string](#string) | repeated | trace_id filters flows by trace ID |
386+
| ip_trace_id | [uint64](#uint64) | repeated | ip_trace_id filters flows by IPTraceID |
384387
| experimental | [FlowFilter.Experimental](#flow-FlowFilter-Experimental) | | experimental contains filters that are not stable yet. Support for experimental features is always optional and subject to change. |
385388

386389

@@ -512,6 +515,22 @@ L7 information for HTTP flows. It corresponds to Cilium&#39;s [accesslog.LogReco
512515

513516

514517

518+
<a name="flow-IPTraceID"></a>
519+
520+
### IPTraceID
521+
522+
523+
524+
| Field | Type | Label | Description |
525+
| ----- | ---- | ----- | ----------- |
526+
| trace_id | [uint64](#uint64) | | |
527+
| ip_option_type | [uint32](#uint32) | | |
528+
529+
530+
531+
532+
533+
515534
<a name="flow-Kafka"></a>
516535

517536
### Kafka

0 commit comments

Comments
 (0)