Skip to content

[exporter/elasticsearch] Data stream routing does not sanitize values #34285

@carsonip

Description

@carsonip

Component(s)

exporter/elasticsearch

What happened?

Description

Data stream attributes are not sanitized, resulting in non-compliant data stream names. Sanitization should be implemented according to https://www.elastic.co/guide/en/ecs/current/ecs-data_stream.html. There is also an implementation of DS fields sanitization in ES, but in this implementation there is in incorrect handling of an edge case where string limit should be 100 unicode characters instead of 100 bytes.

Steps to Reproduce

Supply a value with - in resource attributes data_stream.dataset or data_stream.namespace

Expected Result

The value is sanitized so that the resulting data stream does not contain -

Actual Result

The resulting data stream contains -.

Collector version

v0.105.0

Environment information

No response

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

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