Skip to content

version 1.19.0

Choose a tag to compare

@seratch seratch released this 17 Feb 11:50
· 1009 commits to main since this release

New Features

A new option to completely disable the underlying API call metrics management

The smart rate limiter feature in this SDK is so useful for easily managing rate limits in Slack API calls.
https://slack.dev/java-slack-sdk/guides/web-api-basics#rate-limits

However, as reported at #933, the feature can be a bit overhead for the app that needs to handle requests associated with a large number of workspace installations (say, thousands!).

Since this version, we've added a new option statsEnabled to SlackConfig and its API client level sub configs such as MethodsConfig, SCIMConfig, and AuditConfig. The default value is true, which is compatible with the past versions.

If you don't need the traffic metrics at all, you can disable this feature by the following way:

SlackConfig config = new SlackConfig();
config.setStatsEnabled(false);
Slack slack = Slack.getInstance(config);

For more granular control, you can set the same flag for each API client:

SlackConfig config = new SlackConfig();
// Disable the metrics only for Web API methods
config.getMethodsConfig().setStatsEnabled(false);
// For SCIM, Audit Logs APIs, the metrics are still available
Slack slack = Slack.getInstance(config);

If you set this flag to false, you can get rid of the potential overhead for large-scale apps. The downside of the customization would be that your app needs to manage rate-limited error patterns on our own. This is because disabling the option means that API call history data, which this SDK's smart rate limiter feature relies on, is no longer maintained.

Also, since this release, the API client behavior with the default settings is significantly improved. Therefore, for most apps, now the default configuration should work without any performance issues.

Changes

  • [slack-api-client] #931 Add bookmarks.* Web APIs - Thanks @seratch
  • [slack-api-cljent] #930 Add admin.users.unsupportedVersions.export API support - Thanks @seratch
  • [slack-api-client] #925 Add accessibility_label to button block element - Thanks @seratch
  • [slack-api-client] #934 Fix #933 by adjusting the internals of smart rate limiter - Thanks @sidneyamani @seratch
  • [all] #932 Upgrade gson, slf4j versions and others - Thanks @seratch