Product News – Tracing Lambda Functions With AWS X-Ray

AWS X-Ray helps developers analyze and debug production, distributed applications such as those built using a microservices architecture.
– AWS X-Ray documentation

What does tracing really mean?

X-ray is a new service AWS offers which can collects traces from apps. But not just any apps. X-Ray covers the most sensitive types of infrastructure, your Serverless and distributed resources.

What does tracing actually mean? It gives you the ability to have insight into the whole process of execution your application goes through. By using traces it’s possible to quickly, without any additional effort, see what’s happening to your software.

Start tracing Lambda Functions with AWS X-Ray

In terms of AWS Lambda, X-Ray will be added automatically if you check the enable monitoring button in the Lambda settings view. Enabling X-Ray for a Lambda Function essentially means that all invocations of that particular function contains information about the active trace (unless sampling is available). For all the Lambda invocations the active trace will be added to the Lambda environment and automatically picked up by X-Ray.

Once you’ve enabled monitoring you will see a high level overview of your function invocations. Here’s is what it looks like on AWS.

Check this out now! As you can see here, X-Ray allows you to see the timing of Lambda containers as well! How cool is that!?

Note: The dwell time measure is the time spent waiting for the invocation.

We at Dashbird gone a step further, and removed all the nonsense from AWS, only showing you the essential info you need. We are dedicated to making everything much easier to understand.

Unleash the real power of AWS X-Ray

X-Ray shows its real power when you tie it to different AWS services or send them custom segments. Here’s an example, if you tie X-Ray to DynamoDB you can see how much time it takes to get a response from DynamoDB, including all requests, all errors, with metadata included! The added bonus for debugging is incredible. Now you see why we’re excited.

Check out this is function.

The function does the following things:

  • Pushes a random string to DynamoDB
  • Fetches that same random string from DynamoDB
  • Triggers a Lambda invoke on another Lambda
  • Triggers an SNS trigger to invoke a Lambda

As you can see we can track everything aside from the SNS trigger. Once again let’s see the two images side by side to compare the overview. To the left is the default AWS Console, while the right image is Dashbird.

From simple example from above you can see we try to clean up the traces and make the most important info clearly visible. This is our result.

Another really cool fact about this is that you can see all the resources touched by that Lambda Function when looking at the X-Ray logs.

Regarding the example from above we can actually see that it’s also touching the alpha-dev-push-receiver function. It allows you to navigate to sub requests made from that Lambda, giving you an incredibly easy and cool way to see what’s going on within the actual function invocation.

Why not start using X-Ray with Dashbird yourself?

With the addition of X-Ray, the family of monitoring services on AWS has reached an amazing growth. The tracing capabilities which make debugging so much easier are a welcome sight to Serverless Architectures. We have done our best to give you the ability to use X-Ray for tracing your Lambda Functions with Dashbird. Hope you liked reading this short product update. Feel free to let us know in the comments below if you have any questions or remarks!


We aim to improve Dashbird every day and user feedback is extremely important for that, so please let us know if you have any feedback about these improvements and new features! We would really appreciate it!

 

Read our blog

Top 6 AWS Lambda Monitoring Tools

Monitoring helps you identify any performance issues, and it can also send you alerts and notify you of anything you might need to know. This article will cover the top 6 AWS Lambda monitoring tools and explain how they work and are used.

8 Common Mistakes When Using AWS ECS to Manage Containers

In this article, we’ll discuss the potential pitfalls that we came across when configuring ECS task definitions. While considering this AWS-specific container management platform, we’ll also examine some general best practices for working with containers in production.

AWS Lambda Cost Optimization Strategies That Work

From caching Lambda responses to building smaller functions to choosing the right memory configs. In this article, we’re exploring six specific steps you can take to optimize your AWS Lambda costs.

More articles

Made by developers for developers

Dashbird was born out of our own need for an enhanced serverless debugging and monitoring tool, and we take pride in being developers.

What our customers say

Dashbird gives us a simple and easy to use tool to have peace of mind and know that all of our Serverless functions are running correctly. We are instantly aware now if there’s a problem. We love the fact that we have enough information in the Slack notification itself to take appropriate action immediately and know exactly where the issue occurred.

Thanks to Dashbird the time to discover the occurrence of an issue reduced from 2-4 hours to a matter of seconds or minutes. It also means that hundreds of dollars are saved every month.

Great onboarding: it takes just a couple of minutes to connect an AWS account to an organization in Dashbird. The UI is clean and gives a good overview of what is happening with the Lambdas and API Gateways in the account.

I mean, it is just extremely time-saving. It’s so efficient! I don’t think it’s an exaggeration or dramatic to say that Dashbird has been a lifesaver for us.

Dashbird provides an easier interface to monitor and debug problems with our Lambdas. Relevant logs are simple to find and view. Dashbird’s support has been good, and they take product suggestions with grace.

Great UI. Easy to navigate through CloudWatch logs. Simple setup.

Dashbird helped us refine the size of our Lambdas, resulting in significantly reduced costs. We have Dashbird alert us in seconds via email when any of our functions behaves abnormally. Their app immediately makes the cause and severity of errors obvious.