Is it possible to capture outgoing HTTP request & response bodies inside breadcrumbs or spans using the Node SDK? #7347
-
Hi, import * as Sentry from '@sentry/node';
// NOTE: @sentry/tracing needs to be imported before @sentry/profiling-node
import '@sentry/tracing';
import { ProfilingIntegration } from '@sentry/profiling-node';
import { Integrations } from '@sentry/tracing';
Sentry.init({
beforeBreadcrumb(breadcrumb, hint) {
if (breadcrumb.category === 'http') {
// here is where I'm attempting to capture the bodies
}
return breadcrumb;
},
integrations: [
new ProfilingIntegration(),
new Sentry.Integrations.Http({ tracing: true }),
new Integrations.GraphQL(),
],
// ...rest of config (dsn, etc) omitted for brevity
}); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
We're looking to do this for the browser side in #7287 - perhaps we can do the same for Node as a opt-in. Important to note there is possible PII issues with this though. @mydea what to do you think? |
Beta Was this translation helpful? Give feedback.
We're looking to do this for the browser side in #7287 - perhaps we can do the same for Node as a opt-in.
Important to note there is possible PII issues with this though.
@mydea what to do you think?