MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / makeRequest

Function makeRequest

packages/vercel-edge/src/transports/index.ts:81–100  ·  view source on GitHub ↗
(request: TransportRequest)

Source from the content-addressed store, hash-verified

79 */
80export function makeEdgeTransport(options: VercelEdgeTransportOptions): Transport {
81 function makeRequest(request: TransportRequest): PromiseLike<TransportMakeRequestResponse> {
82 const requestOptions: RequestInit = {
83 body: request.body,
84 method: 'POST',
85 headers: options.headers,
86 ...options.fetchOptions,
87 };
88
89 return suppressTracing(() => {
90 return fetch(options.url, requestOptions).then(response => {
91 return {
92 statusCode: response.status,
93 headers: {
94 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),
95 'retry-after': response.headers.get('Retry-After'),
96 },
97 };
98 });
99 });
100 }
101
102 return createTransport(options, makeRequest, new IsolatedPromiseBuffer(options.bufferSize));
103}

Callers

nothing calls this directly

Calls 4

suppressTracingFunction · 0.90
getMethod · 0.65
fetchFunction · 0.50
thenMethod · 0.45

Tested by

no test coverage detected