How to Monitor and Handle auth.test Throttling in Slack BoltJS SDK (v3) #2361
Open
Description
Question
We are encountering challenges in monitoring and handling rate limit errors, specifically for the auth.test API call, when using the Slack BoltJS SDK (v3) with the AWS Lambda Receiver. The SDK’s internal handling of rate limits abstracts visibility, making it difficult to track throttling events in real-time or implement centralized monitoring.
We are looking for guidance or best practices to improve our ability to handle and monitor these events proactively.
Context
- Our system is built using the Slack BoltJS SDK (v3) with AWS Lambda Receiver.
- auth.test is called internally by the SDK, and rate-limiting errors are managed without exposing sufficient details.
- We need better insights into:
3.1 When throttling occurs.
3.2 Retry intervals (Retry-After)
3.3 A way to log or intercept these errors for centralized monitoring.
Specific Questions
- How can we track throttling events for auth.test in real-time?
Is there a way to configure the SDK or use a custom logger to capture detailed information about rate-limit errors, including:
1.1 API call details (e.g., auth.test).
1.2 Retry intervals (Retry-After header).
1.3.Timestamps or contextual metadata? - Can we intercept and handle rate-limit errors manually?
- What are Slack’s recommendations for centralized monitoring of throttling issues?
- Are there built-in hooks or best practices for integrating Slack rate-limit events with external monitoring tools (e.g., CloudWatch, Datadog)?
- Are there SDK configurations or middleware patterns to address these challenges?
Could we implement a middleware to capture and log rate-limit events without disrupting the SDK’s core functionality?
Request
We would greatly appreciate Slack’s guidance on the following:
- Steps to monitor throttling errors effectively within the BoltJS SDK.
- Configuration options or patterns to handle auth.test rate-limiting issues.
- Any documentation or examples on handling Slack rate limits in high-traffic systems.
Environment
1. Slack BoltJS SDK Version: v3.x
2. Environment: AWS Lambda Node.js runtime
3. Receiver: AWS Lambda Receiver
Thank you in advance for your help! Please let us know if further clarification or additional details are needed.