I am trying to add a breadcrumb to a specific transaction, but when I do it, this breadcrumb appears in all of the following transactions. My main goal is to capture somewhere in the transaction, the response body of a successful request. The only way I managed so far is by adding a span to the main transaction running. Anything will help me.
Thanks a lot!!
I am using the Node sdk (@sentry/node) and the new solution I found is the following:
const transaction = res.__sentry_transaction;
if (transaction) transaction.setData(‘response’, JSON.parse(JSON.stringify(responseData)));
Now I manage to have the response body attached to the main request transaction running.
I do not know if anything will appear with this approach.