File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
packages/overlay/src/integrations/sentry/data Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @spotlightjs/spotlight ' : patch
3+ ' @spotlightjs/electron ' : patch
4+ ' @spotlightjs/overlay ' : patch
5+ ' @spotlightjs/astro ' : patch
6+ ---
7+
8+ Fix some typing issues in sentryDataCache
Original file line number Diff line number Diff line change 1- import type { Envelope } from '@sentry/types ' ;
1+ import type { Envelope } from '@sentry/core ' ;
22import { CONTEXT_LINES_ENDPOINT } from '@spotlightjs/sidecar/constants' ;
33import { DEFAULT_SIDECAR_URL } from '~/constants' ;
44import type { RawEventContext } from '~/integrations/integration' ;
@@ -73,7 +73,7 @@ class SentryDataCache {
7373 const lastSeen = new Date ( header . sent_at as string ) . getTime ( ) ;
7474 let sdk : Sdk ;
7575
76- if ( header . sdk && header . sdk . name && header . sdk . version ) {
76+ if ( header . sdk ? .name && header . sdk . version ) {
7777 sdk = {
7878 name : header . sdk . name ,
7979 version : header . sdk . version ,
@@ -139,7 +139,7 @@ class SentryDataCache {
139139 const startTs = event . start_timestamp ? event . start_timestamp : new Date ( ) . getTime ( ) ;
140140 const trace = existingTrace ?? {
141141 ...traceCtx ,
142- spans : [ ] as Span [ ] ,
142+ spans : new Map ( ) ,
143143 transactions : [ ] as SentryTransactionEvent [ ] ,
144144 errors : 0 ,
145145 timestamp : event . timestamp ,
@@ -324,5 +324,5 @@ class SentryDataCache {
324324export default new SentryDataCache ( ) ;
325325
326326function isErrorEvent ( event : SentryEvent ) : event is SentryErrorEvent {
327- return event . type != 'transaction' ;
327+ return event . type !== 'transaction' ;
328328}
You can’t perform that action at this time.
0 commit comments