Repository navigation
Is there a way to add http request parameters and responses as attributes to span? #4856
Replies: 1 comment
|
Yes. For Node's new HttpInstrumentation({
requestHook: (span, request) => {
// Add only allowlisted, non-sensitive values here.
span.setAttribute('app.request.method', request.method ?? '');
},
responseHook: (span, response) => {
span.setAttribute('app.response.status_code', response.statusCode);
},
});You can also use |
Uh oh!
There was an error while loading. Please reload this page.
Is there a way to add http request parameters and responses as attributes to span?
this answer seems not to work anymore
All reactions