aws / aws/aws-xray-sdk-node

Simplest way to add subsegment to a NodeJS Lambda.

Open
#440 8 comments 1 reaction 1 assignee Claimed by @NathanielRN View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.