Edgio / vflow

Enterprise Network Flow Collector (IPFIX, sFlow, Netflow)
http://www.verizonmedia.com
Apache License 2.0
1.09k stars 223 forks source link

support_flow_sample_expanded_and_counter_sample_expanded #170

Open rachelScout opened 1 year ago

rachelScout commented 1 year ago

support flow sample expanded and counter sample expanded

dbardbar commented 1 year ago

I think this change is problematic. It defines a new type called FlowSampleExpand, which has different fields than the regular FlowSample. The expanded format is just a different binary representation of the same data, so it is not reasonable to have a different JSON representation of them. As vflow aims to give a standard representation of the data on wire, regardless of minor differences in encoding, this doesn't sound like the way to go.

Also, there's a lot of code duplication here, while actually the different in compact vs. expanded boils down to just a few differences.

See https://github.com/Edgio/vflow/issues/179 for my detailed suggestion on how to solve this properly.

fthrslntgy commented 1 year ago

THIS PR IS LIFE-SAVING. GOD BLESS YOU BRO.