Skip to content

Conversation

@lym953
Copy link
Contributor

@lym953 lym953 commented Nov 13, 2025

Overview

Support sending trace stats to Datadog when the Lambda is in a VPC with a proxy.

Testing

Steps

  1. Set up a Lambda in a VPC with a proxy. See Using an agent proxy (internal)
  2. Build an extension layer and install it on the Lambda
  3. Invoke the Lambda. After 20 seconds, invoke it again. This should force trace stats for the first invocation to be flushed.

Result

Before: stats flush failed with error:

Error sending stats: Failed to send trace stats: client error (Connect)
image image

After: stats flush was successful.
image
image

Dependency

DataDog/libdatadog#1345

Notes

GitHub issue: #860
Jira: https://datadoghq.atlassian.net/browse/SLES-2499

@lym953 lym953 changed the base branch from main to yiming.luo/upgrade-libdd November 13, 2025 19:49
@lym953 lym953 changed the title Yiming.luo/trace stats proxy 2 [SLES-2499] feat: Support sending trace stats via http proxy Nov 13, 2025
@lym953 lym953 marked this pull request as ready for review November 13, 2025 21:20
@lym953 lym953 requested a review from a team as a code owner November 13, 2025 21:20
shreyamalpani and others added 7 commits November 17, 2025 09:42
## Overview

Collect CPU metric offsets on receiving the PlatformStart instead of the
Invoke event to avoid accounting for additional idle time while
calculating utilization. Also, guard uptime and idle time to be
non-negative for edge-cases.

Maintains collecting network offsets on the Invoke event to match with
Lambda Insights.

## Testing 

Tested with self-monitoring

<img width="2620" height="904" alt="image"
src="https://github.com/user-attachments/assets/6960e9f3-2f35-40d2-9c49-3560e8ebd295"
/>
https://datadoghq.atlassian.net/browse/SVLS-8005

## Overview
Proxy flush doesn't log the URL in case of error. Need to add it to
better investigate the issue.

## Testing 
n/a
@lym953 lym953 force-pushed the yiming.luo/trace-stats-proxy-2 branch from 4bc88fd to 68dafbf Compare November 17, 2025 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants