Skip to content

Conversation

@Dogbu-cyber
Copy link

@Dogbu-cyber Dogbu-cyber commented Jan 26, 2026

…go): add README with migration guidance

What does this PR do?

This PR adds a README to the Go Lambda package in dd-trace-go and documents the
recommended use of Go tracer v2, including a link to the migration instructions
for upgrading from Go tracer v1 to v2.

Motivation

https://datadoghq.atlassian.net/browse/APMSVLS-315
Improve the migration experience for users moving from the deprecated
datadog-lambda-go repository by adding clear documentation and links to the
Go tracer v2 migration guide.

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • New code is free of linting errors. You can check this by running ./scripts/lint.sh locally.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

Unsure? Have a question? Request a review!

@github-actions github-actions bot added the apm:ecosystem contrib/* related feature requests or bugs label Jan 26, 2026
@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.09%. Comparing base (e334908) to head (40d911b).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

see 366 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pr-commenter
Copy link

pr-commenter bot commented Jan 26, 2026

Benchmarks

Benchmark execution time: 2026-01-26 22:06:27

Comparing candidate commit d36a736 in PR branch david.ogbureke/add-lambda-readme with baseline commit e334908 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 155 metrics, 9 unstable metrics.

Copy link
Contributor

@joeyzhao2018 joeyzhao2018 left a comment

Choose a reason for hiding this comment

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

LGTM

@Dogbu-cyber Dogbu-cyber marked this pull request as ready for review January 26, 2026 15:53
@Dogbu-cyber Dogbu-cyber requested a review from a team as a code owner January 26, 2026 15:53
Although Go tracer v1 remains available, Datadog recommends using v2, which is the
primary supported version. See the
[migration instructions](https://docs.datadoghq.com/tracing/trace_collection/custom_instrumentation/go/migration/#migration-instructions)
for guidance on upgrading from v1 to v2.
Copy link
Contributor

Choose a reason for hiding this comment

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

This only includes migrating the tracer. It does not include migrating any datadog-lambda-go code.

Copy link
Contributor

Choose a reason for hiding this comment

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

Updated.

Copy link
Contributor

Choose a reason for hiding this comment

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

@Dogbu-cyber can we change this paragraph to
Although Go tracer v1 remains available, Datadog recommends using v2, which is the
primary supported version.
If you are upgrading a Go AWS Lambda function that previously used the legacy
datadog-lambda-go repository, simply replace go get github.com/DataDog/datadog-lambda-go to go get github.com/DataDog/dd-trace-go/contrib/aws/datadog-lambda-go/v2 for installation and also replace any import references from github.com/DataDog/datadog-lambda-go to github.com/DataDog/dd-trace-go/contrib/aws/datadog-lambda-go/v2.
Please follow the installation instructions for more details.
For general migration from dd-trace-go v1 to v2, follow this migration instructions

Copy link
Author

Choose a reason for hiding this comment

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

@joeyzhao2018 I've made this change now.

@Dogbu-cyber Dogbu-cyber force-pushed the david.ogbureke/add-lambda-readme branch from 3834015 to d36a736 Compare January 26, 2026 21:49
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jan 26, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 40d911b | Docs | Datadog PR Page | Was this helpful? Give us feedback!

…go): replaced migration instructions with joey's suggestion
```go
go get github.com/DataDog/dd-trace-go/contrib/aws/datadog-lambda-go/v2
```
for installation and also replace any import references from github.com/DataDog/datadog-lambda-go to github.com/DataDog/dd-trace-go/contrib/aws/datadog-lambda-go/v2.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we give these as code samples as well? Hold their hand through it.

If you are upgrading a Go AWS Lambda function that previously used the legacy
datadog-lambda-go repository, simply replace

```go
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
```go
```bash

go get github.com/DataDog/datadog-lambda-go
```
with
```go
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
```go
```bash

```
for installation and also replace any import references from github.com/DataDog/datadog-lambda-go to github.com/DataDog/dd-trace-go/contrib/aws/datadog-lambda-go/v2.

Follow the [installation instructions](https://docs.datadoghq.com/serverless/aws_lambda/instrumentation/go/?tab=datadogui) for more details.
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is another step that they must take, then we should make this a numbered list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apm:ecosystem contrib/* related feature requests or bugs mergequeue-status: removed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants