MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / getNormalizedEvent

Function getNormalizedEvent

packages/deno/test/normalize.ts:7–19  ·  view source on GitHub ↗
(envelope: Envelope)

Source from the content-addressed store, hash-verified

5type EventOrSession = Event | Session;
6
7export function getNormalizedEvent(envelope: Envelope): Event | undefined {
8 let event: Event | undefined;
9
10 forEachEnvelopeItem(envelope, item => {
11 const [headers, body] = item;
12
13 if (headers.type === 'event') {
14 event = body as Event;
15 }
16 });
17
18 return normalize(event) as Event | undefined;
19}
20
21export function normalize(event: EventOrSession | undefined): EventOrSession | undefined {
22 if (event === undefined) {

Callers 1

getTestClientFunction · 0.90

Calls 2

forEachEnvelopeItemFunction · 0.90
normalizeFunction · 0.70

Tested by 1

getTestClientFunction · 0.72