File tree 2 files changed +17
-6
lines changed
packages/overlay/src/integrations/sentry/components/explore/envelopes
2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @spotlightjs/spotlight ' : minor
3
+ ' @spotlightjs/electron ' : minor
4
+ ' @spotlightjs/overlay ' : minor
5
+ ' @spotlightjs/astro ' : minor
6
+ ---
7
+
8
+ Make event id a link to raw envelope on envelope details page
Original file line number Diff line number Diff line change 1
- import type { Envelope } from '@sentry/types ' ;
1
+ import type { Envelope } from '@sentry/core ' ;
2
2
import { useState } from 'react' ;
3
3
import type { RawEventContext } from '~/integrations/integration' ;
4
4
import SidePanel , { SidePanelHeader } from '~/ui/SidePanel' ;
@@ -9,16 +9,19 @@ export default function EnvelopeDetails({ data }: { data: { envelope: Envelope;
9
9
const { envelope, rawEnvelope } = data ;
10
10
const header = envelope [ 0 ] ;
11
11
const items = envelope [ 1 ] ;
12
+ const downloadUrl = URL . createObjectURL ( new Blob ( [ rawEnvelope . data ] , { type : rawEnvelope . contentType } ) ) ;
13
+ const downloadName = `${ header . event_id } -${ rawEnvelope . contentType } .bin` ;
12
14
return (
13
15
< SidePanel backto = "/explore/envelopes" >
14
16
< SidePanelHeader
15
17
title = "Envelope Details"
16
18
subtitle = {
17
- header . event_id ? (
18
- < >
19
- Event Id < span className = "text-primary-500" > —</ span > { header . event_id }
20
- </ >
21
- ) : undefined
19
+ < >
20
+ Event Id < span className = "text-primary-500" > —</ span > { ' ' }
21
+ < a href = { downloadUrl } download = { downloadName } >
22
+ { String ( header . event_id ) }
23
+ </ a >
24
+ </ >
22
25
}
23
26
backto = "/explore/envelopes"
24
27
/>
You can’t perform that action at this time.
0 commit comments