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
|
static boolean isRetryableException(IOException e) { |
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
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
opentelemetry-java/exporters/sender/okhttp/src/main/java/io/opentelemetry/exporter/sender/okhttp/internal/RetryInterceptor.java
Line 148 in 1fcbed8
however, it does not handle all the issues with network link failures e.g. my use case
java.net.SocketTimeoutException: timeoutbecause 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
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