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

Function recordEnvelopeLoss

packages/core/src/transports/base.ts:60–69  ·  view source on GitHub ↗
(reason: EventDropReason)

Source from the content-addressed store, hash-verified

58
59 // Creates client report for each item in an envelope
60 const recordEnvelopeLoss = (reason: EventDropReason): void => {
61 // Don't record outcomes for client reports - we don't want to create a feedback loop if client reports themselves fail to send
62 if (envelopeContainsItemType(filteredEnvelope, ['client_report'])) {
63 DEBUG_BUILD && debug.warn(`Dropping client report. Will not send outcomes (reason: ${reason}).`);
64 return;
65 }
66 forEachEnvelopeItem(filteredEnvelope, (item, type) => {
67 options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type));
68 });
69 };
70
71 const requestTask = (): PromiseLike<TransportMakeRequestResponse> =>
72 makeRequest({ body: serializeEnvelope(filteredEnvelope) }).then(

Callers 2

requestTaskFunction · 0.85
sendFunction · 0.85

Calls 4

envelopeContainsItemTypeFunction · 0.90
forEachEnvelopeItemFunction · 0.90
warnMethod · 0.65

Tested by

no test coverage detected