Skip to content

Is there a way to set the user for traces? #1224

Locked Answered by dreamorosi
kujtimiihoxha asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @kujtimiihoxha, thanks for opening the discussion & for using Powertools.

The Tracer utility uses the Segment and Subsegment objects from aws-xray-sdk-core and doesn't apply any changes to their prototype, so the functionalities are the same as the ones offered by the SDK.

The getSegment() method from Tracer can return either a Segment or a Subsegment. In AWS Lambda this means either the facade segment (the one created by AWS Lambda, the service, which is immutable), or any subsegment (which can be the one created by Powertools - i.e. # index.handler - or any other subsegment created by you).

As mentioned above, in Lambda, the main segment (of type Segment) is immutable, meaning that y…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by dreamorosi
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants