Skip to content

otelmap: check if we can use libbeat serializer #45336

@mauri870

Description

@mauri870

The otelmap package was created to serve as a translation layer between Beats's mapstr.M type and OpenTelemetry’s pcommon.Map.

As a middle ground, we use Go’s map[string]any as a proxy type between the two. Libbeat provides a generic serializer that handles most of the type conversions we need, so we could leverage it in otelmap instead of duplicating the same logic as we do today.

There are some caveats and possibly minor inconsistencies in how otelmap and libbeat perform these conversions. The goal is to identify these differences and evaluate whether it's feasible to rely on libbeat instead. Since libbeat is used in standalone Beats, the last thing we want is to break existing functionality.

Metadata

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