You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I scrolled through https://aws-otel.github.io/docs/getting-started/x-ray
I have a feeling that what I am thinking is possible and my first attempt of course didn't work but you might understand what I want to achieve.
I added the aws-otel-nodejs layer to my lambda function and auto instrumentation worked, traces show up in the x ray console and with some otel metadata for the subsegments. I would like to add custom annotation/metadata to the segments within the function.
My attempt was to use aws-xray-sdk-core, get the existing segment and add metadata to it.. Maybe the problem is I should be using Opentelemetry sdk instead? What's the correct way to achieve this?
var document = AWSXRay.getSegment();
for (const header in event.headers){
document.addMetadata(header,event.headers[header],"headers");
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I scrolled through https://aws-otel.github.io/docs/getting-started/x-ray
I have a feeling that what I am thinking is possible and my first attempt of course didn't work but you might understand what I want to achieve.
I added the aws-otel-nodejs layer to my lambda function and auto instrumentation worked, traces show up in the x ray console and with some otel metadata for the subsegments. I would like to add custom annotation/metadata to the segments within the function.
My attempt was to use
aws-xray-sdk-core
, get the existing segment and add metadata to it.. Maybe the problem is I should be using Opentelemetry sdk instead? What's the correct way to achieve this?Beta Was this translation helpful? Give feedback.
All reactions