otel: add test for otelconsumer + elasticsearchexporter document-level retries#46413
otel: add test for otelconsumer + elasticsearchexporter document-level retries#46413mauri870 merged 17 commits intoelastic:mainfrom
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
7a0f602 to
59942e6
Compare
05af572 to
56a5e5c
Compare
|
/test |
|
This pull request is now in conflicts. Could you fix it? 🙏 |
|
/test |
|
This is ready for review now, pending CI. |
|
This pull request is now in conflicts. Could you fix it? 🙏 |
19ac3fe to
05a4cbf
Compare
|
TestFilestreamTruncateBlockedOutput is flaking https://github.com/elastic/ingest-dev/issues/6087. Edit: Fix here #46576. |
|
@cmacknz When you have a chance, could you please review this and approve if it looks good? Thanks! |
|
@Mergifyio backport 9.0 9.1 |
✅ Backports have been createdDetails
|
…l retries (#46413) * otel: add test for document-level retries * fix linter errors * add dummy assert for dropped events * use deterministic handler from mock-es * assert mock-es metrics * sync go.mod and go.sum * simplify handler logic * update comments * use slices.Contains * go get mock-es latest (cherry picked from commit 2948886) # Conflicts: # NOTICE.txt # go.mod # go.sum # x-pack/filebeat/tests/integration/otel_test.go
…l retries (#46413) * otel: add test for document-level retries * fix linter errors * add dummy assert for dropped events * use deterministic handler from mock-es * assert mock-es metrics * sync go.mod and go.sum * simplify handler logic * update comments * use slices.Contains * go get mock-es latest (cherry picked from commit 2948886) # Conflicts: # NOTICE.txt # go.mod # go.sum # x-pack/filebeat/tests/integration/otel_test.go
…l retries (#46413) * otel: add test for document-level retries * fix linter errors * add dummy assert for dropped events * use deterministic handler from mock-es * assert mock-es metrics * sync go.mod and go.sum * simplify handler logic * update comments * use slices.Contains * go get mock-es latest (cherry picked from commit 2948886) # Conflicts: # NOTICE.txt # go.mod # go.sum # x-pack/filebeat/tests/integration/otel_test.go
…hexporter document-level retries (#46619) * otel: add test for otelconsumer + elasticsearchexporter document-level retries (#46413) * otel: add test for document-level retries * fix linter errors * add dummy assert for dropped events * use deterministic handler from mock-es * assert mock-es metrics * sync go.mod and go.sum * simplify handler logic * update comments * use slices.Contains * go get mock-es latest (cherry picked from commit 2948886) # Conflicts: # NOTICE.txt # go.mod # go.sum # x-pack/filebeat/tests/integration/otel_test.go * fix conflicts * go mod tidy --------- Co-authored-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
…chexporter document-level retries (#46616) * otel: add test for otelconsumer + elasticsearchexporter document-level retries (#46413) * otel: add test for document-level retries * fix linter errors * add dummy assert for dropped events * use deterministic handler from mock-es * assert mock-es metrics * sync go.mod and go.sum * simplify handler logic * update comments * use slices.Contains * go get mock-es latest (cherry picked from commit 2948886) # Conflicts: # NOTICE.txt # go.mod # go.sum # x-pack/filebeat/tests/integration/otel_test.go * fix conflicts * remove test not in 8.19 --------- Co-authored-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Proposed commit message
This commit adds a test to verify that
elasticsearchexporterappliesdocument-level retries correctly, and that the combination of
otelconsumerand the exporter guarantees at-least-once delivery whena batch is acknowledged.
The test simulates retryable and permanent errors, checks that
max_retriesis respected, and ensures that documents retried aftertemporary failures are ingested while permanent failures are dropped.
Currenty, otelconsumer output metrics are not tracked correctly, and it
will always ACK the whole batch even if there were retries or dropped
events by the exporter.
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.How to test this PR locally
Related issues
sending_queuefrom [beatreceiver] - Disableforce_attempt_http2and map ES config to elasticsearchexporter #46111