diff --git a/rollbar-java/src/main/java/com/rollbar/notifier/config/ConfigBuilder.java b/rollbar-java/src/main/java/com/rollbar/notifier/config/ConfigBuilder.java index cbf9fd1e..519b1a78 100644 --- a/rollbar-java/src/main/java/com/rollbar/notifier/config/ConfigBuilder.java +++ b/rollbar-java/src/main/java/com/rollbar/notifier/config/ConfigBuilder.java @@ -87,16 +87,11 @@ public class ConfigBuilder { protected boolean truncateLargePayloads; - private int maximumTelemetryData = DEFAULT_CAPACITY_FOR_TELEMETRY_EVENTS; + private int maximumTelemetryData = + RollbarTelemetryEventTracker.MAXIMUM_CAPACITY_FOR_TELEMETRY_EVENTS; private TelemetryEventTracker telemetryEventTracker; - private static final int MINIMUM_CAPACITY_FOR_TELEMETRY_EVENTS = 1; - - private static final int DEFAULT_CAPACITY_FOR_TELEMETRY_EVENTS = 10; - - private static final int MAXIMUM_CAPACITY_FOR_TELEMETRY_EVENTS = 50; - /** * Constructor with an access token. */ @@ -487,23 +482,13 @@ public ConfigBuilder truncateLargePayloads(boolean truncate) { /** *
- * Maximum Telemetry Events sent in a payload (This value can be between 1 and 50, exceed any of - * these thresholds and the closest will be taken). Default: 10. + * Maximum Telemetry Events sent in a payload. Default is + * {@value RollbarTelemetryEventTracker#MAXIMUM_CAPACITY_FOR_TELEMETRY_EVENTS}. *
* @param maximumTelemetryData max quantity of telemetry events sent. * @return the builder instance. */ public ConfigBuilder maximumTelemetryData(int maximumTelemetryData) { - if (maximumTelemetryData < MINIMUM_CAPACITY_FOR_TELEMETRY_EVENTS) { - this.maximumTelemetryData = MINIMUM_CAPACITY_FOR_TELEMETRY_EVENTS; - return this; - } - - if (maximumTelemetryData > MAXIMUM_CAPACITY_FOR_TELEMETRY_EVENTS) { - this.maximumTelemetryData = MAXIMUM_CAPACITY_FOR_TELEMETRY_EVENTS; - return this; - } - this.maximumTelemetryData = maximumTelemetryData; return this; } diff --git a/rollbar-java/src/main/java/com/rollbar/notifier/telemetry/RollbarTelemetryEventTracker.java b/rollbar-java/src/main/java/com/rollbar/notifier/telemetry/RollbarTelemetryEventTracker.java index bfa0ad0d..4aaf053e 100644 --- a/rollbar-java/src/main/java/com/rollbar/notifier/telemetry/RollbarTelemetryEventTracker.java +++ b/rollbar-java/src/main/java/com/rollbar/notifier/telemetry/RollbarTelemetryEventTracker.java @@ -17,6 +17,7 @@ * Default {@link TelemetryEventTracker}. */ public class RollbarTelemetryEventTracker implements TelemetryEventTracker { + public static final int MAXIMUM_CAPACITY_FOR_TELEMETRY_EVENTS = 100; private final int maximumTelemetryData; private final Queue- * Maximum Telemetry Events sent in a payload (can be overwritten if the - * {@link TelemetryEventTracker} has thresholds like the {@link RollbarTelemetryEventTracker}). - * Default: 10. + * Maximum Telemetry Events sent in a payload. Default is + * {@value RollbarTelemetryEventTracker#MAXIMUM_CAPACITY_FOR_TELEMETRY_EVENTS}. *
* @param maximumTelemetryData max quantity of telemetry events sent. * @return the builder instance.