Skip to content

TelemetryClient shares Backoff and its retry count across all batches sent #338

@mikelaspina

Description

@mikelaspina

#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions