Integrating Thundra with Slack


Integrating Thundra with Slack (1)

Serverless is making revolutionary changes to software development and deployment with a new paradigm and new rules. With serverless, cloud providers manage and provision necessary services for you, so you don’t need to worry about deploying, managing, or scaling infrastructures by abstracting them. However, problems do not disappear when you use a serverless architecture. You can still encounter application bottlenecks and many types of failures that you probably didn’t encounter in the pre-serverless era.

Serverless can have new types of failures like timeouts, cold starts, or third-party errors on APIs. You’ll need to handle these issues whether your serverless application is in the development phase or in production.

Thundra alerts help to keep you informed about incidents in your serverless application. Thundra has a wide range of alert types with different integrations. One of its supported platforms is Slack, whose messages for Thundra alerts let you know about bottlenecks in your serverless system.

Thundra Alert Types

Thundra queries have detailed filtering options for your rich monitoring data. Queries allow you to track your serverless application and discover issues before they cause bigger problems. For example, you can search for functions that cause latency on your system with a basic query. Saving this query as an alert helps you to periodically check system latency. You can save queries as an alert for different types of data:

  • Functions: AWS Lambda functions on your serverless application.
  • Invocations: Invocation data for your AWS Lambda functions. You can detect problematic invocations by setting alerts for all your invocations or for invocations for specific functions.
  • Traces: Transactions that include AWS or non-AWS services and Lambda functions on your serverless architecture. Set alerts for traces that need to be detected if there is an issue.
  • Operations: All operations of your serverless resources. You can detect bottlenecks in your operations by setting alerts on the “Operations” page.
  • Security alerts: You can set security configurations for your AWS Lambda functions to restrict access to resources. When you configure security settings, security alerts are created by default. When a violation occurs, you will be notified via these security alerts. You can disable the alerts from the “Alerts” page.

Integrating Alerts with Slack

When saving your alerts, you can select different types of notification options. These define how you’ll be notified when an event occurs for your alert. You can also integrate your Thundra account with your Slack account to send notifications to Slack channels.

To do this, you’ll first need to connect your Slack account to your Thundra account. The “Settings” page lists all alert integrations. Let’s select Slack to connect to Thundra.


Figure 1: Slack integration page

When you click on the “Add to Slack” button you’ll be redirected to a page where you’ll give permission for Thundra to send notifications. On that page, you’ll select the channel to which your Thundra alert notifications will be sent. Channels that you integrate with Thundra will be listed on the “Slack integration” page. Now, let’s show how to use this Slack integration in your alerts.

When you create an alert you’ll be offered notification preferences. Select “Slack” from these preferences to see integrated Slack channels. Your notifications will be sent through the channels selected when an event occurs for the alert. 


Figure 2: Selecting Slack channels during alert policy creation

Be Aware of Long-Running Functions

Tuning your application’s performance is always an issue. You need to be aware of any underperformance in your serverless system. Here we’ll show you an example of how to use Thundra alerts with Slack integration to address a performance issue.

Sometimes a Lambda function’s duration can be greater than expected. Any time there is an unexpected increase in the duration, you should do a deep dive into the cause.

Let’s set an alert for a function for long-lasting invocations with long execution durations. This will check for the user save function, which is important in ensuring that the function has a short execution time. If an execution takes more than 2000 ms, you will receive an alert through the Slack channel.


Figure 3: Alert policy for long executions

To see which invocations caused the alert in Thundra, click on the name of the alert policy in the Slack alert message.


Figure 4: Alert message on Slack

In the event detail, you can see brief information about the resource usage of the invocations that caused the alert event. For deeper insight, click on “See all results” to view all invocations that caused the alert event in that time window.


Figure 5: Alert event details

Know Issues On Time with Slack

Many software development teams use Slack to communicate and integrate with a variety of other tools. Thundra’s Slack integration is an efficient way for you to be informed when incidents occur in your application, since it lets you integrate multiple workspaces and channels. Hundreds of Thundra users get notified about alerts through Slack when an issue occurs.

You can get started with Thundra for free and be informed of bottlenecks with a Slack notification, and also manage application behavior to keep your application healthy. Sign up directly from the Thundra Console or start your subscription from AWS Marketplace. If you upgrade to a paid plan, the cost will be added to your AWS bill.

*** This is a Security Bloggers Network syndicated blog from Thundra blog authored by Suna Tarıyan. Read the original post at: