newrelic / newrelic/newrelic-telemetry-sdk-java
TelemetryClient shares Backoff and its retry count across all batches sent
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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