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

Function setHttpStatus

packages/core/src/tracing/spanstatus.ts:61–68  ·  view source on GitHub ↗
(span: Span, httpStatus: number)

Source from the content-addressed store, hash-verified

59 * Additionally, the span's status is updated, depending on the http code.
60 */
61export function setHttpStatus(span: Span, httpStatus: number): void {
62 span.setAttribute('http.response.status_code', httpStatus);
63
64 const spanStatus = getSpanStatusFromHttpCode(httpStatus);
65 if (spanStatus.message !== 'unknown_error') {
66 span.setStatus(spanStatus);
67 }
68}

Callers 15

applyResponseStatusFunction · 0.90
wrapRequestHandlerFunction · 0.90
_wrapHttpFunctionFunction · 0.90
withElysiaFunction · 0.90
endSpanFunction · 0.90
applyFunction · 0.90
finishSpanFunction · 0.90
applyFunction · 0.90
wrapApiHandlerWithSentryFunction · 0.90
resolveWithSentryFunction · 0.90
wrapDenoRequestHandlerFunction · 0.90

Calls 3

setAttributeMethod · 0.65
setStatusMethod · 0.65

Tested by

no test coverage detected