1 | import type { Span, SpanStatus } from '@sentry/types';
|
2 | export declare const SPAN_STATUS_UNSET = 0;
|
3 | export declare const SPAN_STATUS_OK = 1;
|
4 | export 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 | */
|
11 | export 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 | */
|
16 | export declare function setHttpStatus(span: Span, httpStatus: number): void;
|
17 | //# sourceMappingURL=spanstatus.d.ts.map |
\ | No newline at end of file |