File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
packages/browser/src/profiling/session Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 33 type ProfileChunkEnvelope ,
44 createEnvelope ,
55 debug ,
6+ dsnToString ,
67 getRootSpan ,
78 getSdkMetadataForEnvelopeHeader ,
89 spanToJSON ,
@@ -237,16 +238,20 @@ export class BrowserTraceLifecycleProfiler {
237238 private _sendProfileChunk ( chunk : ProfileChunk ) : void {
238239 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
239240 const client = this . _client ! ;
241+
240242 const sdkInfo = getSdkMetadataForEnvelopeHeader ( client . getSdkMetadata ?.( ) ) ;
243+ const dsn = client . getDsn ( ) ;
244+ const tunnel = client . getOptions ( ) . tunnel ;
241245
242- const envelope : ProfileChunkEnvelope = createEnvelope (
246+ const envelope = createEnvelope < ProfileChunkEnvelope > (
243247 {
244248 event_id : uuid4 ( ) ,
245249 sent_at : new Date ( ) . toISOString ( ) ,
246250 ...( sdkInfo && { sdk : sdkInfo } ) ,
251+ ...( ! ! tunnel && dsn && { dsn : dsnToString ( dsn ) } ) ,
247252 } ,
248253 [ [ { type : 'profile_chunk' } , chunk ] ] ,
249- ) as ProfileChunkEnvelope ;
254+ ) ;
250255
251256 client . sendEnvelope ( envelope ) . then ( null , reason => {
252257 DEBUG_BUILD && debug . error ( 'Error while sending profile chunk envelope:' , reason ) ;
You can’t perform that action at this time.
0 commit comments