We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbc35bb commit e557583Copy full SHA for e557583
sentry/src/main/java/io/sentry/logger/LoggerBatchProcessor.java
@@ -24,6 +24,7 @@ public final class LoggerBatchProcessor implements ILoggerBatchProcessor {
24
25
public static final int FLUSH_AFTER_MS = 5000;
26
public static final int MAX_BATCH_SIZE = 100;
27
+ public static final int MAX_QUEUE_SIZE = 1000;
28
29
private final @NotNull SentryOptions options;
30
private final @NotNull ISentryClient client;
@@ -46,6 +47,9 @@ public LoggerBatchProcessor(
46
47
48
@Override
49
public void add(final @NotNull SentryLogEvent logEvent) {
50
+ if (pendingCount.getCount() >= MAX_QUEUE_SIZE) {
51
+ return;
52
+ }
53
pendingCount.increment();
54
queue.offer(logEvent);
55
maybeSchedule(false, false);
0 commit comments