@@ -223,24 +223,27 @@ export class SentrySpan implements Span {
223223 * use `spanToJSON(span)` instead.
224224 */
225225 public getSpanJSON ( ) : SpanJSON {
226- return dropUndefinedKeys ( {
227- data : this . _attributes ,
228- description : this . _name ,
229- op : this . _attributes [ SEMANTIC_ATTRIBUTE_SENTRY_OP ] ,
230- parent_span_id : this . _parentSpanId ,
231- span_id : this . _spanId ,
232- start_timestamp : this . _startTime ,
233- status : getStatusMessage ( this . _status ) ,
234- timestamp : this . _endTime ,
235- trace_id : this . _traceId ,
236- origin : this . _attributes [ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] as SpanOrigin | undefined ,
237- profile_id : this . _attributes [ SEMANTIC_ATTRIBUTE_PROFILE_ID ] as string | undefined ,
238- exclusive_time : this . _attributes [ SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME ] as number | undefined ,
239- measurements : timedEventsToMeasurements ( this . _events ) ,
240- is_segment : ( this . _isStandaloneSpan && getRootSpan ( this ) === this ) || undefined ,
241- segment_id : this . _isStandaloneSpan ? getRootSpan ( this ) . spanContext ( ) . spanId : undefined ,
242- links : convertSpanLinksForEnvelope ( this . _links ) ,
243- } ) ;
226+ return dropUndefinedKeys (
227+ {
228+ data : this . _attributes ,
229+ description : this . _name ,
230+ op : this . _attributes [ SEMANTIC_ATTRIBUTE_SENTRY_OP ] ,
231+ parent_span_id : this . _parentSpanId ,
232+ span_id : this . _spanId ,
233+ start_timestamp : this . _startTime ,
234+ status : getStatusMessage ( this . _status ) ,
235+ timestamp : this . _endTime ,
236+ trace_id : this . _traceId ,
237+ origin : this . _attributes [ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] as SpanOrigin | undefined ,
238+ profile_id : this . _attributes [ SEMANTIC_ATTRIBUTE_PROFILE_ID ] as string | undefined ,
239+ exclusive_time : this . _attributes [ SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME ] as number | undefined ,
240+ measurements : timedEventsToMeasurements ( this . _events ) ,
241+ is_segment : ( this . _isStandaloneSpan && getRootSpan ( this ) === this ) || undefined ,
242+ segment_id : this . _isStandaloneSpan ? getRootSpan ( this ) . spanContext ( ) . spanId : undefined ,
243+ links : convertSpanLinksForEnvelope ( this . _links ) ,
244+ } ,
245+ 1 ,
246+ ) ;
244247 }
245248
246249 /** @inheritdoc */
0 commit comments