Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f575fb12ad
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -1,3 +1,4 @@ | |||
| import './src/tracer'; | |||
There was a problem hiding this comment.
Avoid requiring dd-trace in excluded functions
For the renderMerchPrintfiles Lambda, this new top-level import is executed via renderMerchPrintfiles.ts importing withSetup, but I checked that backend/serverless.yml excludes renderMerchPrintfiles from the Datadog plugin layers and backend/webpack.config.js externalizes dd-trace. That combination leaves this excluded function with a runtime require('dd-trace') but no bundled or layer-provided module, so cold starts will fail with Cannot find module 'dd-trace' before the handler runs. Limit this tracer import to functions that receive the Datadog layer, or ensure dd-trace is bundled/provided for the excluded function too.
Useful? React with 👍 / 👎.
Putting the tracer import in withSetup caused functions excluded from the Datadog plugin (like renderMerchPrintfiles) to fail with "Cannot find module 'dd-trace'" on cold start. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
No description provided.