open-telemetry / open-telemetry/opentelemetry-cpp

[BUG] Elasticsearch exporter can still block on ReadError or WriteError

Open
#4,330 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triage/accepted
Dominant language
C++
Stars
1.4k
Forks
632
Avg merge
1d 13h
Merged PRs (30d)
75

Description

PR #4298 fixed most completion-state handling, but ReadError and WriteError still leave completion_ as Pending. If either is the final callback, waitForResponse() can block forever.

Both events should record CompletionState::Failure.

Please also add tests with an injected fake HTTP client covering:

  • completion before waiting
  • ReadError and WriteError
  • Destroyed while pending
  • response followed by Destroyed

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the Elasticsearch exporter completion handling and the injected fake HTTP client tests. Start with waitForResponse() and the ReadError, WriteError, Destroyed, and response callback paths. Done means failures no longer remain pending and tests cover completion before waiting, both errors, destruction while pending, and response followed by destruction.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, elasticsearch
Domain
observability-sre
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.