惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
N
Netflix TechBlog - Medium
大猫的无限游戏
大猫的无限游戏
爱范儿
爱范儿
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Register - Security
The Register - Security
IT之家
IT之家
博客园_首页
Microsoft Security Blog
Microsoft Security Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
I
InfoQ
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Jina AI
Jina AI
Apple Machine Learning Research
Apple Machine Learning Research
M
MIT News - Artificial intelligence
博客园 - Franky
C
Check Point Blog
T
The Blog of Author Tim Ferriss
V
Visual Studio Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Tailwind CSS Blog
Recent Announcements
Recent Announcements
云风的 BLOG
云风的 BLOG
美团技术团队
The Cloudflare Blog
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MyScale Blog
MyScale Blog
The GitHub Blog
The GitHub Blog
D
DataBreaches.Net
Google DeepMind News
Google DeepMind News
V
V2EX
aimingoo的专栏
aimingoo的专栏
GbyAI
GbyAI
G
Google Developers Blog
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
U
Unit 42
罗磊的独立博客
量子位
MongoDB | Blog
MongoDB | Blog
Last Week in AI
Last Week in AI
Stack Overflow Blog
Stack Overflow Blog
小众软件
小众软件
D
Docker
人人都是产品经理
人人都是产品经理

Datadog | The Monitor blog

