UNPKG

1.84 kBTypeScriptView Raw
1type SpanStatusType =
2/** The operation completed successfully. */
3'ok'
4/** Deadline expired before operation could complete. */
5 | 'deadline_exceeded'
6/** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */
7 | 'unauthenticated'
8/** 403 Forbidden */
9 | 'permission_denied'
10/** 404 Not Found. Some requested entity (file or directory) was not found. */
11 | 'not_found'
12/** 429 Too Many Requests */
13 | 'resource_exhausted'
14/** Client specified an invalid argument. 4xx. */
15 | 'invalid_argument'
16/** 501 Not Implemented */
17 | 'unimplemented'
18/** 503 Service Unavailable */
19 | 'unavailable'
20/** Other/generic 5xx. */
21 | 'internal_error'
22/** Unknown. Any non-standard HTTP status code. */
23 | 'unknown_error'
24/** The operation was cancelled (typically by the user). */
25 | 'cancelled'
26/** Already exists (409) */
27 | 'already_exists'
28/** Operation was rejected because the system is not in a state required for the operation's */
29 | 'failed_precondition'
30/** The operation was aborted, typically due to a concurrency issue. */
31 | 'aborted'
32/** Operation was attempted past the valid range. */
33 | 'out_of_range'
34/** Unrecoverable data loss or corruption */
35 | 'data_loss';
36declare const SPAN_STATUS_UNSET = 0;
37declare const SPAN_STATUS_OK = 1;
38declare const SPAN_STATUS_ERROR = 2;
39/** The status code of a span. */
40export type SpanStatusCode = typeof SPAN_STATUS_UNSET | typeof SPAN_STATUS_OK | typeof SPAN_STATUS_ERROR;
41/**
42 * The status of a span.
43 * This can optionally contain a human-readable message.
44 */
45export interface SpanStatus {
46 /**
47 * The status code of this message.
48 * 0 = UNSET
49 * 1 = OK
50 * 2 = ERROR
51 */
52 code: SpanStatusCode;
53 /**
54 * A developer-facing error message.
55 */
56 message?: SpanStatusType | string;
57}
58export {};
59//# sourceMappingURL=spanStatus.d.ts.map
\No newline at end of file