Simplest way to add subsegment to a NodeJS Lambda.
Open
question
- Dominant language
- JavaScript
- Stars
- 280
- Forks
- 157
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
Shouldn't this work?
```javascript
export const handler = async () => {
const segment = AWSXRay.getSegment();
const subSegment = segment.addNewSubsegment('ExternalCall');
// do stuff...
subSegment.close();
}
```
When debugging, I'm getting this: `Ignoring flush on subsegment 846f3500400178a9. Associated segment is marked as not sampled.`
And, most importantly, nothing gets registered or displayed on XRay.
Contributor guide
Assessment
This issue has not been assessed yet.