Introducing our open source AI-native SAST Instrument and monitor Boomi integration flows with OpenTelemetry and Datadog Not all index scans are equal: How we cut query latency by over 99% Platform engineering metrics: What to measure and what to ignore Integrate Recorded Future threat intelligence with Datadog Cloud SIEM CI/CD security: threat modeling using a MITRE-style threat matrix CI/CD security: How to secure your GitHub ecosystem Ingress NGINX is EOL: A practical guide for migrating to Kubernetes Gateway API Operating agentic AI with Amazon Bedrock AgentCore and Datadog LLM Observability: Lessons from NTT DATA Introducing the Datadog Code Security MCP Capture and analyze custom heatmaps in Session Replay Understand session replays faster with AI summaries and smart chapters Monitor ClickHouse query performance with Datadog Database Monitoring How we designed empathetic alert sounds for on-call engineers Search and act across Datadog to resolve issues faster with Bits Assistant Measure the business impact of every product change with Datadog Experiments Analyzing round trip query latency Configuring JavaScript caches for better performance Introducing Bits AI Dev Agent for Code Security Datadog achieves ISO 42001 certification for responsible AI Monitor Nutanix clusters, hosts, and VMs with Datadog Monitor Juniper Mist in Datadog A new Host Map for modern infrastructure Annotate traces to improve LLM quality with Datadog LLM Observability What’s new in Cloud SIEM: AI-powered investigations, enhanced threat intelligence, and scalable security operations Explore Kubernetes with native OpenTelemetry data Monitor Oracle Fusion Cloud Applications with Datadog Announcing the Datadog Terraform provider v4.0.0 Scaling Kubernetes workloads on custom metrics How to design cloud environments for AI-powered threat analysis Monitor Aruba Central in Datadog How we centralize and remediate risks with Datadog Case Management Accelerate incident response with Datadog and ServiceNow Monitor your application and network load balancer logs Understanding Karpenter architecture for Kubernetes autoscaling Tools for collecting metrics and logs from Karpenter Monitor Karpenter with Datadog What your product data is actually saying Key metrics for monitoring Karpenter Securing Datadog’s platform in the AI age: The role of observability data Four ways engineering teams use the Datadog MCP Server to power AI agents Approaching your observability migration with the right mindset Meet the new Bits AI SRE: Deeper reasoning, twice as fast Key learnings from the 2026 State of DevSecOps study Use plain English to query your multi-cloud infrastructure in Resource Catalog Simplifying troubleshooting across the user journey with Datadog Synthetic Monitoring Protect your OCI resources with Datadog Cloud Security This Month in Datadog - February 2026 Amazon EC2 security: How misconfigured and public AMIs expand your cloud attack surface Enable end-to-end visibility into your Java apps with a single command Measure and improve mobile app startup performance with Datadog RUM Evaluating our AI Guard application to improve quality and control cost Identify untested code across every level of your codebase Make use of guardrail metrics and stop babysitting your releases Monitor Versa Networks SD-WAN performance in Datadog Improve performance and reliability with APM Recommendations Remediate transitive vulnerabilities faster with Datadog Software Composition Analysis Generate audit-ready vulnerability and compliance reports with Datadog Sheets Monitor Fortinet FortiManager performance in Datadog Improve test coverage across codebases with Datadog Code Coverage Move fast, don’t break things: Consistent testing standards at scale Enrich logs with ServiceNow CMDB context before routing to any SIEM or logging tool Monitor Lustre with Datadog Make faster, better product decisions with Datadog Product Analytics Surface and remediate runtime posture issues with Workload Protection Findings Protect agentic AI applications with Datadog AI Guard How to optimize JavaScript code with CSS Trace Google Pub/Sub workloads in Cloud Run with Datadog Detect human names in logs with ML in Sensitive Data Scanner How we cut our NLQ agent debugging time from hours to minutes with LLM Observability Debug PostgreSQL query latency faster with EXPLAIN ANALYZE in Datadog Database Monitoring Datadog acquires Propolis Unify and correlate frontend and backend data with retention filters Scale compliance across global frameworks with Datadog Cloud Security Monitor Arista VeloCloud SD-WAN performance with Datadog Building reliable dashboard agents with Datadog LLM Observability Simplify log collection and aggregation for MSSPs with Datadog Observability Pipelines Mitigation for Node.js denial-of-service vulnerability affecting Datadog APM Automate flaky test fixes with the Bits AI Dev Agent and Test Optimization How we built an AI SRE agent that investigates like a team of engineers Datadog integrations 2025 recap: Observability for AI, security, and hybrid cloud Design effective executive dashboards with Datadog Implement dbt data quality checks with dbt-expectations Bring faster visibility into AWS Lambda functions with remote instrumentation Troubleshoot faster with the GitLab Source Code integration in Datadog How Cambia Health Solutions saved $30,000 monthly with Cloud Cost Management and the Datadog Resource Catalog Normalize any logs for Cloud SIEM with Datadog's OCSF processor Optimizing Datadog at scale: Cost-efficient observability at Zendesk Detect, diagnose, and resolve network issues easily with CNM Network Health Connect engineering errors to user impact in early-stage products Cilium configuration for Kubernetes operations at scale Designing feedback loops for progressive delivery Ship features faster and safer with Datadog Feature Flags Choosing the right OpenTelemetry Collector distribution Route your monitor alerts with Datadog monitor notification rules Automate Cloud SIEM investigations with Bits AI Security Analyst Cloud threat detection: How to identify risky activity across control and data planes Collecting Kafka performance metrics Monitoring Kafka with Datadog Monitoring Kafka performance metrics
Zero instrumentation serverless observability with AWS SAM and CDK integrations
2020-07-31 · via Datadog | The Monitor blog
Alex Cuoci

Alex Cuoci

Kai Xin Tai

Kai Xin Tai

As organizations build out their serverless footprint, they might find themselves managing hundreds or thousands of individual components (e.g., Amazon S3 buckets, Amazon DynamoDB tables, AWS SQS queues) for just a single application. At the same time, performance issues can crop up at any of these points, which means that having access to detailed observability data from your serverless functions is crucial for effective troubleshooting. But spinning up new services—and setting up monitoring for them—often involves writing boilerplate code for linking components, managing permissions, setting up logging, and other configuration tasks. Needless to say, reducing the friction in developing and monitoring applications is key for serverless to reach an ever broader developer base.

Datadog's Service Map visualizes the flow of data through your architecture

