@sentry/types 7.105.0 → 8.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/types/attachment.d.ts +22 -1
- package/types/attachment.d.ts.map +1 -1
- package/types/breadcrumb.d.ts +2 -2
- package/types/breadcrumb.d.ts.map +1 -1
- package/types/client.d.ts +52 -64
- package/types/client.d.ts.map +1 -1
- package/types/datacategory.d.ts +1 -1
- package/types/datacategory.d.ts.map +1 -1
- package/types/envelope.d.ts +2 -13
- package/types/envelope.d.ts.map +1 -1
- package/types/event.d.ts +4 -14
- package/types/event.d.ts.map +1 -1
- package/types/hub.d.ts +3 -34
- package/types/hub.d.ts.map +1 -1
- package/types/index.d.ts +4 -5
- package/types/index.d.ts.map +1 -1
- package/types/integration.d.ts +2 -6
- package/types/integration.d.ts.map +1 -1
- package/types/options.d.ts +22 -22
- package/types/options.d.ts.map +1 -1
- package/types/scope.d.ts +10 -6
- package/types/scope.d.ts.map +1 -1
- package/types/severity.d.ts +0 -18
- package/types/severity.d.ts.map +1 -1
- package/types/span.d.ts +18 -201
- package/types/span.d.ts.map +1 -1
- package/types/spanStatus.d.ts +59 -0
- package/types/spanStatus.d.ts.map +1 -0
- package/types/startSpanOptions.d.ts +0 -14
- package/types/startSpanOptions.d.ts.map +1 -1
- package/types/transaction.d.ts +20 -40
- package/types/transaction.d.ts.map +1 -1
- package/types/transport.d.ts +1 -3
- package/types/transport.d.ts.map +1 -1
- package/types/user.d.ts +0 -4
- package/types/user.d.ts.map +1 -1
- package/types-ts3.8/attachment.d.ts +22 -1
- package/types-ts3.8/breadcrumb.d.ts +2 -2
- package/types-ts3.8/client.d.ts +52 -64
- package/types-ts3.8/datacategory.d.ts +1 -1
- package/types-ts3.8/envelope.d.ts +2 -13
- package/types-ts3.8/event.d.ts +4 -14
- package/types-ts3.8/hub.d.ts +3 -34
- package/types-ts3.8/index.d.ts +4 -5
- package/types-ts3.8/integration.d.ts +2 -6
- package/types-ts3.8/options.d.ts +22 -22
- package/types-ts3.8/scope.d.ts +10 -6
- package/types-ts3.8/severity.d.ts +0 -18
- package/types-ts3.8/span.d.ts +18 -201
- package/types-ts3.8/spanStatus.d.ts +59 -0
- package/types-ts3.8/startSpanOptions.d.ts +0 -14
- package/types-ts3.8/transaction.d.ts +20 -40
- package/types-ts3.8/transport.d.ts +1 -3
- package/types-ts3.8/user.d.ts +0 -4
- package/types/instrumenter.d.ts +0 -2
- package/types/instrumenter.d.ts.map +0 -1
- package/types/textencoder.d.ts +0 -15
- package/types/textencoder.d.ts.map +0 -1
- package/types-ts3.8/instrumenter.d.ts +0 -2
- package/types-ts3.8/textencoder.d.ts +0 -15
package/types/index.d.ts
CHANGED
|
@@ -6,9 +6,9 @@ export type { Context, Contexts, DeviceContext, OsContext, AppContext, CultureCo
|
|
|
6
6
|
export type { DataCategory } from './datacategory';
|
|
7
7
|
export type { DsnComponents, DsnLike, DsnProtocol } from './dsn';
|
|
8
8
|
export type { DebugImage, DebugMeta } from './debugMeta';
|
|
9
|
-
export type { AttachmentItem, BaseEnvelopeHeaders, BaseEnvelopeItemHeaders, ClientReportEnvelope, ClientReportItem, DynamicSamplingContext, Envelope, EnvelopeItemType, EnvelopeItem, EventEnvelope, EventEnvelopeHeaders, EventItem, ReplayEnvelope, FeedbackItem, SessionEnvelope, SessionItem, UserFeedbackItem, CheckInItem, CheckInEnvelope, StatsdItem, StatsdEnvelope, ProfileItem,
|
|
9
|
+
export type { AttachmentItem, BaseEnvelopeHeaders, BaseEnvelopeItemHeaders, ClientReportEnvelope, ClientReportItem, DynamicSamplingContext, Envelope, EnvelopeItemType, EnvelopeItem, EventEnvelope, EventEnvelopeHeaders, EventItem, ReplayEnvelope, FeedbackItem, SessionEnvelope, SessionItem, UserFeedbackItem, CheckInItem, CheckInEnvelope, StatsdItem, StatsdEnvelope, ProfileItem, } from './envelope';
|
|
10
10
|
export type { ExtendedError } from './error';
|
|
11
|
-
export type { Event, EventHint, EventType, ErrorEvent, TransactionEvent
|
|
11
|
+
export type { Event, EventHint, EventType, ErrorEvent, TransactionEvent } from './event';
|
|
12
12
|
export type { EventProcessor } from './eventprocessor';
|
|
13
13
|
export type { Exception } from './exception';
|
|
14
14
|
export type { Extra, Extras } from './extra';
|
|
@@ -28,11 +28,11 @@ export type { CaptureContext, Scope, ScopeContext, ScopeData } from './scope';
|
|
|
28
28
|
export type { SdkInfo } from './sdkinfo';
|
|
29
29
|
export type { SdkMetadata } from './sdkmetadata';
|
|
30
30
|
export type { SessionAggregates, AggregationCounts, Session, SessionContext, SessionStatus, RequestSession, RequestSessionStatus, SessionFlusherLike, SerializedSession, } from './session';
|
|
31
|
-
export type {
|
|
31
|
+
export type { SeverityLevel } from './severity';
|
|
32
32
|
export type { Span, SpanContext, SpanOrigin, SpanAttributeValue, SpanAttributes, SpanTimeInput, SpanJSON, SpanContextData, TraceFlag, MetricSummary, } from './span';
|
|
33
|
+
export type { SpanStatus } from './spanStatus';
|
|
33
34
|
export type { StackFrame } from './stackframe';
|
|
34
35
|
export type { Stacktrace, StackParser, StackLineParser, StackLineParserFn } from './stacktrace';
|
|
35
|
-
export type { TextEncoderInternal } from './textencoder';
|
|
36
36
|
export type { PropagationContext, TracePropagationTargets } from './tracing';
|
|
37
37
|
export type { StartSpanOptions } from './startSpanOptions';
|
|
38
38
|
export type { CustomSamplingContext, SamplingContext, TraceparentData, Transaction, TransactionContext, TransactionMetadata, TransactionSource, } from './transaction';
|
|
@@ -42,7 +42,6 @@ export type { Transport, TransportRequest, TransportMakeRequestResponse, Interna
|
|
|
42
42
|
export type { User, UserFeedback } from './user';
|
|
43
43
|
export type { WebFetchHeaders, WebFetchRequest } from './webfetchapi';
|
|
44
44
|
export type { WrappedFunction } from './wrappedfunction';
|
|
45
|
-
export type { Instrumenter } from './instrumenter';
|
|
46
45
|
export type { HandlerDataFetch, HandlerDataXhr, HandlerDataDom, HandlerDataConsole, HandlerDataHistory, HandlerDataError, HandlerDataUnhandledRejection, ConsoleLevel, SentryXhrData, SentryWrappedXMLHttpRequest, } from './instrument';
|
|
47
46
|
export type { BrowserClientReplayOptions, BrowserClientProfilingOptions } from './browseroptions';
|
|
48
47
|
export type { CheckIn, MonitorConfig, FinishedCheckIn, InProgressCheckIn, SerializedCheckIn } from './checkin';
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,YAAY,EACV,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC7E,YAAY,EACV,OAAO,EACP,QAAQ,EACR,aAAa,EACb,SAAS,EACT,UAAU,EACV,cAAc,EACd,YAAY,EACZ,oBAAoB,GACrB,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACzD,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,oBAAoB,EACpB,SAAS,EACT,cAAc,EACd,YAAY,EACZ,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,UAAU,EACV,cAAc,EACd,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","s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,EAAE,MAAM,kBAAkB,CAAC;AAClG,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC/G,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,GACf,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/types/integration.d.ts
CHANGED
|
@@ -20,10 +20,8 @@ export interface IntegrationFnResult {
|
|
|
20
20
|
/**
|
|
21
21
|
* This hook is only called once, even if multiple clients are created.
|
|
22
22
|
* It does not receives any arguments, and should only use for e.g. global monkey patching and similar things.
|
|
23
|
-
*
|
|
24
|
-
* NOTE: In v8, this will become optional.
|
|
25
23
|
*/
|
|
26
|
-
setupOnce(): void;
|
|
24
|
+
setupOnce?(): void;
|
|
27
25
|
/**
|
|
28
26
|
* Set up an integration for the given client.
|
|
29
27
|
* Receives the client as argument.
|
|
@@ -63,10 +61,8 @@ export interface Integration {
|
|
|
63
61
|
/**
|
|
64
62
|
* This hook is only called once, even if multiple clients are created.
|
|
65
63
|
* It does not receives any arguments, and should only use for e.g. global monkey patching and similar things.
|
|
66
|
-
*
|
|
67
|
-
* NOTE: In v8, this will become optional, and not receive any arguments anymore.
|
|
68
64
|
*/
|
|
69
|
-
setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
|
|
65
|
+
setupOnce?(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
|
|
70
66
|
/**
|
|
71
67
|
* Set up an integration for the given client.
|
|
72
68
|
* Receives the client as argument.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../src/integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAA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E,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAElF;;;;OAIG;IACH,YAAY,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;CACxG;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,mBAAmB,CAAC;AAEpE,4BAA4B;AAC5B,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,SAAS,CAAC,CAAC,uBAAuB,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,GAAG,IAAI,CAAC;IAExG;;;;;;;OAOG;IACH,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;;OAGG;IACH,aAAa,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC;;OAEG;IACH,eAAe,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAElF;;;;OAIG;IACH,YAAY,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;CACxG"}
|
package/types/options.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Breadcrumb, BreadcrumbHint } from './breadcrumb';
|
|
2
2
|
import type { ErrorEvent, Event, EventHint, TransactionEvent } from './event';
|
|
3
|
-
import type { Instrumenter } from './instrumenter';
|
|
4
3
|
import type { Integration } from './integration';
|
|
5
4
|
import type { CaptureContext } from './scope';
|
|
6
5
|
import type { SdkMetadata } from './sdkmetadata';
|
|
@@ -49,14 +48,6 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
|
|
|
49
48
|
* List of integrations that should be installed after SDK was initialized.
|
|
50
49
|
*/
|
|
51
50
|
integrations: Integration[];
|
|
52
|
-
/**
|
|
53
|
-
* The instrumenter to use. Defaults to `sentry`.
|
|
54
|
-
* When not set to `sentry`, auto-instrumentation inside of Sentry will be disabled,
|
|
55
|
-
* in favor of using external auto instrumentation.
|
|
56
|
-
*
|
|
57
|
-
* NOTE: Any option except for `sentry` is highly experimental and subject to change!
|
|
58
|
-
*/
|
|
59
|
-
instrumenter?: Instrumenter;
|
|
60
51
|
/**
|
|
61
52
|
* A function that takes transport options and returns the Transport object which is used to send events to Sentry.
|
|
62
53
|
* The function is invoked internally when the client is initialized.
|
|
@@ -191,22 +182,31 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
|
|
|
191
182
|
*/
|
|
192
183
|
denyUrls?: Array<string | RegExp>;
|
|
193
184
|
/**
|
|
194
|
-
* List of strings/
|
|
195
|
-
*
|
|
185
|
+
* List of strings and/or Regular Expressions used to determine which outgoing requests will have `sentry-trace` and `baggage`
|
|
186
|
+
* headers attached.
|
|
187
|
+
*
|
|
188
|
+
* **Default:** If this option is not provided, tracing headers will be attached to all outgoing requests.
|
|
189
|
+
* If you are using a browser SDK, by default, tracing headers will only be attached to outgoing requests to the same origin.
|
|
190
|
+
*
|
|
191
|
+
* **Disclaimer:** Carelessly setting this option in browser environments may result into CORS errors!
|
|
192
|
+
* Only attach tracing headers to requests to the same origin, or to requests to services you can control CORS headers of.
|
|
193
|
+
* Cross-origin requests, meaning requests to a different domain, for example a request to `https://api.example.com/` while you're on `https://example.com/`, take special care.
|
|
194
|
+
* If you are attaching headers to cross-origin requests, make sure the backend handling the request returns a `"Access-Control-Allow-Headers: sentry-trace, baggage"` header to ensure your requests aren't blocked.
|
|
196
195
|
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
* array, and only attach tracing headers if a match was found.
|
|
196
|
+
* If you provide a `tracePropagationTargets` array, the entries you provide will be matched against the entire URL of the outgoing request.
|
|
197
|
+
* If you are using a browser SDK, the entries will also be matched against the pathname of the outgoing requests.
|
|
198
|
+
* This is so you can have matchers for relative requests, for example, `/^\/api/` if you want to trace requests to your `/api` routes on the same domain.
|
|
201
199
|
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
* Sentry.init({
|
|
205
|
-
* tracePropagationTargets: ['api.site.com'],
|
|
206
|
-
* });
|
|
207
|
-
* ```
|
|
200
|
+
* If any of the two match any of the provided values, tracing headers will be attached to the outgoing request.
|
|
201
|
+
* Both, the string values, and the RegExes you provide in the array will match if they partially match the URL or pathname.
|
|
208
202
|
*
|
|
209
|
-
*
|
|
203
|
+
* Examples:
|
|
204
|
+
* - `tracePropagationTargets: [/^\/api/]` and request to `https://same-origin.com/api/posts`:
|
|
205
|
+
* - Tracing headers will be attached because the request is sent to the same origin and the regex matches the pathname "/api/posts".
|
|
206
|
+
* - `tracePropagationTargets: [/^\/api/]` and request to `https://different-origin.com/api/posts`:
|
|
207
|
+
* - Tracing headers will not be attached because the pathname will only be compared when the request target lives on the same origin.
|
|
208
|
+
* - `tracePropagationTargets: [/^\/api/, 'https://external-api.com']` and request to `https://external-api.com/v1/data`:
|
|
209
|
+
* - Tracing headers will be attached because the request URL matches the string `'https://external-api.com'`.
|
|
210
210
|
*/
|
|
211
211
|
tracePropagationTargets?: TracePropagationTargets;
|
|
212
212
|
/**
|
package/types/options.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EA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OAGG;IACH,WAAW,CAAC,EAAE,WAAW,GAAG,eAAe,EAAE,CAAC;CAC/C"}
|
package/types/scope.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { EventProcessor } from './eventprocessor';
|
|
|
7
7
|
import type { Extra, Extras } from './extra';
|
|
8
8
|
import type { Primitive } from './misc';
|
|
9
9
|
import type { RequestSession, Session } from './session';
|
|
10
|
-
import type {
|
|
10
|
+
import type { SeverityLevel } from './severity';
|
|
11
11
|
import type { Span } from './span';
|
|
12
12
|
import type { PropagationContext } from './tracing';
|
|
13
13
|
import type { Transaction } from './transaction';
|
|
@@ -17,7 +17,7 @@ export type CaptureContext = Scope | Partial<ScopeContext> | ((scope: Scope) =>
|
|
|
17
17
|
/** JSDocs */
|
|
18
18
|
export interface ScopeContext {
|
|
19
19
|
user: User;
|
|
20
|
-
level:
|
|
20
|
+
level: SeverityLevel;
|
|
21
21
|
extra: Extras;
|
|
22
22
|
contexts: Contexts;
|
|
23
23
|
tags: {
|
|
@@ -48,7 +48,7 @@ export interface ScopeData {
|
|
|
48
48
|
span?: Span;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
|
-
* Holds additional event information.
|
|
51
|
+
* Holds additional event information.
|
|
52
52
|
*/
|
|
53
53
|
export interface Scope {
|
|
54
54
|
/**
|
|
@@ -60,8 +60,8 @@ export interface Scope {
|
|
|
60
60
|
*
|
|
61
61
|
* It is generally recommended to use the global function `Sentry.getClient()` instead, unless you know what you are doing.
|
|
62
62
|
*/
|
|
63
|
-
getClient():
|
|
64
|
-
/** Add new event processor that will be called
|
|
63
|
+
getClient<C extends Client>(): C | undefined;
|
|
64
|
+
/** Add new event processor that will be called during event processing. */
|
|
65
65
|
addEventProcessor(callback: EventProcessor): this;
|
|
66
66
|
/** Get the data of this scope, which is applied to an event during processing. */
|
|
67
67
|
getScopeData(): ScopeData;
|
|
@@ -111,7 +111,7 @@ export interface Scope {
|
|
|
111
111
|
* Sets the level on the scope for future events.
|
|
112
112
|
* @param level string {@link SeverityLevel}
|
|
113
113
|
*/
|
|
114
|
-
setLevel(level:
|
|
114
|
+
setLevel(level: SeverityLevel): this;
|
|
115
115
|
/**
|
|
116
116
|
* Sets the transaction name on the scope for future events.
|
|
117
117
|
* @deprecated Use extra or tags instead.
|
|
@@ -231,5 +231,9 @@ export interface Scope {
|
|
|
231
231
|
* @returns the id of the captured event.
|
|
232
232
|
*/
|
|
233
233
|
captureEvent(event: Event, hint?: EventHint): string;
|
|
234
|
+
/**
|
|
235
|
+
* Clone all data from this scope into a new scope.
|
|
236
|
+
*/
|
|
237
|
+
clone(): Scope;
|
|
234
238
|
}
|
|
235
239
|
//# sourceMappingURL=scope.d.ts.map
|
package/types/scope.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MA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,IAAI,UAAU,GAAG,SAAS,CAAC;IAE5C;;OAEG;IACH,gBAAgB,IAAI,IAAI,CAAC;IAEzB;;;OAGG;IACH,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAE5C;;OAEG;IACH,cAAc,IAAI,UAAU,EAAE,CAAC;IAE/B;;OAEG;IACH,gBAAgB,IAAI,IAAI,CAAC;IAEzB;;OAEG;IACH,wBAAwB,CAAC,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAEpE;;OAEG;IACH,qBAAqB,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAEzD;;OAEG;IACH,qBAAqB,IAAI,kBAAkB,CAAC;IAE5C;;;;;;OAMG;IACH,gBAAgB,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAE/D;;;;;;;OAOG;IACH,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAEjF;;;;;;OAMG;IACH,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAErD;;OAEG;IACH,KAAK,IAAI,KAAK,CAAC;CAChB"}
|
package/types/severity.d.ts
CHANGED
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated Please use a `SeverityLevel` string instead of the `Severity` enum. Acceptable values are 'fatal',
|
|
3
|
-
* 'error', 'warning', 'log', 'info', and 'debug'.
|
|
4
|
-
*/
|
|
5
|
-
export declare enum Severity {
|
|
6
|
-
/** JSDoc */
|
|
7
|
-
Fatal = "fatal",
|
|
8
|
-
/** JSDoc */
|
|
9
|
-
Error = "error",
|
|
10
|
-
/** JSDoc */
|
|
11
|
-
Warning = "warning",
|
|
12
|
-
/** JSDoc */
|
|
13
|
-
Log = "log",
|
|
14
|
-
/** JSDoc */
|
|
15
|
-
Info = "info",
|
|
16
|
-
/** JSDoc */
|
|
17
|
-
Debug = "debug"
|
|
18
|
-
}
|
|
19
1
|
export type SeverityLevel = 'fatal' | 'error' | 'warning' | 'log' | 'info' | 'debug';
|
|
20
2
|
//# sourceMappingURL=severity.d.ts.map
|
package/types/severity.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"severity.d.ts","sourceRoot":"","sources":["../../src/severity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"severity.d.ts","sourceRoot":"","sources":["../../src/severity.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC"}
|
package/types/span.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import type { TraceContext } from './context';
|
|
2
|
-
import type { Instrumenter } from './instrumenter';
|
|
3
|
-
import type { Measurements } from './measurement';
|
|
4
1
|
import type { Primitive } from './misc';
|
|
5
2
|
import type { HrTime } from './opentelemetry';
|
|
6
|
-
import type {
|
|
3
|
+
import type { SpanStatus } from './spanStatus';
|
|
4
|
+
import type { TransactionSource } from './transaction';
|
|
7
5
|
type SpanOriginType = 'manual' | 'auto';
|
|
8
6
|
type SpanOriginCategory = string;
|
|
9
7
|
type SpanOriginIntegrationName = string;
|
|
@@ -13,7 +11,7 @@ export type SpanAttributeValue = string | number | boolean | Array<null | undefi
|
|
|
13
11
|
export type SpanAttributes = Partial<{
|
|
14
12
|
'sentry.origin': string;
|
|
15
13
|
'sentry.op': string;
|
|
16
|
-
'sentry.source':
|
|
14
|
+
'sentry.source': TransactionSource;
|
|
17
15
|
'sentry.sample_rate': number;
|
|
18
16
|
}> & Record<string, SpanAttributeValue | undefined>;
|
|
19
17
|
export type MetricSummary = {
|
|
@@ -44,8 +42,8 @@ export interface SpanJSON {
|
|
|
44
42
|
origin?: SpanOrigin;
|
|
45
43
|
_metrics_summary?: Record<string, Array<MetricSummary>>;
|
|
46
44
|
}
|
|
47
|
-
type TraceFlagNone =
|
|
48
|
-
type TraceFlagSampled =
|
|
45
|
+
type TraceFlagNone = 0;
|
|
46
|
+
type TraceFlagSampled = 1;
|
|
49
47
|
export type TraceFlag = TraceFlagNone | TraceFlagSampled;
|
|
50
48
|
export interface SpanContextData {
|
|
51
49
|
/**
|
|
@@ -72,30 +70,23 @@ export interface SpanContextData {
|
|
|
72
70
|
* sampled or not. When set, the least significant bit documents that the
|
|
73
71
|
* caller may have recorded trace data. A caller who does not record trace
|
|
74
72
|
* data out-of-band leaves this flag unset.
|
|
73
|
+
* We allow number here because otel also does, so we can't be stricter than them.
|
|
75
74
|
*/
|
|
76
|
-
traceFlags: TraceFlag;
|
|
75
|
+
traceFlags: TraceFlag | number;
|
|
77
76
|
}
|
|
78
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* Interface holding all properties that can be set on a Span on creation.
|
|
79
|
+
* This is only used for the legacy span/transaction creation and will go away in v8.
|
|
80
|
+
*/
|
|
79
81
|
export interface SpanContext {
|
|
80
82
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* @deprecated Use `name` instead.
|
|
84
|
-
*/
|
|
85
|
-
description?: string | undefined;
|
|
86
|
-
/**
|
|
87
|
-
* Human-readable identifier for the span. Alias for span.description.
|
|
83
|
+
* Human-readable identifier for the span.
|
|
88
84
|
*/
|
|
89
85
|
name?: string | undefined;
|
|
90
86
|
/**
|
|
91
87
|
* Operation of the Span.
|
|
92
88
|
*/
|
|
93
89
|
op?: string | undefined;
|
|
94
|
-
/**
|
|
95
|
-
* Completion status of the Span.
|
|
96
|
-
* See: {@sentry/tracing SpanStatus} for possible values
|
|
97
|
-
*/
|
|
98
|
-
status?: string | undefined;
|
|
99
90
|
/**
|
|
100
91
|
* Parent Span ID
|
|
101
92
|
*/
|
|
@@ -138,146 +129,24 @@ export interface SpanContext {
|
|
|
138
129
|
* Timestamp in seconds (epoch time) indicating when the span ended.
|
|
139
130
|
*/
|
|
140
131
|
endTimestamp?: number | undefined;
|
|
141
|
-
/**
|
|
142
|
-
* The instrumenter that created this span.
|
|
143
|
-
*/
|
|
144
|
-
instrumenter?: Instrumenter | undefined;
|
|
145
132
|
/**
|
|
146
133
|
* The origin of the span, giving context about what created the span.
|
|
147
134
|
*/
|
|
148
135
|
origin?: SpanOrigin | undefined;
|
|
149
|
-
/**
|
|
150
|
-
* Exclusive time in milliseconds.
|
|
151
|
-
*/
|
|
152
|
-
exclusiveTime?: number;
|
|
153
|
-
/**
|
|
154
|
-
* Measurements of the Span.
|
|
155
|
-
*/
|
|
156
|
-
measurements?: Measurements;
|
|
157
136
|
}
|
|
158
|
-
/**
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
* @deprecated Use `spanToJSON(span).description` instead.
|
|
163
|
-
*/
|
|
164
|
-
name: string;
|
|
165
|
-
/**
|
|
166
|
-
* Operation of the Span.
|
|
167
|
-
*
|
|
168
|
-
* @deprecated Use `startSpan()` functions to set, `span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'op')
|
|
169
|
-
* to update and `spanToJSON().op` to read the op instead
|
|
170
|
-
*/
|
|
171
|
-
op?: string | undefined;
|
|
172
|
-
/**
|
|
173
|
-
* The ID of the span.
|
|
174
|
-
* @deprecated Use `spanContext().spanId` instead.
|
|
175
|
-
*/
|
|
176
|
-
spanId: string;
|
|
177
|
-
/**
|
|
178
|
-
* Parent Span ID
|
|
179
|
-
*
|
|
180
|
-
* @deprecated Use `spanToJSON(span).parent_span_id` instead.
|
|
181
|
-
*/
|
|
182
|
-
parentSpanId?: string | undefined;
|
|
183
|
-
/**
|
|
184
|
-
* The ID of the trace.
|
|
185
|
-
* @deprecated Use `spanContext().traceId` instead.
|
|
186
|
-
*/
|
|
187
|
-
traceId: string;
|
|
188
|
-
/**
|
|
189
|
-
* Was this span chosen to be sent as part of the sample?
|
|
190
|
-
* @deprecated Use `isRecording()` instead.
|
|
191
|
-
*/
|
|
192
|
-
sampled?: boolean | undefined;
|
|
193
|
-
/**
|
|
194
|
-
* Timestamp in seconds (epoch time) indicating when the span started.
|
|
195
|
-
* @deprecated Use `spanToJSON()` instead.
|
|
196
|
-
*/
|
|
197
|
-
startTimestamp: number;
|
|
198
|
-
/**
|
|
199
|
-
* Timestamp in seconds (epoch time) indicating when the span ended.
|
|
200
|
-
* @deprecated Use `spanToJSON()` instead.
|
|
201
|
-
*/
|
|
202
|
-
endTimestamp?: number | undefined;
|
|
203
|
-
/**
|
|
204
|
-
* Tags for the span.
|
|
205
|
-
* @deprecated Use `spanToJSON(span).atttributes` instead.
|
|
206
|
-
*/
|
|
207
|
-
tags: {
|
|
208
|
-
[key: string]: Primitive;
|
|
209
|
-
};
|
|
210
|
-
/**
|
|
211
|
-
* Data for the span.
|
|
212
|
-
* @deprecated Use `spanToJSON(span).atttributes` instead.
|
|
213
|
-
*/
|
|
214
|
-
data: {
|
|
215
|
-
[key: string]: any;
|
|
216
|
-
};
|
|
217
|
-
/**
|
|
218
|
-
* Attributes for the span.
|
|
219
|
-
* @deprecated Use `spanToJSON(span).atttributes` instead.
|
|
220
|
-
*/
|
|
221
|
-
attributes: SpanAttributes;
|
|
222
|
-
/**
|
|
223
|
-
* The transaction containing this span
|
|
224
|
-
* @deprecated Use top level `Sentry.getRootSpan()` instead
|
|
225
|
-
*/
|
|
226
|
-
transaction?: Transaction;
|
|
227
|
-
/**
|
|
228
|
-
* The instrumenter that created this span.
|
|
229
|
-
*
|
|
230
|
-
* @deprecated this field will be removed.
|
|
231
|
-
*/
|
|
232
|
-
instrumenter: Instrumenter;
|
|
233
|
-
/**
|
|
234
|
-
* Completion status of the Span.
|
|
235
|
-
*
|
|
236
|
-
* See: {@sentry/tracing SpanStatus} for possible values
|
|
237
|
-
*
|
|
238
|
-
* @deprecated Use `.setStatus` to set or update and `spanToJSON()` to read the status.
|
|
239
|
-
*/
|
|
240
|
-
status?: string | undefined;
|
|
241
|
-
/**
|
|
242
|
-
* The origin of the span, giving context about what created the span.
|
|
243
|
-
*
|
|
244
|
-
* @deprecated Use `startSpan` function to set and `spanToJSON(span).origin` to read the origin instead.
|
|
245
|
-
*/
|
|
246
|
-
origin?: SpanOrigin | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* A generic Span which holds trace data.
|
|
139
|
+
*/
|
|
140
|
+
export interface Span {
|
|
247
141
|
/**
|
|
248
142
|
* Get context data for this span.
|
|
249
143
|
* This includes the spanId & the traceId.
|
|
250
144
|
*/
|
|
251
145
|
spanContext(): SpanContextData;
|
|
252
|
-
/**
|
|
253
|
-
* Sets the finish timestamp on the current span.
|
|
254
|
-
*
|
|
255
|
-
* @param endTimestamp Takes an endTimestamp if the end should not be the time when you call this function.
|
|
256
|
-
*
|
|
257
|
-
* @deprecated Use `.end()` instead.
|
|
258
|
-
*/
|
|
259
|
-
finish(endTimestamp?: number): void;
|
|
260
146
|
/**
|
|
261
147
|
* End the current span.
|
|
262
148
|
*/
|
|
263
149
|
end(endTimestamp?: SpanTimeInput): void;
|
|
264
|
-
/**
|
|
265
|
-
* Sets the tag attribute on the current span.
|
|
266
|
-
*
|
|
267
|
-
* Can also be used to unset a tag, by passing `undefined`.
|
|
268
|
-
*
|
|
269
|
-
* @param key Tag key
|
|
270
|
-
* @param value Tag value
|
|
271
|
-
* @deprecated Use `setAttribute()` instead.
|
|
272
|
-
*/
|
|
273
|
-
setTag(key: string, value: Primitive): this;
|
|
274
|
-
/**
|
|
275
|
-
* Sets the data attribute on the current span
|
|
276
|
-
* @param key Data key
|
|
277
|
-
* @param value Data value
|
|
278
|
-
* @deprecated Use `setAttribute()` instead.
|
|
279
|
-
*/
|
|
280
|
-
setData(key: string, value: any): this;
|
|
281
150
|
/**
|
|
282
151
|
* Set a single attribute on the span.
|
|
283
152
|
* Set it to `undefined` to remove the attribute.
|
|
@@ -289,65 +158,13 @@ export interface Span extends Omit<SpanContext, 'op' | 'status' | 'origin'> {
|
|
|
289
158
|
*/
|
|
290
159
|
setAttributes(attributes: SpanAttributes): void;
|
|
291
160
|
/**
|
|
292
|
-
* Sets the status attribute on the current span
|
|
293
|
-
* See: {@sentry/tracing SpanStatus} for possible values
|
|
294
|
-
* @param status http code used to set the status
|
|
295
|
-
*/
|
|
296
|
-
setStatus(status: string): this;
|
|
297
|
-
/**
|
|
298
|
-
* Sets the status attribute on the current span based on the http code
|
|
299
|
-
* @param httpStatus http code used to set the status
|
|
300
|
-
* @deprecated Use top-level `setHttpStatus()` instead.
|
|
301
|
-
*/
|
|
302
|
-
setHttpStatus(httpStatus: number): this;
|
|
303
|
-
/**
|
|
304
|
-
* Set the name of the span.
|
|
305
|
-
*
|
|
306
|
-
* @deprecated Use `updateName()` instead.
|
|
161
|
+
* Sets the status attribute on the current span.
|
|
307
162
|
*/
|
|
308
|
-
|
|
163
|
+
setStatus(status: SpanStatus): this;
|
|
309
164
|
/**
|
|
310
165
|
* Update the name of the span.
|
|
311
166
|
*/
|
|
312
167
|
updateName(name: string): this;
|
|
313
|
-
/**
|
|
314
|
-
* Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.
|
|
315
|
-
* Also the `sampled` decision will be inherited.
|
|
316
|
-
*
|
|
317
|
-
* @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.
|
|
318
|
-
*/
|
|
319
|
-
startChild(spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'sampled' | 'traceId' | 'parentSpanId'>>): Span;
|
|
320
|
-
/**
|
|
321
|
-
* Determines whether span was successful (HTTP200)
|
|
322
|
-
*
|
|
323
|
-
* @deprecated Use `spanToJSON(span).status === 'ok'` instead.
|
|
324
|
-
*/
|
|
325
|
-
isSuccess(): boolean;
|
|
326
|
-
/**
|
|
327
|
-
* Return a traceparent compatible header string.
|
|
328
|
-
* @deprecated Use `spanToTraceHeader()` instead.
|
|
329
|
-
*/
|
|
330
|
-
toTraceparent(): string;
|
|
331
|
-
/**
|
|
332
|
-
* Returns the current span properties as a `SpanContext`.
|
|
333
|
-
* @deprecated Use `toJSON()` or access the fields directly instead.
|
|
334
|
-
*/
|
|
335
|
-
toContext(): SpanContext;
|
|
336
|
-
/**
|
|
337
|
-
* Updates the current span with a new `SpanContext`.
|
|
338
|
-
* @deprecated Update the fields directly instead.
|
|
339
|
-
*/
|
|
340
|
-
updateWithContext(spanContext: SpanContext): this;
|
|
341
|
-
/**
|
|
342
|
-
* Convert the object to JSON for w. spans array info only.
|
|
343
|
-
* @deprecated Use `spanToTraceContext()` util function instead.
|
|
344
|
-
*/
|
|
345
|
-
getTraceContext(): TraceContext;
|
|
346
|
-
/**
|
|
347
|
-
* Convert the object to JSON.
|
|
348
|
-
* @deprecated Use `spanToJSON(span)` instead.
|
|
349
|
-
*/
|
|
350
|
-
toJSON(): SpanJSON;
|
|
351
168
|
/**
|
|
352
169
|
* If this is span is actually recording data.
|
|
353
170
|
* This will return false if tracing is disabled, this span was not sampled or if the span is already finished.
|
package/types/span.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../../src/span.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../../src/span.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,KAAK,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC;AACxC,KAAK,kBAAkB,GAAG,MAAM,CAAC;AACjC,KAAK,yBAAyB,GAAG,MAAM,CAAC;AACx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GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IAEpC;;;OAGG;IACH,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAE9B;;OAEG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC;IAE5B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEpC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAElC;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB;;;OAGG;IACH,WAAW,IAAI,eAAe,CAAC;IAE/B;;OAEG;IACH,GAAG,CAAC,YAAY,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAExC;;;OAGG;IACH,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,GAAG,SAAS,GAAG,IAAI,CAAC;IAEvE;;;OAGG;IACH,aAAa,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI,CAAC;IAEhD;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;;OAGG;IACH,WAAW,IAAI,OAAO,CAAC;CACxB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
type 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';
|
|
36
|
+
declare const SPAN_STATUS_UNSET = 0;
|
|
37
|
+
declare const SPAN_STATUS_OK = 1;
|
|
38
|
+
declare const SPAN_STATUS_ERROR = 2;
|
|
39
|
+
/** The status code of a span. */
|
|
40
|
+
export 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
|
+
*/
|
|
45
|
+
export 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
|
+
}
|
|
58
|
+
export {};
|
|
59
|
+
//# sourceMappingURL=spanStatus.d.ts.map
|