UNPKG

723 BTypeScriptView Raw
1import type { Span, SpanStatus } from '@sentry/types';
2export declare const SPAN_STATUS_UNSET = 0;
3export declare const SPAN_STATUS_OK = 1;
4export declare const SPAN_STATUS_ERROR = 2;
5/**
6 * Converts a HTTP status code into a sentry status with a message.
7 *
8 * @param httpStatus The HTTP response status code.
9 * @returns The span status or unknown_error.
10 */
11export declare function getSpanStatusFromHttpCode(httpStatus: number): SpanStatus;
12/**
13 * Sets the Http status attributes on the current span based on the http code.
14 * Additionally, the span's status is updated, depending on the http code.
15 */
16export declare function setHttpStatus(span: Span, httpStatus: number): void;
17//# sourceMappingURL=spanstatus.d.ts.map
\No newline at end of file