Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update datadog-lambda to work with ddrace gem versions >= 1.0 #64

Closed
Folkman opened this issue Jun 9, 2022 · 4 comments
Closed

Update datadog-lambda to work with ddrace gem versions >= 1.0 #64

Folkman opened this issue Jun 9, 2022 · 4 comments
Assignees

Comments

@Folkman
Copy link

Folkman commented Jun 9, 2022

Expected Behavior

The latest datadog-lambda gem works with the latest ddtrace gem.

Actual Behavior

The latest datadog-lambda gem doesn't work with the latest ddtrace gem.

Steps to Reproduce the Problem

  1. Add the latest datadog-lambda and ddtrace gems.
  2. Add an initializer with the Datadog::Lambda.configure_apm block.
  3. Boot app.
  4. App fails due to datadog-lambda's dependency on SyncWriter which is not supported in ddtrace versions >= 1.0.

Screenshot from 2022-06-09 16-50-10
See: https://github.com/DataDog/dd-trace-rb/blob/master/docs/UpgradeGuide.md#from-0x-to-10

This dependency can be found here:

require 'ddtrace/sync_writer'

Specifications

  • Datadog Lambda Layer version: 1.14.0
  • ddtrace: 1.1.0
  • Ruby version: 3.0

Stacktrace

/usr/local/bundle/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': cannot load such file -- ddtrace/sync_writer (LoadError)
@agocs
Copy link
Collaborator

agocs commented Jun 10, 2022

Hi @Folkman , thanks for creating this issue. It looks like the Ruby Tracing team introduced some nontrivial breaking changes. I'll get upgrading datadog-lambda-rb scheduled.

In the meantime, your best bet is probably going to be:

  • Adding the arn:aws:lambda:[REGION]:464622532012:layer:Datadog-Ruby2-7:14 layer to your lambda function. This layer includes datadog-lambda-rb and an older version of dd-trace
  • Configuring your lambda function as shown in the instructions

@djpate
Copy link

djpate commented Oct 17, 2022

Thanks, @duncanista for fixing that. Do you know if we could cut a version for this?

@duncanista
Copy link
Contributor

@djpate v2.16.0 is out now! 💯

@Folkman
Copy link
Author

Folkman commented Oct 24, 2022

Much appreciated!

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

No branches or pull requests

5 participants