- [Chore] Dependency upgrades
- New BlockingFlush, deregister parties upon message completion
- New Added wk size to message size calc along with a buffer
- New Allow GsonBuilder to be passed in and used through Analytics and AnalyticsClient
- [Chore] Dependency upgrades
- New Remove writeKey from header, add writeKey on payload(batch)
- New Change exception to identify the limited exceed for the message
- New Change method static to public to create a GSON instance
- [Chore] Dependency upgrades
- New Add option to sentAt field to be null
- New Add throw interrupted exception when event exceeds 32kb to stop Thread
- [Chore] Dependency upgrades
- Fix Batching queue to regard to api limits
- Fix Correctly measure the size of message queue
- Fix Bugfix for TLS version error (protocol not supported error)
- Fix AnalyticsClient Looper won't start if isShutdown is true
- Fix Set the default retries to 3
- [Chore] Dependency upgrades
Pull Requests Merged:
- Fix Fix issues around backpressure calculation
Pull Requests Merged:
- Fix maintaining size state of queue
Pull Requests Merged:
- New defaults queue max size to be over 500kb
Breaking Changes:
- SegmentService now has no url path. If you're using it directly we recommend using setUploadURL
Pull Requests Merged:
-
New Allow processing of already buffered messages on shutdown
-
New Configurable message queue size
-
New Configurable retry count
-
New Add functionality to set custom endpoint with host and prefix
-
New Limit by bytes
-
Fix cli wasnt setting event fields
-
Fix e2e fix - traits was defined twice in command line opts
-
Fix Require either userId or anonymousId (aligns with other Segment SDK conventions)
- Fix: This fix gracefully retries temporary HTTP errors such as 5xx server errors. Previously such HTTP errors were not being retried.
-
New: Allow setting
String
message and anonymous IDs. Previously only UUIDs were accepted. This is a breaking API change and might require you to update your code if you were accessing themessageId
oranonymousId
in a transformer or interceptor. -
New: Set a custom user-agent for HTTP requests. The default user agent is "analytics-java/version". This user agent is also customizable and can be override for special cases.
final Analytics analytics = Analytics.builder(writeKey) //
.userAgent("custom user agent")
.build();
- Fix: Previously the version was being sent as "analytics/version" instead of simply "version".
- New: Make endpoint configurable.
- New: Allow setting a custom message ID.
- New: Allow setting a custom timestamp.
- Fix: Previously, logging Retrofit messages could cause errors if the message contained formatting directives.
- New: Add ability to set multiple Callback instances.
- New: Add plugin API.
class LoggingPlugin implements Plugin {
@Override public void configure(Analytics.Builder builder) {
builder.log(new Log() {
@Override public void print(Level level, String format, Object... args) {
System.out.println(level + ":\t" + String.format(format, args));
}
@Override public void print(Level level, Throwable error, String format, Object... args) {
System.out.println(level + ":\t" + String.format(format, args));
System.out.println(error);
}
});
builder.callback(new Callback() {
@Override public void success(Message message) {
System.out.println("Uploaded " + message);
}
@Override public void failure(Message message, Throwable throwable) {
System.out.println("Could not upload " + message);
System.out.println(throwable);
}
});
}
}
final Analytics analytics = Analytics.builder(writeKey) //
.plugin(new LoggingPlugin())
.build();
- Fix: Correctly format and parse dates as per ISO 8601.
- New: Add Page API.
- Fix: Force ISO 8601 format for dates.
- Use a single thread by default to upload events in the background. Clients can still set their own executor to override this behaviour.
- New: Add Callback API.
- Fix: Backpressure behaviour. Enqueuing events on a full queue will block instead of throwing an exception.
- Removed Guava dependency.
- Internal: Rename enums with lowercase.