Announcing Support for Monitoring AWS Lambda Function URLs With Datadog | Datadog

Announcing support for monitoring AWS Lambda Function URLs with Datadog

Author Jordan Obey
Author Alex Cuoci

Published: April 6, 2022

AWS Lambda Function URLs make it even easier to create AWS Lambda functions that can be accessed and triggered by using HTTP/S requests, which is key for building serverless applications that are connected to and invoked from the web. Starting today, you can generate a URL in one click that points to a specified Lambda function. Then, any HTTP/S request that a Function URL receives will trigger the Lambda function it’s assigned to. Visibility into Function URLs is vital for monitoring your serverless applications since Function URL latency and 500 errors returned from Function URLs impact your customers.

Datadog is proud to partner with AWS for the release of Function URLs by providing end-to-end visibility into requests to functions triggered by URLs, as well as into key Function URL metrics. In this post, we’ll look at how Function URLs work and how you can use Datadog to get deep insight into their health and performance.

Simplify your AWS Lambda–powered services

Function URLs are useful for when you want to quickly connect your Lambda functions to the web. Whereas API Gateway provides tooling for managing RESTful Lambda resources and more complex APIs, Function URLs allow you to simplify operations and deliver value to your customers more quickly. If you later decide you want to use API Gateway’s API management features—such as API versioning and custom authorization—you can easily migrate from Function URLs to API Gateway because their request payloads use the same format and contain matching fields.

Having real-time visibility into your Function URLs is critical because any duration between receiving an HTTP/S request and the resulting Lambda invocation adds to customer-facing latency. You need to be able to measure, alert on, and set SLOs by using telemetry closest to the customer experience.

Alert on Function URL duration to quickly spot and begin mitigating user-facing latency

Additionally, while Function URLs are assigned to one Lambda function, each Lambda function may have multiple associated Function URLs. This means that if a Lambda function experiences an issue, you need to be able to identify which URLs were impacted.

Next, we’ll look at how Datadog:

  • supports instrumenting Function URLs so you can see end-to-end requests of functions triggered by URLs in real time
  • collects and visualizes Function URL metrics so you can get visibility into the performance of your URLs

Investigate Function URL spans in Lambda Function traces

After instrumenting your Lambda functions, Datadog APM automatically includes Function URL spans in your request traces without any further configuration. This feature enables you to see at a glance which URLs—and therefore which end users—are affected by any issues that may occur. For example, you can see if there’s a significant delay between when a specific Function URL receives an HTTP/S request and when its associated Lambda function begins to execute. This delay could indicate that a cold start is increasing latency and that you should consider enabling provisioned concurrency.

Function URL spans are available in Lambda traces to help you identify which URLs are affected by any function issues that may occur

Function URL spans also visualize errors so that you can quickly see, for instance, if your customers are running into 5xx errors, enabling you to immediately start troubleshooting.

Monitor key Function URL metrics

Datadog collects and visualizes Function URL metrics, such as latency and counts of total requests and errors. These metrics enable you to monitor your Function URLs alongside telemetry from your Lambda functions and other AWS services you may be collecting through our AWS integration, giving you a complete view of your serverless environment. For example, you can add Function URL metrics to the AWS Lambda dashboard to easily correlate Function URL errors to Lambda function performance.

Function URL metrics are tagged by Lambda function to help identify impacted functions

Datadog automatically tags your Function URL metrics by the AWS Lambda function they trigger, so if any Function URL experiences an issue, you can see which function may be impacted. In the screenshot above, for instance, a time series graph shows counts of Function URL 4xx errors grouped by Lambda function.

Start monitoring Function URLs today

Datadog enables you to monitor Function URL performance alongside telemetry from other serverless AWS services, such as Lambda and API Gateway, in addition to over 600 other technologies. To include Function URL data in your Lambda traces, make sure that you’re using the latest version of Datadog’s Lambda libraries. If you aren’t already using Datadog, sign up today for a 14-day .