Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.bithon.component.brpc.exception.ServiceInvocationException;
import org.bithon.component.commons.logging.ILogAdaptor;
import org.bithon.component.commons.logging.LoggerFactory;
import org.bithon.component.commons.logging.RateLimitedLogger;

import java.time.Duration;
import java.util.List;
Expand All @@ -45,6 +46,7 @@
*/
public class BrpcTraceMessageExporter implements IMessageExporter {
private static final ILogAdaptor LOG = LoggerFactory.getLogger(BrpcTraceMessageExporter.class);
private static final RateLimitedLogger RATE_LIMITED_LOG = new RateLimitedLogger(LOG, Duration.ofMinutes(1));

private final ExporterConfig exporterConfig;
private final BrpcClient brpcClient;
Expand Down Expand Up @@ -90,7 +92,9 @@ public void export(Object message) {
try {
this.traceCollector = this.brpcClient.getRemoteService(ITraceCollector.class);
} catch (ServiceInvocationException e) {
LOG.warn("Unable to get remote ITraceCollector service: {}", e.getMessage());
RATE_LIMITED_LOG.warn("trace-collector-init:" + e.getMessage(),
"Unable to get remote ITraceCollector service: {}",
e.getMessage());
Comment on lines +95 to +97
return;
}
}
Expand Down Expand Up @@ -123,7 +127,9 @@ public void export(Object message) {
(List<BrpcTraceSpanMessage>) message);
} catch (CallerSideException e) {
//suppress client exception
LOG.warn("Failed to send tracing: {}", e.getMessage());
RATE_LIMITED_LOG.warn("trace-send:" + e.getMessage(),
"Failed to send tracing: {}",
e.getMessage());
Comment on lines +130 to +132
}
}

Expand Down