Skip to content

[Serverless] Remove Lambda Extension#42994

Merged
dd-mergequeue[bot] merged 38 commits into
mainfrom
nicholas.hulston/remove-serverless-lambda-extension
Nov 17, 2025
Merged

[Serverless] Remove Lambda Extension#42994
dd-mergequeue[bot] merged 38 commits into
mainfrom
nicholas.hulston/remove-serverless-lambda-extension

Conversation

@nhulston

@nhulston nhulston commented Nov 12, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Remove the Lambda Extension, since the Go (datadog-agent) version has been fully deprecated in favor of the Rust version. See Lambda Extension releases for more info
  • Note: we still support serverless-init, which is used for Serverless containers like Google Cloud Run. So we must keep any references to serverless that are used by serverless-init
  • I tried to keep the changes as minimal as possible while still deleting all Lambda Extension-specific stuff. Future refactoring should be done for serverless-init, but that is out of scope for this PR

Motivation

Lambda Extension is deprecated, but lots of the logic was tightly coupled with serverless-init.

Public blog post

https://www.datadoghq.com/blog/engineering/datadog-lambda-extension-rust/

Internal links

https://datadoghq.atlassian.net/browse/SVLS-7955
https://dd.slack.com/archives/C0813DKJMS5/p1762894639463349

Describe how you validated your changes

Built and tested serverless-init in Cloud Run

Additional Notes

@github-actions github-actions Bot added the long review PR is complex, plan time to review it label Nov 12, 2025
defer traceAgent.Stop()
defer metricAgent.Stop()
assert.Subset(t, metricAgent.GetExtraTags(), allTags)
assert.Subset(t, logs.GetLogsTags(), allTags)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before these changes, this GetLogsTags() method was not used anywhere except for this test

@@ -1,201 +0,0 @@
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In AWS, pkg/serverless/apikey/... handles decryption of secrets for AWS KMS & SecretsManager. There is no Azure/GCP logic here, so it can be safely removed.

Comment on lines -48 to -53
func GetLogsTags() []string {
if logsScheduler != nil {
return logsScheduler.GetLogsTags()
}
return nil
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this func was not used anywhere other than in a unit test

@nhulston nhulston added the changelog/no-changelog No changelog entry needed label Nov 12, 2025
@nhulston nhulston added the qa/done QA done before merge and regressions are covered by tests label Nov 12, 2025
@nhulston
nhulston marked this pull request as ready for review November 12, 2025 21:42
@nhulston
nhulston requested review from a team as code owners November 12, 2025 21:42
Comment thread comp/logs/agent/config/config.go
@gyuheon0h

Copy link
Copy Markdown

lgtm

@aiuto aiuto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for agent-build

@gabedos gabedos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm removing lambda env detection

@dustmop dustmop left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for agent-configuration owned files

API_KEY: x

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your attention to detail is commendable.

Comment thread comp/logs/agent/config/config.go
@nhulston
nhulston requested a review from a team as a code owner November 14, 2025 14:42

@RomainMuller RomainMuller left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread pkg/metrics/metricsource.go
@nhulston

Copy link
Copy Markdown
Contributor Author

/merge

@dd-devflow-routing-codex

dd-devflow-routing-codex Bot commented Nov 17, 2025

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2025-11-17 18:30:38 UTC ℹ️ Start processing command /merge


2025-11-17 18:30:44 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 40m (p90).


2025-11-17 19:03:58 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue
dd-mergequeue Bot merged commit 8d0cdf4 into main Nov 17, 2025
381 checks passed
@dd-mergequeue
dd-mergequeue Bot deleted the nicholas.hulston/remove-serverless-lambda-extension branch November 17, 2025 19:03
@github-actions github-actions Bot added this to the 7.74.0 milestone Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog No changelog entry needed long review PR is complex, plan time to review it qa/done QA done before merge and regressions are covered by tests team/serverless-azure-gcp

Projects

None yet

Development

Successfully merging this pull request may close these issues.