This repository contains the OpenSearch adaptation for the OpenTelemetry Astronomy Shop, a microservice-based distributed system intended to illustrate the implementation of OpenTelemetry in a near real-world environment.
The bug is a mapper_parsing_exception encountered when attempting to export traces to OpenSearch. This exception indicates a failure in parsing due to a class cast exception, specifically, an attempt to cast org.opensearch.index.mapper.KeywordFieldMapper to org.opensearch.index.mapper.ObjectMapper. This suggests an incompatibility or misconfiguration in the data schema or mapping used for trace data in OpenSearch.
What is the expected behavior?
The expected behavior is for the OpenTelemetry Collector (otel-col) to successfully export trace data to OpenSearch without encountering schema-related parsing exceptions.
What is the actual behavior?
The actual behavior observed is an error during the export process, which indicates that the data schema or mapping provided to OpenSearch is incorrect or incompatible. This prevents the successful export of trace data and results in data being rejected.
Reproduce
Steps to reproduce:
Configure the OpenTelemetry Collector with the opensearch/traces exporter.
Ensure that trace data being exported conforms to the expected schema or mapping configuration of the OpenSearch instance.
Attempt to export trace data to OpenSearch.
Observe the mapper_parsing_exception in the OpenTelemetry Collector logs.
Permanent error: {"type":"mapper_parsing_exception","reason":"failed to parse","caused_by":{"type":"class_cast_exception","reason":"class org.opensearch.index.mapper.KeywordFieldMapper cannot be cast to class org.opensearch.index.mapper.ObjectMapper (org.opensearch.index.mapper.KeywordFieldMapper and org.opensearch.index.mapper.ObjectMapper are in unnamed module of loader 'app')","caused_by":null}}
Bug Report
latest
Symptom
What is the bug?
mapper_parsing_exception
encountered when attempting to export traces to OpenSearch. This exception indicates a failure in parsing due to a class cast exception, specifically, an attempt to castorg.opensearch.index.mapper.KeywordFieldMapper
toorg.opensearch.index.mapper.ObjectMapper
. This suggests an incompatibility or misconfiguration in the data schema or mapping used for trace data in OpenSearch.What is the expected behavior?
otel-col
) to successfully export trace data to OpenSearch without encountering schema-related parsing exceptions.What is the actual behavior?
Reproduce
Steps to reproduce:
opensearch/traces
exporter.mapper_parsing_exception
in the OpenTelemetry Collector logs.Additional Context
Related issues:
Error Logs: