Skip to content

[exporter/elasticsearch] OTel mapping mode doesn't work for < 8.12 #37283

Open
@carsonip

Description

Component(s)

exporter/elasticsearch

What happened?

Description

OTel mapping mode indexing would fail because of _bulk?require_data_stream=true usage, as require_data_stream is not supported pre-8.12.

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "request [/_bulk] contains unrecognized parameter: [require_data_stream] -> did you mean [require_alias]?"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "request [/_bulk] contains unrecognized parameter: [require_data_stream] -> did you mean [require_alias]?"
  },
  "status": 400
}

Steps to Reproduce

Use OTel mode

Expected Result

Documents are successfully indexed into pre-8.12 ES

Actual Result

Documents are not successfully indexed into pre-8.12 ES

Collector version

0.117.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

Log output

Additional context

No response

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