Deployment tools like the AWS Serverless Application Model (SAM) and AWS Cloud Development Kit (CDK) help developers take advantage of infrastructure as code and build applications in a clean and coherent way. To enable engineering teams to better grow with Datadog, we’ve built integrations with both of these tools to help you automatically collect metrics, traces, and logs from your Lambda functions, without any code instrumentation. By streamlining how you monitor your applications, Datadog reduces time to value and enables wider adoption of serverless across teams.

Bringing serverless observability closer to developers

As the ecosystem of serverless tools and services evolves, we are seeing a greater focus on improving the developer experience. AWS SAM, for instance, has become widely popular for allowing developers to easily build and deploy serverless applications. As an abstraction layer above AWS CloudFormation, AWS SAM allows you to specify all the components that make up an application (e.g., resources, functions, APIs) in a template—and use built-in command line tools to test, deploy, and manage your application. Similarly, AWS CDK lets you define application resources using familiar programming languages like JavaScript, .NET, and Python. Now, by referencing our CloudFormation macro in your AWS SAM or AWS CDK configuration, you can automatically wrap your Lambda functions to send observability data to Datadog, without altering your code.

Monitor your Lambda functions with performance metrics, traces, and logs, all in one place

With our macro, you can explicitly manage trace, log, and enhanced metric collection in one place using infrastructure as code. Datadog APM’s tracing libraries support the OpenTelemetry standard so you can start tracing without changing your existing instrumentation. The macro also manages the subscription of the Datadog Forwarder to AWS Lambda log groups, which means that you no longer need to manually configure triggers for log ingestion. Furthermore, our integration automatically configures the ingestion of enhanced Lambda metrics at a higher granularity than standard Amazon CloudWatch metrics, giving you even deeper insights into your workloads. By connecting your serverless traces, logs, and metrics, Datadog provides a context-rich picture of your application’s performance, allowing you to troubleshoot performance issues in real time.

Getting started with the macro

In this section, we’ll show you how to include the macro in your AWS SAM and AWS CDK configurations. This walkthrough assumes that you’ve cloned the Datadog CloudFormation macro repository and deployed the necessary macro resources, as detailed here.

AWS SAM

Start by setting up a new project in AWS SAM. In your project directory, you should see a template file (template.yml) that defines your application’s resources. Navigate to the Transform section and add DatadogCfnMacro under the default AWS::Serverless transform. Then, you can set configuration parameters, depending on the type of data you want to collect, as shown here:

Transform:

- AWS::Serverless-2016-10-31

- Name: DatadogCfnMacro

Parameters:

# Send custom metrics via logs with the help of Datadog Forwarder Lambda function (recommended). Defaults to false.

flushMetricsToLogs: true

# Enable tracing on Lambda function using dd-trace, Datadog's APM library. Requires Datadog Log Forwarder to be set up. Defaults to true.

enableDDTracing: true

# When set, the macro will try to subscribe the Lambda's CloudWatch log groups to the Forwarder with the given ARN.

forwarderArn: "arn:aws:lambda:<REGION>:<ACCOUNT-ID>:function:datadog-forwarder"

# The name of the CloudFormation stack being deployed. Only required when a forwarderArn is provided and Lambda functions are dynamically named (when the `FunctionName` property isn't provided for a Lambda).

stackName: !Ref "AWS::StackName"

# When set, the macro will add a `service` tag to all Lambda functions with the provided value.

service: "my-sam-app"

[...]

The Datadog Forwarder ships function logs, custom metrics, and traces to your Datadog account. You can configure this by adding the Forwarder ARN, as shown above.

If you’ve installed our AWS integration and provided Datadog with read-only access to Lambda, Datadog should already be collecting standard metrics from CloudWatch.

The Datadog Lambda Library works with the Datadog Forwarder to collect custom metrics, enhanced metrics, and distributed traces from your functions; our macro automatically configures the Lambda Library for Python and Node.js. Once you have the Lambda Library installed, you can enable flushMetricsToLogs, as shown in the example above, to send custom metrics to Datadog asynchronously via CloudWatch logs.

See the full list of configuration parameters here.

AWS CDK

If you’re using AWS CDK to deploy your application, add the Datadog CloudFormation macro to your Stack object constructor, as such:

