The common.Float type was at one time used to ensure that float values were always marshaled with a decimal point (e.g. .000000) so that dynamic mapping in ES would set the proper type. But since about 2017 (#4492) this type has not been used. After we switched to using github.com/urso/go-structform for encoding events to JSON the common.Float implementation of MarshalJSON was ignored.
During event normalization any float32 or float64 is converted to a common.Float. This means that all processors that do type assertions must handle about common.Float. But AFAICT none of them do. For example the convert processor doesn't work on floats because it doesn't check for common.Float.
So because the common.Float has no purpose anymore it should be deprecated and removed from usage with the event normalization code.
The
common.Floattype was at one time used to ensure that float values were always marshaled with a decimal point (e.g..000000) so that dynamic mapping in ES would set the proper type. But since about 2017 (#4492) this type has not been used. After we switched to using github.com/urso/go-structform for encoding events to JSON thecommon.Floatimplementation ofMarshalJSONwas ignored.During event normalization any float32 or float64 is converted to a
common.Float. This means that all processors that do type assertions must handle aboutcommon.Float. But AFAICT none of them do. For example theconvertprocessor doesn't work on floats because it doesn't check forcommon.Float.So because the
common.Floathas no purpose anymore it should be deprecated and removed from usage with the event normalization code.