@sentry/types 5.25.0-beta.2 → 5.25.0
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/dist/client.d.ts +0 -6
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js.map +1 -1
- package/dist/context.d.ts +3 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +2 -0
- package/dist/context.js.map +1 -0
- package/dist/event.d.ts +4 -8
- package/dist/event.d.ts.map +1 -1
- package/dist/event.js.map +1 -1
- package/dist/hub.d.ts +0 -4
- package/dist/hub.d.ts.map +1 -1
- package/dist/hub.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/scope.d.ts +6 -24
- package/dist/scope.d.ts.map +1 -1
- package/dist/scope.js.map +1 -1
- package/dist/span.d.ts +5 -0
- package/dist/span.d.ts.map +1 -1
- package/dist/span.js.map +1 -1
- package/dist/transaction.d.ts +0 -3
- package/dist/transaction.d.ts.map +1 -1
- package/dist/transaction.js.map +1 -1
- package/dist/transport.d.ts +0 -6
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js.map +1 -1
- package/esm/client.d.ts +0 -6
- package/esm/client.d.ts.map +1 -1
- package/esm/client.js.map +1 -1
- package/esm/context.d.ts +3 -0
- package/esm/context.d.ts.map +1 -0
- package/esm/context.js +1 -0
- package/esm/context.js.map +1 -0
- package/esm/event.d.ts +4 -8
- package/esm/event.d.ts.map +1 -1
- package/esm/event.js.map +1 -1
- package/esm/hub.d.ts +0 -4
- package/esm/hub.d.ts.map +1 -1
- package/esm/hub.js.map +1 -1
- package/esm/index.d.ts +2 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +0 -1
- package/esm/index.js.map +1 -1
- package/esm/scope.d.ts +6 -24
- package/esm/scope.d.ts.map +1 -1
- package/esm/scope.js.map +1 -1
- package/esm/span.d.ts +5 -0
- package/esm/span.d.ts.map +1 -1
- package/esm/span.js.map +1 -1
- package/esm/transaction.d.ts +0 -3
- package/esm/transaction.d.ts.map +1 -1
- package/esm/transaction.js.map +1 -1
- package/esm/transport.d.ts +0 -6
- package/esm/transport.d.ts.map +1 -1
- package/esm/transport.js.map +1 -1
- package/package.json +5 -2
- package/dist/session.d.ts +0 -58
- package/dist/session.d.ts.map +0 -1
- package/dist/session.js +0 -16
- package/dist/session.js.map +0 -1
- package/esm/session.d.ts +0 -58
- package/esm/session.d.ts.map +0 -1
- package/esm/session.js +0 -15
- package/esm/session.js.map +0 -1
package/dist/client.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { Event, EventHint } from './event';
|
|
|
3
3
|
import { Integration, IntegrationClass } from './integration';
|
|
4
4
|
import { Options } from './options';
|
|
5
5
|
import { Scope } from './scope';
|
|
6
|
-
import { Session } from './session';
|
|
7
6
|
import { Severity } from './severity';
|
|
8
7
|
/**
|
|
9
8
|
* User-Facing Sentry SDK Client.
|
|
@@ -43,11 +42,6 @@ export interface Client<O extends Options = Options> {
|
|
|
43
42
|
* @returns The event id
|
|
44
43
|
*/
|
|
45
44
|
captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined;
|
|
46
|
-
/** Captures a session
|
|
47
|
-
*
|
|
48
|
-
* @param session Session to be delivered
|
|
49
|
-
*/
|
|
50
|
-
captureSession(session: Session): void;
|
|
51
45
|
/** Returns the current Dsn. */
|
|
52
46
|
getDsn(): Dsn | undefined;
|
|
53
47
|
/** Returns the current options. */
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAA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WAAW,CAAC,OAAO,CAAC,CAAC;IAE9C;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAE9C,gEAAgE;IAChE,cAAc,CAAC,CAAC,SAAS,WAAW,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAElF,2FAA2F;IAC3F,iBAAiB,IAAI,IAAI,CAAC;CAC3B"}
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"","sourcesContent":["import { Dsn } from './dsn';\nimport { Event, EventHint } from './event';\nimport { Integration, IntegrationClass } from './integration';\nimport { Options } from './options';\nimport { Scope } from './scope';\nimport {
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"","sourcesContent":["import { Dsn } from './dsn';\nimport { Event, EventHint } from './event';\nimport { Integration, IntegrationClass } from './integration';\nimport { Options } from './options';\nimport { Scope } from './scope';\nimport { Severity } from './severity';\n\n/**\n * User-Facing Sentry SDK Client.\n *\n * This interface contains all methods to interface with the SDK once it has\n * been installed. It allows to send events to Sentry, record breadcrumbs and\n * set a context included in every event. Since the SDK mutates its environment,\n * there will only be one instance during runtime.\n *\n */\nexport interface Client<O extends Options = Options> {\n /**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @param hint May contain additional information about the original exception.\n * @param scope An optional scope containing event metadata.\n * @returns The event id\n */\n captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined;\n\n /**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @param hint May contain additional information about the original exception.\n * @param scope An optional scope containing event metadata.\n * @returns The event id\n */\n captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined;\n\n /**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope An optional scope containing event metadata.\n * @returns The event id\n */\n captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined;\n\n /** Returns the current Dsn. */\n getDsn(): Dsn | undefined;\n\n /** Returns the current options. */\n getOptions(): O;\n\n /**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\n close(timeout?: number): PromiseLike<boolean>;\n\n /**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\n flush(timeout?: number): PromiseLike<boolean>;\n\n /** Returns an array of installed integrations on the client. */\n getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null;\n\n /** This is an internal function to setup all integrations that should run on the client */\n setupIntegrations(): void;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,oBAAY,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC9C,oBAAY,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}
|
package/dist/context.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"","sourcesContent":["export type Context = Record<string, unknown>;\nexport type Contexts = Record<string, Context>;\n"]}
|
package/dist/event.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Breadcrumb } from './breadcrumb';
|
|
2
|
+
import { Contexts } from './context';
|
|
2
3
|
import { Exception } from './exception';
|
|
4
|
+
import { Extras } from './extra';
|
|
3
5
|
import { Request } from './request';
|
|
4
6
|
import { CaptureContext } from './scope';
|
|
5
7
|
import { SdkInfo } from './sdkinfo';
|
|
6
8
|
import { Severity } from './severity';
|
|
7
9
|
import { Span } from './span';
|
|
8
10
|
import { Stacktrace } from './stacktrace';
|
|
9
|
-
import { Measurements } from './transaction';
|
|
10
11
|
import { User } from './user';
|
|
11
12
|
/** JSDoc */
|
|
12
13
|
export interface Event {
|
|
@@ -33,19 +34,14 @@ export interface Event {
|
|
|
33
34
|
};
|
|
34
35
|
stacktrace?: Stacktrace;
|
|
35
36
|
breadcrumbs?: Breadcrumb[];
|
|
36
|
-
contexts?:
|
|
37
|
-
[key: string]: Record<any, any>;
|
|
38
|
-
};
|
|
37
|
+
contexts?: Contexts;
|
|
39
38
|
tags?: {
|
|
40
39
|
[key: string]: string;
|
|
41
40
|
};
|
|
42
|
-
extra?:
|
|
43
|
-
[key: string]: any;
|
|
44
|
-
};
|
|
41
|
+
extra?: Extras;
|
|
45
42
|
user?: User;
|
|
46
43
|
type?: EventType;
|
|
47
44
|
spans?: Span[];
|
|
48
|
-
measurements?: Measurements;
|
|
49
45
|
}
|
|
50
46
|
/** JSDoc */
|
|
51
47
|
export declare type EventType = 'transaction';
|
package/dist/event.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,
|
|
1
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ACpC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE;QACV,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;KACtB,CAAC;IACF,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;CAChB;AAED,YAAY;AACZ,oBAAY,SAAS,GAAG,aAAa,CAAC;AAEtC,YAAY;AACZ,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,kBAAkB,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAClC,iBAAiB,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAAC;IAC1C,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ"}
|
package/dist/event.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.js","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport { Exception } from './exception';\nimport {
|
|
1
|
+
{"version":3,"file":"event.js","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport { Contexts } from './context';\nimport { Exception } from './exception';\nimport { Extras } from './extra';\nimport { Request } from './request';\nimport { CaptureContext } from './scope';\nimport { SdkInfo } from './sdkinfo';\nimport { Severity } from './severity';\nimport { Span } from './span';\nimport { Stacktrace } from './stacktrace';\nimport { User } from './user';\n\n/** JSDoc */\nexport interface Event {\n event_id?: string;\n message?: string;\n timestamp?: number;\n start_timestamp?: number;\n level?: Severity;\n platform?: string;\n logger?: string;\n server_name?: string;\n release?: string;\n dist?: string;\n environment?: string;\n sdk?: SdkInfo;\n request?: Request;\n transaction?: string;\n modules?: { [key: string]: string };\n fingerprint?: string[];\n exception?: {\n values?: Exception[];\n };\n stacktrace?: Stacktrace;\n breadcrumbs?: Breadcrumb[];\n contexts?: Contexts;\n tags?: { [key: string]: string };\n extra?: Extras;\n user?: User;\n type?: EventType;\n spans?: Span[];\n}\n\n/** JSDoc */\nexport type EventType = 'transaction';\n\n/** JSDoc */\nexport interface EventHint {\n event_id?: string;\n captureContext?: CaptureContext;\n syntheticException?: Error | null;\n originalException?: Error | string | null;\n data?: any;\n}\n"]}
|
package/dist/hub.d.ts
CHANGED
|
@@ -183,9 +183,5 @@ export interface Hub {
|
|
|
183
183
|
* @returns The transaction which was just started
|
|
184
184
|
*/
|
|
185
185
|
startTransaction(context: TransactionContext, customSamplingContext?: CustomSamplingContext): Transaction;
|
|
186
|
-
/** JSDoc */
|
|
187
|
-
startSession(): void;
|
|
188
|
-
/** JSDoc */
|
|
189
|
-
endSession(): void;
|
|
190
186
|
}
|
|
191
187
|
//# sourceMappingURL=hub.d.ts.map
|
package/dist/hub.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hub.d.ts","sourceRoot":"","sources":["../src/hub.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9D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AAW,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAElF,qEAAqE;IACrE,YAAY,IAAI;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAE1C;;;;;OAKG;IACH,SAAS,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAEtC;;;;;;;;;;;;;;;;OAgBG;IACH,gBAAgB,CAAC,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,CAAC,EAAE,qBAAqB,GAAG,WAAW,CAAC;CAC3G"}
|
package/dist/hub.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hub.js","sourceRoot":"","sources":["../src/hub.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nimport { Client } from './client';\nimport { Event, EventHint } from './event';\nimport { Extra, Extras } from './extra';\nimport { Integration, IntegrationClass } from './integration';\nimport { Scope } from './scope';\nimport { Severity } from './severity';\nimport { Span, SpanContext } from './span';\nimport { CustomSamplingContext, Transaction, TransactionContext } from './transaction';\nimport { User } from './user';\n\n/**\n * Internal class used to make sure we always have the latest internal functions\n * working in case we have a version conflict.\n */\nexport interface Hub {\n /**\n * Checks if this hub's version is older than the given version.\n *\n * @param version A version number to compare to.\n * @return True if the given version is newer; otherwise false.\n *\n * @hidden\n */\n isOlderThan(version: number): boolean;\n\n /**\n * This binds the given client to the current scope.\n * @param client An SDK client (client) instance.\n */\n bindClient(client?: Client): void;\n\n /**\n * Create a new scope to store context information.\n *\n * The scope will be layered on top of the current one. It is isolated, i.e. all\n * breadcrumbs and context information added to this scope will be removed once\n * the scope ends. Be sure to always remove this scope with {@link this.popScope}\n * when the operation finishes or throws.\n *\n * @returns Scope, the new cloned scope\n */\n pushScope(): Scope;\n\n /**\n * Removes a previously pushed scope from the stack.\n *\n * This restores the state before the scope was pushed. All breadcrumbs and\n * context information added since the last call to {@link this.pushScope} are\n * discarded.\n */\n popScope(): boolean;\n\n /**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\n withScope(callback: (scope: Scope) => void): void;\n\n /** Returns the client of the top stack. */\n getClient(): Client | undefined;\n\n /**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @param hint May contain additional information about the original exception.\n * @returns The generated eventId.\n */\n captureException(exception: any, hint?: EventHint): string;\n\n /**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @param hint May contain additional information about the original exception.\n * @returns The generated eventId.\n */\n captureMessage(message: string, level?: Severity, hint?: EventHint): string;\n\n /**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n */\n captureEvent(event: Event, hint?: EventHint): string;\n\n /**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\n lastEventId(): string | undefined;\n\n /**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n * @param hint May contain additional information about the original breadcrumb.\n */\n addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;\n\n /**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\n setUser(user: User | null): void;\n\n /**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\n setTags(tags: { [key: string]: string }): void;\n\n /**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\n setTag(key: string, value: string): void;\n\n /**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\n setExtra(key: string, extra: Extra): void;\n\n /**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\n setExtras(extras: Extras): void;\n\n /**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\n setContext(name: string, context: { [key: string]: any } | null): void;\n\n /**\n * Callback to set context information onto the scope.\n *\n * @param callback Callback function that receives Scope.\n */\n configureScope(callback: (scope: Scope) => void): void;\n\n /**\n * For the duraction of the callback, this hub will be set as the global current Hub.\n * This function is useful if you want to run your own client and hook into an already initialized one\n * e.g.: Reporting issues to your own sentry when running in your component while still using the users configuration.\n */\n run(callback: (hub: Hub) => void): void;\n\n /** Returns the integration if installed on the current client. */\n getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null;\n\n /** Returns all trace headers that are currently on the top scope. */\n traceHeaders(): { [key: string]: string };\n\n /**\n * Starts a new `Span` and returns it. If there is a `Span` on the `Scope`,\n * the new `Span` will be a child of the existing `Span`.\n *\n * @param context Properties of the new `Span`.\n */\n startSpan(context: SpanContext): Span;\n\n /**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n */\n startTransaction(context: TransactionContext, customSamplingContext?: CustomSamplingContext): Transaction;\n
|
|
1
|
+
{"version":3,"file":"hub.js","sourceRoot":"","sources":["../src/hub.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nimport { Client } from './client';\nimport { Event, EventHint } from './event';\nimport { Extra, Extras } from './extra';\nimport { Integration, IntegrationClass } from './integration';\nimport { Scope } from './scope';\nimport { Severity } from './severity';\nimport { Span, SpanContext } from './span';\nimport { CustomSamplingContext, Transaction, TransactionContext } from './transaction';\nimport { User } from './user';\n\n/**\n * Internal class used to make sure we always have the latest internal functions\n * working in case we have a version conflict.\n */\nexport interface Hub {\n /**\n * Checks if this hub's version is older than the given version.\n *\n * @param version A version number to compare to.\n * @return True if the given version is newer; otherwise false.\n *\n * @hidden\n */\n isOlderThan(version: number): boolean;\n\n /**\n * This binds the given client to the current scope.\n * @param client An SDK client (client) instance.\n */\n bindClient(client?: Client): void;\n\n /**\n * Create a new scope to store context information.\n *\n * The scope will be layered on top of the current one. It is isolated, i.e. all\n * breadcrumbs and context information added to this scope will be removed once\n * the scope ends. Be sure to always remove this scope with {@link this.popScope}\n * when the operation finishes or throws.\n *\n * @returns Scope, the new cloned scope\n */\n pushScope(): Scope;\n\n /**\n * Removes a previously pushed scope from the stack.\n *\n * This restores the state before the scope was pushed. All breadcrumbs and\n * context information added since the last call to {@link this.pushScope} are\n * discarded.\n */\n popScope(): boolean;\n\n /**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\n withScope(callback: (scope: Scope) => void): void;\n\n /** Returns the client of the top stack. */\n getClient(): Client | undefined;\n\n /**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @param hint May contain additional information about the original exception.\n * @returns The generated eventId.\n */\n captureException(exception: any, hint?: EventHint): string;\n\n /**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @param hint May contain additional information about the original exception.\n * @returns The generated eventId.\n */\n captureMessage(message: string, level?: Severity, hint?: EventHint): string;\n\n /**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n */\n captureEvent(event: Event, hint?: EventHint): string;\n\n /**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\n lastEventId(): string | undefined;\n\n /**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n * @param hint May contain additional information about the original breadcrumb.\n */\n addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;\n\n /**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\n setUser(user: User | null): void;\n\n /**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\n setTags(tags: { [key: string]: string }): void;\n\n /**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\n setTag(key: string, value: string): void;\n\n /**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\n setExtra(key: string, extra: Extra): void;\n\n /**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\n setExtras(extras: Extras): void;\n\n /**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\n setContext(name: string, context: { [key: string]: any } | null): void;\n\n /**\n * Callback to set context information onto the scope.\n *\n * @param callback Callback function that receives Scope.\n */\n configureScope(callback: (scope: Scope) => void): void;\n\n /**\n * For the duraction of the callback, this hub will be set as the global current Hub.\n * This function is useful if you want to run your own client and hook into an already initialized one\n * e.g.: Reporting issues to your own sentry when running in your component while still using the users configuration.\n */\n run(callback: (hub: Hub) => void): void;\n\n /** Returns the integration if installed on the current client. */\n getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null;\n\n /** Returns all trace headers that are currently on the top scope. */\n traceHeaders(): { [key: string]: string };\n\n /**\n * Starts a new `Span` and returns it. If there is a `Span` on the `Scope`,\n * the new `Span` will be a child of the existing `Span`.\n *\n * @param context Properties of the new `Span`.\n */\n startSpan(context: SpanContext): Span;\n\n /**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n */\n startTransaction(context: TransactionContext, customSamplingContext?: CustomSamplingContext): Transaction;\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { Breadcrumb, BreadcrumbHint } from './breadcrumb';
|
|
2
2
|
export { Client } from './client';
|
|
3
|
+
export { Context, Contexts } from './context';
|
|
3
4
|
export { Dsn, DsnComponents, DsnLike, DsnProtocol } from './dsn';
|
|
4
5
|
export { ExtendedError } from './error';
|
|
5
6
|
export { Event, EventHint } from './event';
|
|
@@ -18,13 +19,12 @@ export { Response } from './response';
|
|
|
18
19
|
export { Runtime } from './runtime';
|
|
19
20
|
export { CaptureContext, Scope, ScopeContext } from './scope';
|
|
20
21
|
export { SdkInfo } from './sdkinfo';
|
|
21
|
-
export { Session, SessionContext, SessionStatus } from './session';
|
|
22
22
|
export { Severity } from './severity';
|
|
23
23
|
export { Span, SpanContext } from './span';
|
|
24
24
|
export { StackFrame } from './stackframe';
|
|
25
25
|
export { Stacktrace } from './stacktrace';
|
|
26
26
|
export { Status } from './status';
|
|
27
|
-
export { CustomSamplingContext,
|
|
27
|
+
export { CustomSamplingContext, SamplingContext, TraceparentData, Transaction, TransactionContext, } from './transaction';
|
|
28
28
|
export { Thread } from './thread';
|
|
29
29
|
export { Transport, TransportOptions, TransportClass } from './transport';
|
|
30
30
|
export { User } from './user';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,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AE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,WAAW,EACX,kBAAkB,GACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
2
|
var loglevel_1 = require("./loglevel");
|
|
3
3
|
exports.LogLevel = loglevel_1.LogLevel;
|
|
4
|
-
var session_1 = require("./session");
|
|
5
|
-
exports.SessionStatus = session_1.SessionStatus;
|
|
6
4
|
var severity_1 = require("./severity");
|
|
7
5
|
exports.Severity = severity_1.Severity;
|
|
8
6
|
var status_1 = require("./status");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAWA,uCAAsC;AAA7B,8BAAA,QAAQ,CAAA;AAUjB,uCAAsC;AAA7B,8BAAA,QAAQ,CAAA;AAIjB,mCAAkC;AAAzB,0BAAA,MAAM,CAAA","sourcesContent":["export { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nexport { Client } from './client';\nexport { Context, Contexts } from './context';\nexport { Dsn, DsnComponents, DsnLike, DsnProtocol } from './dsn';\nexport { ExtendedError } from './error';\nexport { Event, EventHint } from './event';\nexport { EventProcessor } from './eventprocessor';\nexport { Exception } from './exception';\nexport { Extra, Extras } from './extra';\nexport { Hub } from './hub';\nexport { Integration, IntegrationClass } from './integration';\nexport { LogLevel } from './loglevel';\nexport { Mechanism } from './mechanism';\nexport { ExtractedNodeRequestData, WorkerLocation } from './misc';\nexport { Options } from './options';\nexport { Package } from './package';\nexport { Request } from './request';\nexport { Response } from './response';\nexport { Runtime } from './runtime';\nexport { CaptureContext, Scope, ScopeContext } from './scope';\nexport { SdkInfo } from './sdkinfo';\nexport { Severity } from './severity';\nexport { Span, SpanContext } from './span';\nexport { StackFrame } from './stackframe';\nexport { Stacktrace } from './stacktrace';\nexport { Status } from './status';\nexport {\n CustomSamplingContext,\n SamplingContext,\n TraceparentData,\n Transaction,\n TransactionContext,\n} from './transaction';\nexport { Thread } from './thread';\nexport { Transport, TransportOptions, TransportClass } from './transport';\nexport { User } from './user';\nexport { WrappedFunction } from './wrappedfunction';\n"]}
|
package/dist/scope.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Breadcrumb } from './breadcrumb';
|
|
2
|
+
import { Context, Contexts } from './context';
|
|
2
3
|
import { EventProcessor } from './eventprocessor';
|
|
3
4
|
import { Extra, Extras } from './extra';
|
|
4
|
-
import { Session } from './session';
|
|
5
5
|
import { Severity } from './severity';
|
|
6
6
|
import { Span } from './span';
|
|
7
7
|
import { Transaction } from './transaction';
|
|
@@ -12,12 +12,8 @@ export declare type CaptureContext = Scope | Partial<ScopeContext> | ((scope: Sc
|
|
|
12
12
|
export interface ScopeContext {
|
|
13
13
|
user: User;
|
|
14
14
|
level: Severity;
|
|
15
|
-
extra:
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
contexts: {
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
};
|
|
15
|
+
extra: Extras;
|
|
16
|
+
contexts: Contexts;
|
|
21
17
|
tags: {
|
|
22
18
|
[key: string]: string;
|
|
23
19
|
};
|
|
@@ -36,10 +32,6 @@ export interface Scope {
|
|
|
36
32
|
* @param user User context object to be set in the current context. Pass `null` to unset the user.
|
|
37
33
|
*/
|
|
38
34
|
setUser(user: User | null): this;
|
|
39
|
-
/**
|
|
40
|
-
* Returns the `User` if there is one
|
|
41
|
-
*/
|
|
42
|
-
getUser(): User | undefined;
|
|
43
35
|
/**
|
|
44
36
|
* Set an object that will be merged sent as tags data with the event.
|
|
45
37
|
* @param tags Tags context object to merge into current context.
|
|
@@ -61,7 +53,7 @@ export interface Scope {
|
|
|
61
53
|
/**
|
|
62
54
|
* Set key:value that will be sent as extra data with the event.
|
|
63
55
|
* @param key String of extra
|
|
64
|
-
* @param extra Any kind of data. This data will be
|
|
56
|
+
* @param extra Any kind of data. This data will be normalized.
|
|
65
57
|
*/
|
|
66
58
|
setExtra(key: string, extra: Extra): this;
|
|
67
59
|
/**
|
|
@@ -81,11 +73,9 @@ export interface Scope {
|
|
|
81
73
|
/**
|
|
82
74
|
* Sets context data with the given name.
|
|
83
75
|
* @param name of the context
|
|
84
|
-
* @param context
|
|
76
|
+
* @param context an object containing context data. This data will be normalized. Pass `null` to unset the context.
|
|
85
77
|
*/
|
|
86
|
-
setContext(name: string, context:
|
|
87
|
-
[key: string]: any;
|
|
88
|
-
} | null): this;
|
|
78
|
+
setContext(name: string, context: Context | null): this;
|
|
89
79
|
/**
|
|
90
80
|
* Sets the Span on the scope.
|
|
91
81
|
* @param span Span
|
|
@@ -99,14 +89,6 @@ export interface Scope {
|
|
|
99
89
|
* Returns the `Transaction` attached to the scope (if there is one)
|
|
100
90
|
*/
|
|
101
91
|
getTransaction(): Transaction | undefined;
|
|
102
|
-
/**
|
|
103
|
-
* Sets the `Session` on the scope
|
|
104
|
-
*/
|
|
105
|
-
setSession(session?: Session): this;
|
|
106
|
-
/**
|
|
107
|
-
* Returns the `Session` if there is one
|
|
108
|
-
*/
|
|
109
|
-
getSession(): Session | undefined;
|
|
110
92
|
/**
|
|
111
93
|
* Updates the scope with provided data. Can work in three variations:
|
|
112
94
|
* - plain object containing updatable attributes
|
package/dist/scope.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,aAAa;AACb,oBAAY,cAAc,GAAG,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,CAAC,CAAC;AAEvF,aAAa;AACb,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,QAAQ,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA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,KAAK,IAAI,IAAI,CAAC;IAEd;;;;OAIG;IACH,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErE;;OAEG;IACH,gBAAgB,IAAI,IAAI,CAAC;CAC1B"}
|
package/dist/scope.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport {
|
|
1
|
+
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport { Context, Contexts } from './context';\nimport { EventProcessor } from './eventprocessor';\nimport { Extra, Extras } from './extra';\nimport { Severity } from './severity';\nimport { Span } from './span';\nimport { Transaction } from './transaction';\nimport { User } from './user';\n\n/** JSDocs */\nexport type CaptureContext = Scope | Partial<ScopeContext> | ((scope: Scope) => Scope);\n\n/** JSDocs */\nexport interface ScopeContext {\n user: User;\n level: Severity;\n extra: Extras;\n contexts: Contexts;\n tags: { [key: string]: string };\n fingerprint: string[];\n}\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport interface Scope {\n /** Add new event processor that will be called after {@link applyToEvent}. */\n addEventProcessor(callback: EventProcessor): this;\n\n /**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\n setUser(user: User | null): this;\n\n /**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\n setTags(tags: { [key: string]: string }): this;\n\n /**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\n setTag(key: string, value: string): this;\n\n /**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\n setExtras(extras: Extras): this;\n\n /**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\n setExtra(key: string, extra: Extra): this;\n\n /**\n * Sets the fingerprint on the scope to send with the events.\n * @param fingerprint string[] to group events in Sentry.\n */\n setFingerprint(fingerprint: string[]): this;\n\n /**\n * Sets the level on the scope for future events.\n * @param level string {@link Severity}\n */\n setLevel(level: Severity): this;\n\n /**\n * Sets the transaction name on the scope for future events.\n */\n setTransactionName(name?: string): this;\n\n /**\n * Sets context data with the given name.\n * @param name of the context\n * @param context an object containing context data. This data will be normalized. Pass `null` to unset the context.\n */\n setContext(name: string, context: Context | null): this;\n\n /**\n * Sets the Span on the scope.\n * @param span Span\n */\n setSpan(span?: Span): this;\n\n /**\n * Returns the `Span` if there is one\n */\n getSpan(): Span | undefined;\n\n /**\n * Returns the `Transaction` attached to the scope (if there is one)\n */\n getTransaction(): Transaction | undefined;\n\n /**\n * Updates the scope with provided data. Can work in three variations:\n * - plain object containing updatable attributes\n * - Scope instance that'll extract the attributes from\n * - callback function that'll receive the current scope as an argument and allow for modifications\n * @param captureContext scope modifier to be used\n */\n update(captureContext?: CaptureContext): this;\n\n /** Clears the current scope and resets its properties. */\n clear(): this;\n\n /**\n * Sets the breadcrumbs in the scope\n * @param breadcrumbs Breadcrumb\n * @param maxBreadcrumbs number of max breadcrumbs to merged into event.\n */\n addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this;\n\n /**\n * Clears all currently set Breadcrumbs.\n */\n clearBreadcrumbs(): this;\n}\n"]}
|
package/dist/span.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Transaction } from './transaction';
|
|
1
2
|
/** Interface holding all properties that can be set on a Span on creation. */
|
|
2
3
|
export interface SpanContext {
|
|
3
4
|
/**
|
|
@@ -76,6 +77,10 @@ export interface Span extends SpanContext {
|
|
|
76
77
|
data: {
|
|
77
78
|
[key: string]: any;
|
|
78
79
|
};
|
|
80
|
+
/**
|
|
81
|
+
* The transaction containing this span
|
|
82
|
+
*/
|
|
83
|
+
transaction?: Transaction;
|
|
79
84
|
/**
|
|
80
85
|
* Sets the finish timestamp on the current span.
|
|
81
86
|
* @param endTimestamp Takes an endTimestamp if the end should not be the time when you call this function.
|
package/dist/span.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAEjC;;OAEG;IACH,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAE9B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,qCAAqC;AACrC,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAEhC;;OAEG;IACH,IAAI,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,WAAW,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,cAAc,CAAC,CAAC,GAC7G,IAAI,CAAC;IAER;;OAEG;IACH,SAAS,IAAI,OAAO,CAAC;IAErB,oDAAoD;IACpD,aAAa,IAAI,MAAM,CAAC;IAExB,8DAA8D;IAC9D,eAAe,IAAI;QACjB,IAAI,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;SAAE,CAAC;QAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAC;QACjC,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,iCAAiC;IACjC,MAAM,IAAI;QACR,IAAI,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;SAAE,CAAC;QAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,OAAO,EAAE,MAAM,CAAC;QAChB,eAAe,EAAE,MAAM,CAAC;QACxB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAC;QACjC,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH"}
|
package/dist/span.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"span.js","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"","sourcesContent":["/** Interface holding all properties that can be set on a Span on creation. */\nexport interface SpanContext {\n /**\n * Description of the Span.\n */\n description?: string;\n\n /**\n * Operation of the Span.\n */\n op?: string;\n\n /**\n * Completion status of the Span.\n * See: {@sentry/apm SpanStatus} for possible values\n */\n status?: string;\n\n /**\n * Parent Span ID\n */\n parentSpanId?: string;\n\n /**\n * Was this span chosen to be sent as part of the sample?\n */\n sampled?: boolean;\n\n /**\n * Span ID\n */\n spanId?: string;\n\n /**\n * Trace ID\n */\n traceId?: string;\n\n /**\n * Tags of the Span.\n */\n tags?: { [key: string]: string };\n\n /**\n * Data of the Span.\n */\n data?: { [key: string]: any };\n\n /**\n * Timestamp in seconds (epoch time) indicating when the span started.\n */\n startTimestamp?: number;\n\n /**\n * Timestamp in seconds (epoch time) indicating when the span ended.\n */\n endTimestamp?: number;\n}\n\n/** Span holding trace_id, span_id */\nexport interface Span extends SpanContext {\n /**\n * @inheritDoc\n */\n spanId: string;\n\n /**\n * @inheritDoc\n */\n traceId: string;\n\n /**\n * @inheritDoc\n */\n startTimestamp: number;\n\n /**\n * @inheritDoc\n */\n tags: { [key: string]: string };\n\n /**\n * @inheritDoc\n */\n data: { [key: string]: any };\n\n /**\n * Sets the finish timestamp on the current span.\n * @param endTimestamp Takes an endTimestamp if the end should not be the time when you call this function.\n */\n finish(endTimestamp?: number): void;\n\n /**\n * Sets the tag attribute on the current span\n * @param key Tag key\n * @param value Tag value\n */\n setTag(key: string, value: string): this;\n\n /**\n * Sets the data attribute on the current span\n * @param key Data key\n * @param value Data value\n */\n setData(key: string, value: any): this;\n\n /**\n * Sets the status attribute on the current span\n * See: {@sentry/apm SpanStatus} for possible values\n * @param status http code used to set the status\n */\n setStatus(status: string): this;\n\n /**\n * Sets the status attribute on the current span based on the http code\n * @param httpStatus http code used to set the status\n */\n setHttpStatus(httpStatus: number): this;\n\n /**\n * Use {@link startChild}\n * @deprecated\n */\n child(\n spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'spanId' | 'sampled' | 'traceId' | 'parentSpanId'>>,\n ): Span;\n\n /**\n * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.\n * Also the `sampled` decision will be inherited.\n */\n startChild(\n spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'spanId' | 'sampled' | 'traceId' | 'parentSpanId'>>,\n ): Span;\n\n /**\n * Determines whether span was successful (HTTP200)\n */\n isSuccess(): boolean;\n\n /** Return a traceparent compatible header string */\n toTraceparent(): string;\n\n /** Convert the object to JSON for w. spans array info only */\n getTraceContext(): {\n data?: { [key: string]: any };\n description?: string;\n op?: string;\n parent_span_id?: string;\n span_id: string;\n status?: string;\n tags?: { [key: string]: string };\n trace_id: string;\n };\n /** Convert the object to JSON */\n toJSON(): {\n data?: { [key: string]: any };\n description?: string;\n op?: string;\n parent_span_id?: string;\n span_id: string;\n start_timestamp: number;\n status?: string;\n tags?: { [key: string]: string };\n timestamp?: number;\n trace_id: string;\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"span.js","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"","sourcesContent":["import { Transaction } from './transaction';\n\n/** Interface holding all properties that can be set on a Span on creation. */\nexport interface SpanContext {\n /**\n * Description of the Span.\n */\n description?: string;\n\n /**\n * Operation of the Span.\n */\n op?: string;\n\n /**\n * Completion status of the Span.\n * See: {@sentry/apm SpanStatus} for possible values\n */\n status?: string;\n\n /**\n * Parent Span ID\n */\n parentSpanId?: string;\n\n /**\n * Was this span chosen to be sent as part of the sample?\n */\n sampled?: boolean;\n\n /**\n * Span ID\n */\n spanId?: string;\n\n /**\n * Trace ID\n */\n traceId?: string;\n\n /**\n * Tags of the Span.\n */\n tags?: { [key: string]: string };\n\n /**\n * Data of the Span.\n */\n data?: { [key: string]: any };\n\n /**\n * Timestamp in seconds (epoch time) indicating when the span started.\n */\n startTimestamp?: number;\n\n /**\n * Timestamp in seconds (epoch time) indicating when the span ended.\n */\n endTimestamp?: number;\n}\n\n/** Span holding trace_id, span_id */\nexport interface Span extends SpanContext {\n /**\n * @inheritDoc\n */\n spanId: string;\n\n /**\n * @inheritDoc\n */\n traceId: string;\n\n /**\n * @inheritDoc\n */\n startTimestamp: number;\n\n /**\n * @inheritDoc\n */\n tags: { [key: string]: string };\n\n /**\n * @inheritDoc\n */\n data: { [key: string]: any };\n\n /**\n * The transaction containing this span\n */\n transaction?: Transaction;\n\n /**\n * Sets the finish timestamp on the current span.\n * @param endTimestamp Takes an endTimestamp if the end should not be the time when you call this function.\n */\n finish(endTimestamp?: number): void;\n\n /**\n * Sets the tag attribute on the current span\n * @param key Tag key\n * @param value Tag value\n */\n setTag(key: string, value: string): this;\n\n /**\n * Sets the data attribute on the current span\n * @param key Data key\n * @param value Data value\n */\n setData(key: string, value: any): this;\n\n /**\n * Sets the status attribute on the current span\n * See: {@sentry/apm SpanStatus} for possible values\n * @param status http code used to set the status\n */\n setStatus(status: string): this;\n\n /**\n * Sets the status attribute on the current span based on the http code\n * @param httpStatus http code used to set the status\n */\n setHttpStatus(httpStatus: number): this;\n\n /**\n * Use {@link startChild}\n * @deprecated\n */\n child(\n spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'spanId' | 'sampled' | 'traceId' | 'parentSpanId'>>,\n ): Span;\n\n /**\n * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.\n * Also the `sampled` decision will be inherited.\n */\n startChild(\n spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'spanId' | 'sampled' | 'traceId' | 'parentSpanId'>>,\n ): Span;\n\n /**\n * Determines whether span was successful (HTTP200)\n */\n isSuccess(): boolean;\n\n /** Return a traceparent compatible header string */\n toTraceparent(): string;\n\n /** Convert the object to JSON for w. spans array info only */\n getTraceContext(): {\n data?: { [key: string]: any };\n description?: string;\n op?: string;\n parent_span_id?: string;\n span_id: string;\n status?: string;\n tags?: { [key: string]: string };\n trace_id: string;\n };\n /** Convert the object to JSON */\n toJSON(): {\n data?: { [key: string]: any };\n description?: string;\n op?: string;\n parent_span_id?: string;\n span_id: string;\n start_timestamp: number;\n status?: string;\n tags?: { [key: string]: string };\n timestamp?: number;\n trace_id: string;\n };\n}\n"]}
|
package/dist/transaction.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../src/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,oBAAY,eAAe,GAAG,IAAI,CAAC,kBAAkB,EAAE,SAAS,GAAG,cAAc,GAAG,eAAe,CAAC,CAAC;AAErG;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,kBAAkB,EAAE,IAAI;IAC3D;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAEhC;;OAEG;IACH,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAE7B;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAgB,SAAQ,qBAAqB;IAC5D;;OAEG;IACH,kBA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AAED;;;;GAIG;AACH,MAAM,WAAW,eAAgB,SAAQ,qBAAqB;IAC5D;;OAEG;IACH,kBAAkB,EAAE,kBAAkB,CAAC;IAEvC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,wBAAwB,CAAC;CACpC"}
|
package/dist/transaction.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../src/transaction.ts"],"names":[],"mappings":"","sourcesContent":["import { ExtractedNodeRequestData, WorkerLocation } from './misc';\nimport { Span, SpanContext } from './span';\n\n/**\n * Interface holding Transaction-specific properties\n */\nexport interface TransactionContext extends SpanContext {\n /**\n * Human-readable identifier for the transaction\n */\n name: string;\n\n /**\n * If true, sets the end timestamp of the transaction to the highest timestamp of child spans, trimming\n * the duration of the transaction. This is useful to discard extra time in the transaction that is not\n * accounted for in child spans, like what happens in the idle transaction Tracing integration, where we finish the\n * transaction after a given \"idle time\" and we don't want this \"idle time\" to be part of the transaction.\n */\n trimEnd?: boolean;\n\n /**\n * If this transaction has a parent, the parent's sampling decision\n */\n parentSampled?: boolean;\n}\n\n/**\n * Data pulled from a `sentry-trace` header\n */\nexport type TraceparentData = Pick<TransactionContext, 'traceId' | 'parentSpanId' | 'parentSampled'>;\n\n/**\n * Transaction \"Class\", inherits Span only has `setName`\n */\nexport interface Transaction extends TransactionContext, Span {\n /**\n * @inheritDoc\n */\n spanId: string;\n\n /**\n * @inheritDoc\n */\n traceId: string;\n\n /**\n * @inheritDoc\n */\n startTimestamp: number;\n\n /**\n * @inheritDoc\n */\n tags: { [key: string]: string };\n\n /**\n * @inheritDoc\n */\n data: { [key: string]: any };\n\n /**\n * Set the name of the transaction\n */\n setName(name: string): void;\n}\n\n/**\n * Context data passed by the user when starting a transaction, to be used by the tracesSampler method.\n */\nexport interface CustomSamplingContext {\n [key: string]: any;\n}\n\n/**\n * Data passed to the `tracesSampler` function, which forms the basis for whatever decisions it might make.\n *\n * Adds default data to data provided by the user. See {@link Hub.startTransaction}\n */\nexport interface SamplingContext extends CustomSamplingContext {\n /**\n * Context data with which transaction being sampled was created\n */\n transactionContext: TransactionContext;\n\n /**\n * Sampling decision from the parent transaction, if any.\n */\n parentSampled?: boolean;\n\n /**\n * Object representing the URL of the current page or worker script. Passed by default in a browser or service worker\n * context.\n */\n location?: WorkerLocation;\n\n /**\n * Object representing the incoming request to a node server. Passed by default when using the TracingHandler.\n */\n request?: ExtractedNodeRequestData;\n}\n
|
|
1
|
+
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../src/transaction.ts"],"names":[],"mappings":"","sourcesContent":["import { ExtractedNodeRequestData, WorkerLocation } from './misc';\nimport { Span, SpanContext } from './span';\n\n/**\n * Interface holding Transaction-specific properties\n */\nexport interface TransactionContext extends SpanContext {\n /**\n * Human-readable identifier for the transaction\n */\n name: string;\n\n /**\n * If true, sets the end timestamp of the transaction to the highest timestamp of child spans, trimming\n * the duration of the transaction. This is useful to discard extra time in the transaction that is not\n * accounted for in child spans, like what happens in the idle transaction Tracing integration, where we finish the\n * transaction after a given \"idle time\" and we don't want this \"idle time\" to be part of the transaction.\n */\n trimEnd?: boolean;\n\n /**\n * If this transaction has a parent, the parent's sampling decision\n */\n parentSampled?: boolean;\n}\n\n/**\n * Data pulled from a `sentry-trace` header\n */\nexport type TraceparentData = Pick<TransactionContext, 'traceId' | 'parentSpanId' | 'parentSampled'>;\n\n/**\n * Transaction \"Class\", inherits Span only has `setName`\n */\nexport interface Transaction extends TransactionContext, Span {\n /**\n * @inheritDoc\n */\n spanId: string;\n\n /**\n * @inheritDoc\n */\n traceId: string;\n\n /**\n * @inheritDoc\n */\n startTimestamp: number;\n\n /**\n * @inheritDoc\n */\n tags: { [key: string]: string };\n\n /**\n * @inheritDoc\n */\n data: { [key: string]: any };\n\n /**\n * Set the name of the transaction\n */\n setName(name: string): void;\n}\n\n/**\n * Context data passed by the user when starting a transaction, to be used by the tracesSampler method.\n */\nexport interface CustomSamplingContext {\n [key: string]: any;\n}\n\n/**\n * Data passed to the `tracesSampler` function, which forms the basis for whatever decisions it might make.\n *\n * Adds default data to data provided by the user. See {@link Hub.startTransaction}\n */\nexport interface SamplingContext extends CustomSamplingContext {\n /**\n * Context data with which transaction being sampled was created\n */\n transactionContext: TransactionContext;\n\n /**\n * Sampling decision from the parent transaction, if any.\n */\n parentSampled?: boolean;\n\n /**\n * Object representing the URL of the current page or worker script. Passed by default in a browser or service worker\n * context.\n */\n location?: WorkerLocation;\n\n /**\n * Object representing the incoming request to a node server. Passed by default when using the TracingHandler.\n */\n request?: ExtractedNodeRequestData;\n}\n"]}
|
package/dist/transport.d.ts
CHANGED
|
@@ -9,12 +9,6 @@ export interface Transport {
|
|
|
9
9
|
* @param body String body that should be sent to Sentry.
|
|
10
10
|
*/
|
|
11
11
|
sendEvent(event: Event): PromiseLike<Response>;
|
|
12
|
-
/**
|
|
13
|
-
* Sends the body to the Store endpoint in Sentry.
|
|
14
|
-
*
|
|
15
|
-
* @param body String body that should be sent to Sentry.
|
|
16
|
-
*/
|
|
17
|
-
sendSession?(session: any): PromiseLike<Response>;
|
|
18
12
|
/**
|
|
19
13
|
* Call this function to wait until all pending requests have been sent.
|
|
20
14
|
*
|
package/dist/transport.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,4CAA4C;AAC5C,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IAE/C;;;;OAIG;
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,4CAA4C;AAC5C,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IAE/C;;;;OAIG;IACH,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;CAC/C;AAED,YAAY;AACZ,oBAAY,cAAc,CAAC,CAAC,SAAS,SAAS,IAAI,KAAK,OAAO,EAAE,gBAAgB,KAAK,CAAC,CAAC;AAEvF,YAAY;AACZ,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB;IACjB,GAAG,EAAE,OAAO,CAAC;IACb,4BAA4B;IAC5B,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACpC,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,eAAe,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CAC7C"}
|
package/dist/transport.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"","sourcesContent":["import { DsnLike } from './dsn';\nimport { Event } from './event';\nimport { Response } from './response';\n\n/** Transport used sending data to Sentry */\nexport interface Transport {\n /**\n * Sends the body to the Store endpoint in Sentry.\n *\n * @param body String body that should be sent to Sentry.\n */\n sendEvent(event: Event): PromiseLike<Response>;\n\n /**\n *
|
|
1
|
+
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"","sourcesContent":["import { DsnLike } from './dsn';\nimport { Event } from './event';\nimport { Response } from './response';\n\n/** Transport used sending data to Sentry */\nexport interface Transport {\n /**\n * Sends the body to the Store endpoint in Sentry.\n *\n * @param body String body that should be sent to Sentry.\n */\n sendEvent(event: Event): PromiseLike<Response>;\n\n /**\n * Call this function to wait until all pending requests have been sent.\n *\n * @param timeout Number time in ms to wait until the buffer is drained.\n */\n close(timeout?: number): PromiseLike<boolean>;\n}\n\n/** JSDoc */\nexport type TransportClass<T extends Transport> = new (options: TransportOptions) => T;\n\n/** JSDoc */\nexport interface TransportOptions {\n /** Sentry DSN */\n dsn: DsnLike;\n /** Define custom headers */\n headers?: { [key: string]: string };\n /** Set a HTTP proxy that should be used for outbound requests. */\n httpProxy?: string;\n /** Set a HTTPS proxy that should be used for outbound requests. */\n httpsProxy?: string;\n /** HTTPS proxy certificates path */\n caCerts?: string;\n /** Fetch API init parameters */\n fetchParameters?: { [key: string]: string };\n}\n"]}
|
package/esm/client.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { Event, EventHint } from './event';
|
|
|
3
3
|
import { Integration, IntegrationClass } from './integration';
|
|
4
4
|
import { Options } from './options';
|
|
5
5
|
import { Scope } from './scope';
|
|
6
|
-
import { Session } from './session';
|
|
7
6
|
import { Severity } from './severity';
|
|
8
7
|
/**
|
|
9
8
|
* User-Facing Sentry SDK Client.
|
|
@@ -43,11 +42,6 @@ export interface Client<O extends Options = Options> {
|
|
|
43
42
|
* @returns The event id
|
|
44
43
|
*/
|
|
45
44
|
captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined;
|
|
46
|
-
/** Captures a session
|
|
47
|
-
*
|
|
48
|
-
* @param session Session to be delivered
|
|
49
|
-
*/
|
|
50
|
-
captureSession(session: Session): void;
|
|
51
45
|
/** Returns the current Dsn. */
|
|
52
46
|
getDsn(): Dsn | undefined;
|
|
53
47
|
/** Returns the current options. */
|
package/esm/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;GAQG;AACH,MAAM,WAAW,MAAM,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO;IACjD;;;;;;;OAOG;IACH,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IAEtF;;;;;;;;OAQG;IACH,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IAEvG;;;;;;;OAOG;IACH,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IAEhF,+BAA+B;IAC/B,MAAM,IAAI,GAAG,GAAG,SAAS,CAAC;IAE1B,mCAAmC;IACnC,UAAU,IAAI,CAAC,CAAC;IAEhB;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAE9C;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAE9C,gEAAgE;IAChE,cAAc,CAAC,CAAC,SAAS,WAAW,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAElF,2FAA2F;IAC3F,iBAAiB,IAAI,IAAI,CAAC;CAC3B"}
|
package/esm/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"","sourcesContent":["import { Dsn } from './dsn';\nimport { Event, EventHint } from './event';\nimport { Integration, IntegrationClass } from './integration';\nimport { Options } from './options';\nimport { Scope } from './scope';\nimport {
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"","sourcesContent":["import { Dsn } from './dsn';\nimport { Event, EventHint } from './event';\nimport { Integration, IntegrationClass } from './integration';\nimport { Options } from './options';\nimport { Scope } from './scope';\nimport { Severity } from './severity';\n\n/**\n * User-Facing Sentry SDK Client.\n *\n * This interface contains all methods to interface with the SDK once it has\n * been installed. It allows to send events to Sentry, record breadcrumbs and\n * set a context included in every event. Since the SDK mutates its environment,\n * there will only be one instance during runtime.\n *\n */\nexport interface Client<O extends Options = Options> {\n /**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @param hint May contain additional information about the original exception.\n * @param scope An optional scope containing event metadata.\n * @returns The event id\n */\n captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined;\n\n /**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @param hint May contain additional information about the original exception.\n * @param scope An optional scope containing event metadata.\n * @returns The event id\n */\n captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined;\n\n /**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope An optional scope containing event metadata.\n * @returns The event id\n */\n captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined;\n\n /** Returns the current Dsn. */\n getDsn(): Dsn | undefined;\n\n /** Returns the current options. */\n getOptions(): O;\n\n /**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\n close(timeout?: number): PromiseLike<boolean>;\n\n /**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\n flush(timeout?: number): PromiseLike<boolean>;\n\n /** Returns an array of installed integrations on the client. */\n getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null;\n\n /** This is an internal function to setup all integrations that should run on the client */\n setupIntegrations(): void;\n}\n"]}
|
package/esm/context.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,oBAAY,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC9C,oBAAY,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}
|
package/esm/context.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"","sourcesContent":["export type Context = Record<string, unknown>;\nexport type Contexts = Record<string, Context>;\n"]}
|
package/esm/event.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Breadcrumb } from './breadcrumb';
|
|
2
|
+
import { Contexts } from './context';
|
|
2
3
|
import { Exception } from './exception';
|
|
4
|
+
import { Extras } from './extra';
|
|
3
5
|
import { Request } from './request';
|
|
4
6
|
import { CaptureContext } from './scope';
|
|
5
7
|
import { SdkInfo } from './sdkinfo';
|
|
6
8
|
import { Severity } from './severity';
|
|
7
9
|
import { Span } from './span';
|
|
8
10
|
import { Stacktrace } from './stacktrace';
|
|
9
|
-
import { Measurements } from './transaction';
|
|
10
11
|
import { User } from './user';
|
|
11
12
|
/** JSDoc */
|
|
12
13
|
export interface Event {
|
|
@@ -33,19 +34,14 @@ export interface Event {
|
|
|
33
34
|
};
|
|
34
35
|
stacktrace?: Stacktrace;
|
|
35
36
|
breadcrumbs?: Breadcrumb[];
|
|
36
|
-
contexts?:
|
|
37
|
-
[key: string]: Record<any, any>;
|
|
38
|
-
};
|
|
37
|
+
contexts?: Contexts;
|
|
39
38
|
tags?: {
|
|
40
39
|
[key: string]: string;
|
|
41
40
|
};
|
|
42
|
-
extra?:
|
|
43
|
-
[key: string]: any;
|
|
44
|
-
};
|
|
41
|
+
extra?: Extras;
|
|
45
42
|
user?: User;
|
|
46
43
|
type?: EventType;
|
|
47
44
|
spans?: Span[];
|
|
48
|
-
measurements?: Measurements;
|
|
49
45
|
}
|
|
50
46
|
/** JSDoc */
|
|
51
47
|
export declare type EventType = 'transaction';
|
package/esm/event.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,YAAY;AACZ,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC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