Check for Sentry span before appending header for WebSocket
Fix CODEOCEAN-FRONTEND-2X
This commit is contained in:
@ -11,10 +11,12 @@ CodeOceanEditorWebsocket = {
|
||||
// strip anchor if it is in the url
|
||||
sockURL.hash = '';
|
||||
|
||||
if (span) {
|
||||
sockURL.searchParams.set('HTTP_SENTRY_TRACE', span.toTraceparent());
|
||||
const dynamicContext = this.sentryTransaction.getDynamicSamplingContext();
|
||||
const baggage = SentryUtils.dynamicSamplingContextToSentryBaggageHeader(dynamicContext);
|
||||
sockURL.searchParams.set('HTTP_BAGGAGE', baggage);
|
||||
}
|
||||
|
||||
return sockURL.toString();
|
||||
},
|
||||
|
Reference in New Issue
Block a user