Zero Overhead with Asynchronous Monitoring

Using Thundra, you can monitor and troubleshoot your serverless-centric system and get insights about the whole architecture. Thundra allows you to instrument your application with no code change. You can send these monitoring data to have these insights in two ways:

  • Synchronous monitoring

  • Asynchronous monitoring

To send data synchronously to Thundra, an HTTP call to Thundra's collector is made by your Lambda function before invocation ended. This method is quite easy but can be risky. HTTP call can be failed, there could be latency during this call and all of these issues can affect your Lambda function's performance. Also, making an HTPP call will add a duration overhead to execution time of your Lambda function. At this point, Asynchronous monitoring is provided by Thundra with zero overhead.

In async approach, trace, metric and log data is structured in JSON format to be written to CloudWatch. After that the data is gathered by Thundra's AWS integration working in your account. In this way, the observability data becomes visible in your Thundra console slower (depends on the when it appears at CloudWatch) than synchronous but you're getting rid of the communication overhead which can go up to 100ms when the observability data is too big.

Configuring asynchronous monitoring is quite easy. Just set the following environment variable to true in your Lambda function and make sure that you're using Thundra's AWS integration.

thundra_agent_lambda_report_cloudwatch_enable

‚Äč