dd-trace-js
dd-trace-js copied to clipboard
fix(lambda): gate timeout spans and add missing clear
What does this PR do?
Gates AWS Lambda tracer instrumentation with the key lambda
.
Adds a clearTimeout
to non-promisified functions.
Motivation
Support ticket where customers was being timed out because they were using promises and returning the function as non-promisified, making it to successfully work with AWS Lambda, but not with our tracer instrumentation.
Plugin Checklist
- [x] Unit tests.
- [ ] TypeScript definitions.
- [ ] TypeScript tests.
- [ ] API documentation.
- [ ] CircleCI jobs/workflows.
- [ ] Plugin is exported.
Additional Notes
Disabled by DD_TRACE_DISABLED_INSTRUMENTATIONS=lambda,other,another
by following the current workaround for instrumentations.