Skip to content

Data loss if issues on TCP protocol layer or failures on network link. Retry policy is ignored #6962

@YuriyHolinko

Description

@YuriyHolinko

Is your feature request related to a problem? Please describe.
I have noticed data loss in shipping of logs even if retry policy is used. the problem is that we do not have any strong logic around retryable exceptions and if there is some issue in network link, the data is not re-sent instead, the exception is silently swallowed.
the code which decides retry or not is here

however, it does not handle all the issues with network link failures e.g. my use case

java.net.SocketTimeoutException: timeout
because the message does not match the condition
message == null || message.toLowerCase(Locale.ROOT).contains("connect timed out");

Describe the solution you'd like
I suggest modifying the condition

  • to cover more cases
  • to make it configurable at the programmatic level, so users can adapt it to the specific network failures they may encounter

Describe alternatives you've considered
I cannot define

Additional context
I can bring a draft PR with my fix as I am not using OTEL java agents to ship logs but initiate it programmatically . hope this will be useful for others as well

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions