Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[exporter/elasticsearch] Workaround TSDB limitation on array dimension fields #35004

Closed
carsonip opened this issue Sep 4, 2024 · 2 comments · Fixed by #35009
Closed

[exporter/elasticsearch] Workaround TSDB limitation on array dimension fields #35004

carsonip opened this issue Sep 4, 2024 · 2 comments · Fixed by #35009
Assignees
Labels
bug Something isn't working exporter/elasticsearch

Comments

@carsonip
Copy link
Contributor

carsonip commented Sep 4, 2024

Component(s)

exporter/elasticsearch

What happened?

Description

Elasticsearch TSDB does not accept dimension fields which are arrays. It will result in ingestion failures.

We have a related fix for non-TSDB index mode, but TSDB index mode still has this limitation.

As all attributes are dimensions, and that the exporter currently emits attribute values which are arrays as actual arrays in the document, it will be affected by this TSDB limitation. Elasticsearch exporter should workaround this limitation specifically for metrics.

Steps to Reproduce

Send an attribute with array value to an ES index that uses TSDB index mode

Expected Result

No errors

Actual Result

Fail to index

2024-09-04T14:55:22.350+0100    error   elasticsearchexporter@v0.108.0/bulkindexer.go:332       failed to index document        {"kind": "exporter", "data_type": "metrics", "name": "elasticsearch", "index": "metrics-generic.otel-default", "error.type": "illegal_argument_exception", "error.reason": "Error extracting routing: Routing values must be strings but found [START_ARRAY]"}

Collector version

v0.108.0

Environment information

Environment

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

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@carsonip carsonip added bug Something isn't working needs triage New item requiring triage labels Sep 4, 2024
Copy link
Contributor

github-actions bot commented Sep 4, 2024

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@crobert-1
Copy link
Member

This issue was filed by a code owner, and generally makes sense to me. Removing needs triage.

@crobert-1 crobert-1 removed the needs triage New item requiring triage label Sep 4, 2024
f7o pushed a commit to f7o/opentelemetry-collector-contrib that referenced this issue Sep 12, 2024
…or metrics OTel mode (open-telemetry#35009)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
Elasticsearch TSDB does not support array dimensions. Workaround it by
stringifying attribute array values in OTel mapping mode for metrics.

Refactor to improve test code reuse.

**Link to tracking Issue:** <Issue number if applicable>

Fixes open-telemetry#35004

**Testing:** <Describe what testing was performed and which tests were
added.>

Added exporter test for otel mode logs, metrics and traces

**Documentation:** <Describe the documentation added.>
jriguera pushed a commit to springernature/opentelemetry-collector-contrib that referenced this issue Oct 4, 2024
…or metrics OTel mode (open-telemetry#35009)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
Elasticsearch TSDB does not support array dimensions. Workaround it by
stringifying attribute array values in OTel mapping mode for metrics.

Refactor to improve test code reuse.

**Link to tracking Issue:** <Issue number if applicable>

Fixes open-telemetry#35004

**Testing:** <Describe what testing was performed and which tests were
added.>

Added exporter test for otel mode logs, metrics and traces

**Documentation:** <Describe the documentation added.>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working exporter/elasticsearch
Projects
None yet
2 participants