Label Invocations to Understand Your AWS Lambda Application Events

Use labels to understand how events are flowing through your serverless application.

Mx Kas Perch
IOpipe Blog

--

Label Invocations to Understand Your AWS Lambda Application Events

Sometimes you want to just tag an invocation — make it easily sortable and identifiable in the larger view of your serverless application. On that note, we’re excited to announce our newest feature: invocation labels. You can now identify invocations that you want to group together later in your IOpipe dashboard, simply by applying a label to the invocation in your code.

Let’s say you have an “email sender” Lambda function. Looking through a table of invocations, it’s impossible to discern which invocations sent emails successfully or not, — all invocations look the same in the table! By using labels, you can specify the status of the lambda sent to make it easy to scan invocations in the invocation table for data. To do this in your code, you add:

context.iopipe.label(‘send_failed’);

Now, at the invocation level, you’ll be able to see all labels applied to a particular invocation:

Labels on the function invocation page

Let’s take a look at labels in action.

We took the most excellent Wild Rydes serverless workshop AWS put together, and instrumented it with IOpipe for better observability. Wild Rydes is a simple web application that enables users to request unicorn rides from the Wild Rydes fleet. 🦄

At the function level, for any given timeframe, you’ll see what labels are present in a function, and their frequency — that is, what labels are present in the invocations for this function in your time window, and how often do they occur?

You’ll also see labels shown in the invocation table. You can filter the invocation table by a specific label, or pinpoint invocations that have specific combinations of labels by selecting multiple filters. New matching invocations will appear in realtime.

In the Wild Rydes example, we can use labels to see which unicorn was requested, if the user was a new rider, and if the ride was cancelled:

Labels in Wild Rydes — filtering here for cancelled rides for the unicorn ‘Rocinante’

You can also search by label with our advanced search tool to find specific labels across functions, allowing you another way to get a bigger picture of your entire serverless application.

Want to get started using labels? Check out our docs to see more details on using labels in your language of choice.

Try our two-week free trial and start observing your AWS Lambda functions today! Hop over to our Slack community and tell us what you think about labels 👋

--

--

Dev🥑. Robotics Author and Maker. Yells at robots occasionally.