Skip to content

[libbeat] Deprecate common.Float #28279

@andrewkroh

Description

@andrewkroh

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions