Skip to content
Merged
Show file tree
Hide file tree
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 @@ -107,9 +107,6 @@ long getExporterTimeoutNanos() {
*/
public BatchLogRecordProcessorBuilder setMaxQueueSize(int maxQueueSize) {
checkArgument(maxQueueSize > 0, "maxQueueSize must be positive.");
if (maxExportBatchSize > maxQueueSize) {
logger.log(Level.WARNING, "maxExportBatchSize should not exceed maxQueueSize.");
}
this.maxQueueSize = maxQueueSize;
return this;
}
Expand All @@ -131,9 +128,6 @@ int getMaxQueueSize() {
*/
public BatchLogRecordProcessorBuilder setMaxExportBatchSize(int maxExportBatchSize) {
checkArgument(maxExportBatchSize > 0, "maxExportBatchSize must be positive.");
if (maxExportBatchSize > maxQueueSize) {
logger.log(Level.WARNING, "maxExportBatchSize should not exceed maxQueueSize.");
}
this.maxExportBatchSize = maxExportBatchSize;
return this;
}
Expand Down Expand Up @@ -161,8 +155,11 @@ int getMaxExportBatchSize() {
*/
public BatchLogRecordProcessor build() {
if (maxExportBatchSize > maxQueueSize) {
logger.log(
Level.WARNING,
"maxExportBatchSize should not exceed maxQueueSize. Setting maxExportBatchSize to {0} instead of {1}",
new Object[] {maxQueueSize, maxExportBatchSize});
maxExportBatchSize = maxQueueSize;
logger.log(Level.FINE, "Using maxExportBatchSize: {0}", maxExportBatchSize);
}
return new BatchLogRecordProcessor(
logRecordExporter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ long getExporterTimeoutNanos() {
*/
public BatchSpanProcessorBuilder setMaxQueueSize(int maxQueueSize) {
checkArgument(maxQueueSize > 0, "maxQueueSize must be positive.");
if (maxExportBatchSize > maxQueueSize) {
logger.log(Level.WARNING, "maxExportBatchSize should not exceed maxQueueSize.");
}
this.maxQueueSize = maxQueueSize;
return this;
}
Expand All @@ -138,9 +135,6 @@ int getMaxQueueSize() {
*/
public BatchSpanProcessorBuilder setMaxExportBatchSize(int maxExportBatchSize) {
checkArgument(maxExportBatchSize > 0, "maxExportBatchSize must be positive.");
if (maxExportBatchSize > maxQueueSize) {
logger.log(Level.WARNING, "maxExportBatchSize should not exceed maxQueueSize.");
}
this.maxExportBatchSize = maxExportBatchSize;
return this;
}
Expand Down Expand Up @@ -168,8 +162,11 @@ int getMaxExportBatchSize() {
*/
public BatchSpanProcessor build() {
if (maxExportBatchSize > maxQueueSize) {
logger.log(
Level.WARNING,
"maxExportBatchSize should not exceed maxQueueSize. Setting maxExportBatchSize to {0} instead of {1}",
new Object[] {maxQueueSize, maxExportBatchSize});
maxExportBatchSize = maxQueueSize;
logger.log(Level.FINE, "Using maxExportBatchSize: {0}", maxExportBatchSize);
}
return new BatchSpanProcessor(
spanExporter,
Expand Down
Loading