mirror of
https://github.com/tiennm99/tjahzi.git
synced 2026-10-19 14:16:21 +00:00
Re #77: Renamed LogBufferAgent and its thread (ReadingLogBufferAndSendingHttp) to LogShipper. Added option to configure time it sleeps between reading from log buffer to not hog CPU. Also now default is 25ms instead of hardcoded 1ms previously.
This commit is contained in:
1 parent
7883f4851f
commit
7ae613aae1
1 file changed
+12
@@ -74,6 +74,9 @@ public class LokiAppenderBuilder<B extends LokiAppenderBuilder<B>> extends Abstr
|
||||
@PluginBuilderAttribute
|
||||
private long batchWait = 5;
|
||||
|
||||
@PluginBuilderAttribute
|
||||
private long logShipperIntervalMillis = 250;
|
||||
|
||||
@PluginBuilderAttribute
|
||||
private int shutdownTimeoutSeconds = 10;
|
||||
|
||||
@@ -142,6 +145,7 @@ public class LokiAppenderBuilder<B extends LokiAppenderBuilder<B>> extends Abstr
|
||||
TimeUnit.SECONDS.toMillis(batchWait),
|
||||
bufferSizeBytes,
|
||||
TimeUnit.SECONDS.toMillis(shutdownTimeoutSeconds),
|
||||
logShipperIntervalMillis,
|
||||
isUseOffHeapBuffer()
|
||||
);
|
||||
|
||||
@@ -247,6 +251,14 @@ public class LokiAppenderBuilder<B extends LokiAppenderBuilder<B>> extends Abstr
|
||||
this.batchWait = batchWait;
|
||||
}
|
||||
|
||||
public long getLogShipperIntervalMillis() {
|
||||
return logShipperIntervalMillis;
|
||||
}
|
||||
|
||||
public void setLogShipperIntervalMillis(long logShipperIntervalMillis) {
|
||||
this.logShipperIntervalMillis = logShipperIntervalMillis;
|
||||
}
|
||||
|
||||
public int getShutdownTimeoutSeconds() {
|
||||
return shutdownTimeoutSeconds;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user