@@ -239,14 +239,14 @@ export function createTransactionForOtelSpan(span: ReadableSpan): TransactionEve
239239
240240 const sampleRate = span . attributes [ SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE ] as number | undefined ;
241241
242- const attributes : SpanAttributes = dropUndefinedKeys ( {
242+ const attributes : SpanAttributes = {
243243 [ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] : source ,
244244 [ SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE ] : sampleRate ,
245245 [ SEMANTIC_ATTRIBUTE_SENTRY_OP ] : op ,
246246 [ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] : origin ,
247247 ...data ,
248248 ...removeSentryAttributes ( span . attributes ) ,
249- } ) ;
249+ } ;
250250
251251 const { links } = span ;
252252 const { traceId : trace_id , spanId : span_id } = span . spanContext ( ) ;
@@ -260,7 +260,7 @@ export function createTransactionForOtelSpan(span: ReadableSpan): TransactionEve
260260
261261 const status = mapStatus ( span ) ;
262262
263- const traceContext : TraceContext = dropUndefinedKeys ( {
263+ const traceContext : TraceContext = {
264264 parent_span_id,
265265 span_id,
266266 trace_id,
@@ -269,7 +269,7 @@ export function createTransactionForOtelSpan(span: ReadableSpan): TransactionEve
269269 op,
270270 status : getStatusMessage ( status ) , // As per protocol, span status is allowed to be undefined
271271 links : convertSpanLinksForEnvelope ( links ) ,
272- } ) ;
272+ } ;
273273
274274 const statusCode = attributes [ ATTR_HTTP_RESPONSE_STATUS_CODE ] ;
275275 const responseContext = typeof statusCode === 'number' ? { response : { status_code : statusCode } } : undefined ;
@@ -288,12 +288,10 @@ export function createTransactionForOtelSpan(span: ReadableSpan): TransactionEve
288288 transaction : description ,
289289 type : 'transaction' ,
290290 sdkProcessingMetadata : {
291- ...dropUndefinedKeys ( {
292- capturedSpanScope : capturedSpanScopes . scope ,
293- capturedSpanIsolationScope : capturedSpanScopes . isolationScope ,
294- sampleRate,
295- dynamicSamplingContext : getDynamicSamplingContextFromSpan ( span as unknown as Span ) ,
296- } ) ,
291+ capturedSpanScope : capturedSpanScopes . scope ,
292+ capturedSpanIsolationScope : capturedSpanScopes . isolationScope ,
293+ sampleRate,
294+ dynamicSamplingContext : getDynamicSamplingContextFromSpan ( span as unknown as Span ) ,
297295 } ,
298296 ...( source && {
299297 transaction_info : {
@@ -328,12 +326,12 @@ function createAndFinishSpanForOtelSpan(node: SpanNode, spans: SpanJSON[], sentS
328326 const { attributes, startTime, endTime, parentSpanId, links } = span ;
329327
330328 const { op, description, data, origin = 'manual' } = getSpanData ( span ) ;
331- const allData = dropUndefinedKeys ( {
329+ const allData = {
332330 [ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] : origin ,
333331 [ SEMANTIC_ATTRIBUTE_SENTRY_OP ] : op ,
334332 ...removeSentryAttributes ( attributes ) ,
335333 ...data ,
336- } ) ;
334+ } ;
337335
338336 const status = mapStatus ( span ) ;
339337
0 commit comments