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

Function finishSpan

packages/nextjs/src/common/utils/responseEnd.ts:40–43  ·  view source on GitHub ↗
(span: Span, res: ServerResponse)

Source from the content-addressed store, hash-verified

38
39/** Finish the given response's span and set HTTP status data */
40export function finishSpan(span: Span, res: ServerResponse): void {
41 setHttpStatus(span, res.statusCode);
42 span.end();
43}
44
45/**
46 * Flushes pending Sentry events with a 2 second timeout and in a way that cannot create unhandled promise rejections.

Callers 3

wrapEndMethodFunction · 0.85
_patchNextMethod · 0.85
patchedMiddlewareMethod · 0.85

Calls 2

setHttpStatusFunction · 0.90
endMethod · 0.65

Tested by

no test coverage detected