Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/core/src/integrations/http/double-wrap-warning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ const isOtelWrapped = (fn: Function & { __unwrap?: Function }): fn is Function &

// exported for tess
export const warning =
'Double-wrapped http.client detected. Either disable spans in Sentry.httpIntegration, or disable the OpenTelemetry HTTP instrumentation.';
'Double-wrapped http.client detected. Either disable spans in Sentry.httpIntegration, or disable the OpenTelemetry HTTP instrumentation. See: https://docs.sentry.io/platforms/javascript/guides/express/opentelemetry/custom-setup/#custom-http-instrumentation';
Comment thread
isaacs marked this conversation as resolved.

let didDoubleWrapWarning = false;
// no-op in non-debug builds
export const doubleWrapWarning = DEBUG_BUILD
? (http: HttpModuleExport) => {
if (!didDoubleWrapWarning) {
if (isOtelWrapped(http.request) || isOtelWrapped(http.get)) {
// TODO: add link to documentation
didDoubleWrapWarning = true;
debug.warn(warning);
}
Expand Down
Loading