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
Hi we are using the aws-otel-nodejs layer for auto instrumentation of our nodejs lambda app and traces are sent to aws XRay. We would like to add custom attributes to the traces. Is that possible while continuing to use the layer?
More specifically, will the following code work?
const { trace } = require("@opentelemetry/api");
function handleUser(user) {
let activeSpan = trace.getActiveSpan();
activeSpan.setAttribute("user.id", user.getId());
}
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.
-
Hi we are using the aws-otel-nodejs layer for auto instrumentation of our nodejs lambda app and traces are sent to aws XRay. We would like to add custom attributes to the traces. Is that possible while continuing to use the layer?
More specifically, will the following code work?
Beta Was this translation helpful? Give feedback.
All reactions