Skip to content

[libbeat] Deprecate common.Float #28279

Closed
@andrewkroh

Description

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.

Activity

elasticmachine

elasticmachine commented on Oct 6, 2021

@elasticmachine
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

elasticmachine

elasticmachine commented on Oct 6, 2021

@elasticmachine
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

added a commit that references this issue on Oct 6, 2021
2c8fee8
added a commit that references this issue on Oct 7, 2021
b891ce2
added a commit that references this issue on Oct 7, 2021
79ae581
added a commit that references this issue on Oct 13, 2021

5 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      [libbeat] Deprecate common.Float · Issue #28279 · elastic/beats