Skip to content

captureAWSv3Client within subsegment #663

@petermyers

Description

@petermyers

I'm attempting to instrument a NodeJS Lambda using Xray. Throughout the invocation, I create a number of subsegments, and within each, I issue dynamodb queries. The calls to DDB display in the xray trace as a standalone subsegment nested under the root 'Invocation' segment, rather than under my own subsegment.

Is this supported? Do I need to pass in some options to the captureAWSv3Client call or to the client query call directly to indicate what the parent segment is? Since the prescribed best practice is to create the sdk client outside of the lambda handle function so it can be re-used across invocations, should I be calling captureAWSv3Client during each invocation?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions