newrelic / newrelic/newrelic-telemetry-sdk-java

TelemetryClient shares Backoff and its retry count across all batches sent

Open
#338 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
46
Forks
36
PR merge metrics
No merged PRs in 30d

Description

#334 introduced a bug that causes all batches to share the same Backoff object, and thus share a single retry count. Obvious thread-safety issues aside, reusing the Backoff object means only Backoff#maxRetries retries for the lifetime of the process. This results in a large volume of errors like [EventBatch] - Max retries exceeded. Dropping <N> pieces of data!] and data being dropped.

A copy of the backoff policy should be made at https://github.com/newrelic/newrelic-telemetry-sdk-java/blob/main/telemetry-core/src/main/java/com/newrelic/telemetry/TelemetryClient.java#L200

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

Open telemetry-core/src/main/java/com/newrelic/telemetry/TelemetryClient.java around line 200 and inspect how the Backoff policy is reused when batches are sent. Confirm that each batch has an independent retry count and that the shared-policy behavior causing data drops is gone.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
observability-sre
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.