from aws_cdk import core

class CdkStack(core.Stack):

def __init__(self, scope: core.Construct, id: str, **kwargs) -> None:

super().__init__(scope, id, **kwargs)

self.add_transform("DatadogCfnMacro")

mapping = core.CfnMapping(self, "Datadog",

mapping={

"Parameters": {

"enableDDTracing": true,

"flushMetricsToLogs": true,

"stackName": self.stackName,

"forwarderArn": "arn:aws:lambda:<REGION>:<ACCOUNT-ID>:function:datadog-forwarder",

"service": "my-cdk-app",

[...]

}

})

Save the file, deploy your application, and you’re good to go!

See across your entire serverless stack

Within minutes, you can visualize key AWS Lambda metrics—such as invocations, duration, cold starts, and memory usage—on our out-of-the-box Lambda enhanced metrics dashboard. You can customize it to include custom metrics that are unique to your business (e.g., site traffic, cart size, revenue) and configure alerts—which we will discuss in the next section—that automatically notify you of any issues that are degrading your user experience.

Out-of-the-box Lambda enhanced metrics dashboard

You can also navigate to the Serverless view, which provides a comprehensive view of all of the serverless functions running in your environment. From here, you can drill down to the functions from your AWS SAM applications with the lambda_createdby:SAM tag. Or, you can search and filter by any other combination of tags, such as AWS account, region, function name, and runtime.

Clicking on a function brings up its key performance metrics, distributed traces, and logs. For instance, a distributed trace can help you visualize the full lifespan of a request as it flows across Lambda functions, hosts, containers, and other infrastructure components. You can then correlate any trace with related logs and metrics for greater context around any errors or slowdowns you are seeing. Read more about the monitoring capabilities built into the Serverless view here.

Manage your alerts, all in one place

Now that you’re monitoring your Lambda functions with Datadog, it is a good idea to set up monitors to be automatically alerted of issues as soon as they arise. For instance, you might want to know each time you have a long-running function that is close to timing out so that you can look into optimizing your code or increasing the function’s timeout limit. Configuring monitors is simple and involves adding just a few extra lines to your AWS SAM template.

First, install the Datadog monitor CloudFormation resource (Datadog::Monitors::Monitor) using the AWS CLI, as detailed here. Then, define your monitor in the Resources section of your AWS SAM template (template.yml):

Resources:

[...]

MyTestMonitor:

Type: Datadog::Monitors::Monitor

Properties:

Type: metric alert

Query: 'avg(last_5m):max:aws.lambda.enhanced.duration{*} by {functionname} / (avg:aws.lambda.timeout{*} by {functionname} / 80 ) > 0.9'

Name: "Function duration is 90% of limit, increase timeout in AWS Console."

Multi: true

Options:

Thresholds:

Critical: 0.9

Warning: 0.7

DatadogCredentials:

ApiURL: https://api.datadoghq.com

ApiKey: <DATADOG_API_KEY>

ApplicationKey: <DATADOG_APP_KEY>

In this example, we’re alerting on the function duration enhanced metric (aws.lambda.enhanced.duration), which we enabled earlier with the Datadog CloudFormation macro. Since it’s configured as a multi-alert, you will be notified as a function’s execution time gets closer to its timeout limit—once after it crosses the warning threshold and again after it passes the critical threshold—so you can dig into the issue before it impacts your customers. Learn more about the Datadog monitor CloudFormation resource, including additional properties here.

Alerting on Lambda function duration

With our AWS SAM and CDK integrations, you can manage everything you need to get deep visibility into your serverless environment—from enhanced metrics and distributed traces to logs and monitors—all in one place. For many of our customers, this means adopting serverless across teams is more accessible, since key engineers spend little to no time instrumenting their applications, and more time solving customer problems.

Serverless monitoring, transformed

If you’re already using Datadog to monitor your serverless functions, applications, and cloud infrastructure, you can start using our CloudFormation macro with your AWS SAM and CDK applications today. Otherwise, sign up for a 14-day free trial.