@sentry/types 6.3.0-beta.4 → 6.3.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/debugMeta.d.ts +6 -3
- package/dist/debugMeta.d.ts.map +1 -1
- package/dist/debugMeta.js.map +1 -1
- package/dist/hub.d.ts +4 -0
- 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.map +1 -1
- package/dist/span.d.ts +1 -15
- package/dist/span.d.ts.map +1 -1
- package/dist/span.js.map +1 -1
- package/dist/transaction.d.ts +0 -15
- package/dist/transaction.d.ts.map +1 -1
- package/dist/transaction.js.map +1 -1
- package/esm/debugMeta.d.ts +6 -3
- package/esm/debugMeta.d.ts.map +1 -1
- package/esm/debugMeta.js.map +1 -1
- package/esm/hub.d.ts +4 -0
- 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.map +1 -1
- package/esm/span.d.ts +1 -15
- package/esm/span.d.ts.map +1 -1
- package/esm/span.js.map +1 -1
- package/esm/transaction.d.ts +0 -15
- package/esm/transaction.d.ts.map +1 -1
- package/esm/transaction.js.map +1 -1
- package/package.json +2 -2
package/dist/debugMeta.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { TransactionMetadata } from './transaction';
|
|
2
1
|
/**
|
|
3
2
|
* Holds meta information to customize the behavior of sentry's event processing.
|
|
4
3
|
**/
|
|
5
|
-
export
|
|
4
|
+
export interface DebugMeta {
|
|
6
5
|
images?: Array<DebugImage>;
|
|
7
|
-
|
|
6
|
+
transactionSampling?: {
|
|
7
|
+
rate?: number;
|
|
8
|
+
method?: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
8
11
|
/**
|
|
9
12
|
* Possible choices for debug images.
|
|
10
13
|
*/
|
package/dist/debugMeta.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugMeta.d.ts","sourceRoot":"","sources":["../src/debugMeta.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"debugMeta.d.ts","sourceRoot":"","sources":["../src/debugMeta.ts"],"names":[],"mappings":"AAAA;;IAEI;AACJ,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC3B,mBAAmB,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC1D;AAED;;GAEG;AACH,oBAAY,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,IAAI,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B"}
|
package/dist/debugMeta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugMeta.js","sourceRoot":"","sources":["../src/debugMeta.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"debugMeta.js","sourceRoot":"","sources":["../src/debugMeta.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Holds meta information to customize the behavior of sentry's event processing.\n **/\nexport interface DebugMeta {\n images?: Array<DebugImage>;\n transactionSampling?: { rate?: number; method?: string };\n}\n\n/**\n * Possible choices for debug images.\n */\nexport type DebugImageType = 'wasm' | 'macho' | 'elf' | 'pe';\n\n/**\n * References to debug images.\n */\nexport interface DebugImage {\n type: DebugImageType;\n debug_id: string;\n code_id?: string | null;\n code_file: string;\n debug_file?: string | null;\n}\n"]}
|
package/dist/hub.d.ts
CHANGED
|
@@ -160,6 +160,10 @@ export interface Hub {
|
|
|
160
160
|
run(callback: (hub: Hub) => void): void;
|
|
161
161
|
/** Returns the integration if installed on the current client. */
|
|
162
162
|
getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null;
|
|
163
|
+
/** Returns all trace headers that are currently on the top scope. */
|
|
164
|
+
traceHeaders(): {
|
|
165
|
+
[key: string]: string;
|
|
166
|
+
};
|
|
163
167
|
/**
|
|
164
168
|
* @deprecated No longer does anything. Use use {@link Transaction.startChild} instead.
|
|
165
169
|
*/
|
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,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B;;;GAGG;AACH,MAAM,WAAW,GAAG;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rE,YAAY,IAAI;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAE1C;;OAEG;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;IAE1G;;;;;;;;;;;OAWG;IACH,YAAY,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC;IAEhD;;OAEG;IACH,UAAU,IAAI,IAAI,CAAC;IAEnB;;;OAGG;IACH,cAAc,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;CAC3C"}
|
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 { Primitive } from './misc';\nimport { Scope } from './scope';\nimport { Session, SessionContext } from './session';\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 *\n * @param tags Tags context object to merge into current context.\n */\n setTags(tags: { [key: string]: Primitive }): void;\n\n /**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\n setTag(key: string, value: Primitive): 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 /**\n * @deprecated No longer does anything. Use use {@link Transaction.startChild} instead.\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 /**\n * Starts a new `Session`, sets on the current scope and returns it.\n *\n * To finish a `session`, it has to be passed directly to `client.captureSession`, which is done automatically\n * when using `hub.endSession()` for the session currently stored on the scope.\n *\n * When there's already an existing session on the scope, it'll be automatically ended.\n *\n * @param context Optional properties of the new `Session`.\n *\n * @returns The session which was just started\n */\n startSession(context?: SessionContext): Session;\n\n /**\n * Ends the session that lives on the current scope and sends it to Sentry\n */\n endSession(): void;\n\n /**\n * Sends the current session on the scope to Sentry\n * @param endSession If set the session will be marked as exited and removed from the scope\n */\n captureSession(endSession: boolean): void;\n}\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 { Primitive } from './misc';\nimport { Scope } from './scope';\nimport { Session, SessionContext } from './session';\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 *\n * @param tags Tags context object to merge into current context.\n */\n setTags(tags: { [key: string]: Primitive }): void;\n\n /**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\n setTag(key: string, value: Primitive): 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 * @deprecated No longer does anything. Use use {@link Transaction.startChild} instead.\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 /**\n * Starts a new `Session`, sets on the current scope and returns it.\n *\n * To finish a `session`, it has to be passed directly to `client.captureSession`, which is done automatically\n * when using `hub.endSession()` for the session currently stored on the scope.\n *\n * When there's already an existing session on the scope, it'll be automatically ended.\n *\n * @param context Optional properties of the new `Session`.\n *\n * @returns The session which was just started\n */\n startSession(context?: SessionContext): Session;\n\n /**\n * Ends the session that lives on the current scope and sends it to Sentry\n */\n endSession(): void;\n\n /**\n * Sends the current session on the scope to Sentry\n * @param endSession If set the session will be marked as exited and removed from the scope\n */\n captureSession(endSession: boolean): void;\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -23,11 +23,11 @@ export { SdkInfo } from './sdkinfo';
|
|
|
23
23
|
export { SdkMetadata } from './sdkmetadata';
|
|
24
24
|
export { Session, SessionContext, SessionStatus } from './session';
|
|
25
25
|
export { Severity } from './severity';
|
|
26
|
-
export { Span, SpanContext
|
|
26
|
+
export { Span, SpanContext } from './span';
|
|
27
27
|
export { StackFrame } from './stackframe';
|
|
28
28
|
export { Stacktrace } from './stacktrace';
|
|
29
29
|
export { Status } from './status';
|
|
30
|
-
export { CustomSamplingContext, Measurements, SamplingContext, TraceparentData, Transaction, TransactionContext,
|
|
30
|
+
export { CustomSamplingContext, Measurements, SamplingContext, TraceparentData, Transaction, TransactionContext, TransactionSamplingMethod, } from './transaction';
|
|
31
31
|
export { Thread } from './thread';
|
|
32
32
|
export { Transport, TransportOptions, TransportClass } from './transport';
|
|
33
33
|
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,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM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,MAAM,WAAW,CAAC;AACnE,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,YAAY,EACZ,eAAe,EACf,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,yBAAyB,GAC1B,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.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAYA,uCAAsC;AAA7B,8BAAA,QAAQ,CAAA;AAWjB,qCAAmE;AAAjC,kCAAA,aAAa,CAAA;AAC/C,uCAAsC;AAA7B,8BAAA,QAAQ,CAAA;AAIjB,mCAAkC;AAAzB,0BAAA,MAAM,CAAA;AACf,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAYA,uCAAsC;AAA7B,8BAAA,QAAQ,CAAA;AAWjB,qCAAmE;AAAjC,kCAAA,aAAa,CAAA;AAC/C,uCAAsC;AAA7B,8BAAA,QAAQ,CAAA;AAIjB,mCAAkC;AAAzB,0BAAA,MAAM,CAAA;AACf,6CAQuB;AADrB,kDAAA,yBAAyB,CAAA","sourcesContent":["export { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nexport { Client } from './client';\nexport { Context, Contexts } from './context';\nexport { Dsn, DsnComponents, DsnLike, DsnProtocol } from './dsn';\nexport { DebugImage, DebugImageType, DebugMeta } from './debugMeta';\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, Primitive, WorkerLocation } from './misc';\nexport { Options } from './options';\nexport { Package } from './package';\nexport { Request, SentryRequest, SentryRequestType } from './request';\nexport { Response } from './response';\nexport { Runtime } from './runtime';\nexport { CaptureContext, Scope, ScopeContext } from './scope';\nexport { SdkInfo } from './sdkinfo';\nexport { SdkMetadata } from './sdkmetadata';\nexport { Session, SessionContext, SessionStatus } from './session';\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 Measurements,\n SamplingContext,\n TraceparentData,\n Transaction,\n TransactionContext,\n TransactionSamplingMethod,\n} from './transaction';\nexport { Thread } from './thread';\nexport { Transport, TransportOptions, TransportClass } from './transport';\nexport { User } from './user';\nexport { WrappedFunction } from './wrappedfunction';\n"]}
|
package/dist/span.d.ts
CHANGED
|
@@ -127,22 +127,12 @@ export interface Span extends SpanContext {
|
|
|
127
127
|
* Determines whether span was successful (HTTP200)
|
|
128
128
|
*/
|
|
129
129
|
isSuccess(): boolean;
|
|
130
|
-
/**
|
|
131
|
-
* Return a traceparent-compatible header string
|
|
132
|
-
*
|
|
133
|
-
* @deprecated Do not use `span.toTraceparnt` directly. Use `span.getTraceHeaders` instead.
|
|
134
|
-
*/
|
|
130
|
+
/** Return a traceparent compatible header string */
|
|
135
131
|
toTraceparent(): string;
|
|
136
132
|
/** Returns the current span properties as a `SpanContext` */
|
|
137
133
|
toContext(): SpanContext;
|
|
138
134
|
/** Updates the current span with a new `SpanContext` */
|
|
139
135
|
updateWithContext(spanContext: SpanContext): this;
|
|
140
|
-
/**
|
|
141
|
-
* Get headers to attach to any outgoing requests made by the operation corresponding to the current span
|
|
142
|
-
*
|
|
143
|
-
* @returns An object containing the headers
|
|
144
|
-
*/
|
|
145
|
-
getTraceHeaders(): TraceHeaders;
|
|
146
136
|
/** Convert the object to JSON for w. spans array info only */
|
|
147
137
|
getTraceContext(): {
|
|
148
138
|
data?: {
|
|
@@ -176,8 +166,4 @@ export interface Span extends SpanContext {
|
|
|
176
166
|
trace_id: string;
|
|
177
167
|
};
|
|
178
168
|
}
|
|
179
|
-
export declare type TraceHeaders = {
|
|
180
|
-
'sentry-trace': string;
|
|
181
|
-
tracestate?: string;
|
|
182
|
-
};
|
|
183
169
|
//# sourceMappingURL=span.d.ts.map
|
package/dist/span.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,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,GA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AI;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,SAAS,CAAA;SAAE,CAAC;QACpC,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,SAAS,CAAA;SAAE,CAAC;QACpC,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":["import { Primitive } from './misc';\nimport { 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/tracing 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]: Primitive };\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]: Primitive };\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 *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key Tag key\n * @param value Tag value\n */\n setTag(key: string, value: Primitive): 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/tracing 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
|
|
1
|
+
{"version":3,"file":"span.js","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"","sourcesContent":["import { Primitive } from './misc';\nimport { 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/tracing 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]: Primitive };\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]: Primitive };\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 *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key Tag key\n * @param value Tag value\n */\n setTag(key: string, value: Primitive): 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/tracing 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 /** Returns the current span properties as a `SpanContext` */\n toContext(): SpanContext;\n\n /** Updates the current span with a new `SpanContext` */\n updateWithContext(spanContext: SpanContext): this;\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]: Primitive };\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]: Primitive };\n timestamp?: number;\n trace_id: string;\n };\n}\n"]}
|
package/dist/transaction.d.ts
CHANGED
|
@@ -19,10 +19,6 @@ export interface TransactionContext extends SpanContext {
|
|
|
19
19
|
* If this transaction has a parent, the parent's sampling decision
|
|
20
20
|
*/
|
|
21
21
|
parentSampled?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Metadata associated with the transaction, for internal SDK use.
|
|
24
|
-
*/
|
|
25
|
-
metadata?: TransactionMetadata;
|
|
26
22
|
}
|
|
27
23
|
/**
|
|
28
24
|
* Data pulled from a `sentry-trace` header
|
|
@@ -104,15 +100,4 @@ export declare enum TransactionSamplingMethod {
|
|
|
104
100
|
Rate = "client_rate",
|
|
105
101
|
Inheritance = "inheritance"
|
|
106
102
|
}
|
|
107
|
-
export interface TransactionMetadata {
|
|
108
|
-
transactionSampling?: {
|
|
109
|
-
rate?: number;
|
|
110
|
-
method?: string;
|
|
111
|
-
};
|
|
112
|
-
/** The two halves (sentry and third-party) of a transaction's tracestate header, used for dynamic sampling */
|
|
113
|
-
tracestate?: {
|
|
114
|
-
sentry?: string;
|
|
115
|
-
thirdparty?: string;
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
103
|
//# sourceMappingURL=transaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../src/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7E,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;
|
|
1
|
+
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../src/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW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CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE7D,oBAAY,yBAAyB;IACnC,QAAQ,mBAAmB;IAC3B,OAAO,mBAAmB;IAC1B,IAAI,gBAAgB;IACpB,WAAW,gBAAgB;CAC5B"}
|
package/dist/transaction.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../src/transaction.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../src/transaction.ts"],"names":[],"mappings":";AA6GA,IAAY,yBAKX;AALD,WAAY,yBAAyB;IACnC,wDAA2B,CAAA;IAC3B,uDAA0B,CAAA;IAC1B,iDAAoB,CAAA;IACpB,wDAA2B,CAAA;AAC7B,CAAC,EALW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAKpC","sourcesContent":["import { ExtractedNodeRequestData, Primitive, 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]: Primitive };\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 /** Returns the current transaction properties as a `TransactionContext` */\n toContext(): TransactionContext;\n\n /** Updates the current transaction with a new `TransactionContext` */\n updateWithContext(transactionContext: TransactionContext): this;\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 when using the `BrowserTracing`\n * integration.\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\nexport type Measurements = Record<string, { value: number }>;\n\nexport enum TransactionSamplingMethod {\n Explicit = 'explicitly_set',\n Sampler = 'client_sampler',\n Rate = 'client_rate',\n Inheritance = 'inheritance',\n}\n"]}
|
package/esm/debugMeta.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { TransactionMetadata } from './transaction';
|
|
2
1
|
/**
|
|
3
2
|
* Holds meta information to customize the behavior of sentry's event processing.
|
|
4
3
|
**/
|
|
5
|
-
export
|
|
4
|
+
export interface DebugMeta {
|
|
6
5
|
images?: Array<DebugImage>;
|
|
7
|
-
|
|
6
|
+
transactionSampling?: {
|
|
7
|
+
rate?: number;
|
|
8
|
+
method?: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
8
11
|
/**
|
|
9
12
|
* Possible choices for debug images.
|
|
10
13
|
*/
|
package/esm/debugMeta.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugMeta.d.ts","sourceRoot":"","sources":["../src/debugMeta.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"debugMeta.d.ts","sourceRoot":"","sources":["../src/debugMeta.ts"],"names":[],"mappings":"AAAA;;IAEI;AACJ,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC3B,mBAAmB,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC1D;AAED;;GAEG;AACH,oBAAY,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,IAAI,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B"}
|
package/esm/debugMeta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugMeta.js","sourceRoot":"","sources":["../src/debugMeta.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"debugMeta.js","sourceRoot":"","sources":["../src/debugMeta.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Holds meta information to customize the behavior of sentry's event processing.\n **/\nexport interface DebugMeta {\n images?: Array<DebugImage>;\n transactionSampling?: { rate?: number; method?: string };\n}\n\n/**\n * Possible choices for debug images.\n */\nexport type DebugImageType = 'wasm' | 'macho' | 'elf' | 'pe';\n\n/**\n * References to debug images.\n */\nexport interface DebugImage {\n type: DebugImageType;\n debug_id: string;\n code_id?: string | null;\n code_file: string;\n debug_file?: string | null;\n}\n"]}
|
package/esm/hub.d.ts
CHANGED
|
@@ -160,6 +160,10 @@ export interface Hub {
|
|
|
160
160
|
run(callback: (hub: Hub) => void): void;
|
|
161
161
|
/** Returns the integration if installed on the current client. */
|
|
162
162
|
getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null;
|
|
163
|
+
/** Returns all trace headers that are currently on the top scope. */
|
|
164
|
+
traceHeaders(): {
|
|
165
|
+
[key: string]: string;
|
|
166
|
+
};
|
|
163
167
|
/**
|
|
164
168
|
* @deprecated No longer does anything. Use use {@link Transaction.startChild} instead.
|
|
165
169
|
*/
|
package/esm/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,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B;;;GAGG;AACH,MAAM,WAAW,GAAG;IAClB;;;;;;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AI;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAE1C;;OAEG;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;IAE1G;;;;;;;;;;;OAWG;IACH,YAAY,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC;IAEhD;;OAEG;IACH,UAAU,IAAI,IAAI,CAAC;IAEnB;;;OAGG;IACH,cAAc,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;CAC3C"}
|
package/esm/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 { Primitive } from './misc';\nimport { Scope } from './scope';\nimport { Session, SessionContext } from './session';\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 *\n * @param tags Tags context object to merge into current context.\n */\n setTags(tags: { [key: string]: Primitive }): void;\n\n /**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\n setTag(key: string, value: Primitive): 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 /**\n * @deprecated No longer does anything. Use use {@link Transaction.startChild} instead.\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 /**\n * Starts a new `Session`, sets on the current scope and returns it.\n *\n * To finish a `session`, it has to be passed directly to `client.captureSession`, which is done automatically\n * when using `hub.endSession()` for the session currently stored on the scope.\n *\n * When there's already an existing session on the scope, it'll be automatically ended.\n *\n * @param context Optional properties of the new `Session`.\n *\n * @returns The session which was just started\n */\n startSession(context?: SessionContext): Session;\n\n /**\n * Ends the session that lives on the current scope and sends it to Sentry\n */\n endSession(): void;\n\n /**\n * Sends the current session on the scope to Sentry\n * @param endSession If set the session will be marked as exited and removed from the scope\n */\n captureSession(endSession: boolean): void;\n}\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 { Primitive } from './misc';\nimport { Scope } from './scope';\nimport { Session, SessionContext } from './session';\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 *\n * @param tags Tags context object to merge into current context.\n */\n setTags(tags: { [key: string]: Primitive }): void;\n\n /**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\n setTag(key: string, value: Primitive): 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 * @deprecated No longer does anything. Use use {@link Transaction.startChild} instead.\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 /**\n * Starts a new `Session`, sets on the current scope and returns it.\n *\n * To finish a `session`, it has to be passed directly to `client.captureSession`, which is done automatically\n * when using `hub.endSession()` for the session currently stored on the scope.\n *\n * When there's already an existing session on the scope, it'll be automatically ended.\n *\n * @param context Optional properties of the new `Session`.\n *\n * @returns The session which was just started\n */\n startSession(context?: SessionContext): Session;\n\n /**\n * Ends the session that lives on the current scope and sends it to Sentry\n */\n endSession(): void;\n\n /**\n * Sends the current session on the scope to Sentry\n * @param endSession If set the session will be marked as exited and removed from the scope\n */\n captureSession(endSession: boolean): void;\n}\n"]}
|
package/esm/index.d.ts
CHANGED
|
@@ -23,11 +23,11 @@ export { SdkInfo } from './sdkinfo';
|
|
|
23
23
|
export { SdkMetadata } from './sdkmetadata';
|
|
24
24
|
export { Session, SessionContext, SessionStatus } from './session';
|
|
25
25
|
export { Severity } from './severity';
|
|
26
|
-
export { Span, SpanContext
|
|
26
|
+
export { Span, SpanContext } from './span';
|
|
27
27
|
export { StackFrame } from './stackframe';
|
|
28
28
|
export { Stacktrace } from './stacktrace';
|
|
29
29
|
export { Status } from './status';
|
|
30
|
-
export { CustomSamplingContext, Measurements, SamplingContext, TraceparentData, Transaction, TransactionContext,
|
|
30
|
+
export { CustomSamplingContext, Measurements, SamplingContext, TraceparentData, Transaction, TransactionContext, TransactionSamplingMethod, } from './transaction';
|
|
31
31
|
export { Thread } from './thread';
|
|
32
32
|
export { Transport, TransportOptions, TransportClass } from './transport';
|
|
33
33
|
export { User } from './user';
|
package/esm/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,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CA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,CAAC;AACnE,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,YAAY,EACZ,eAAe,EACf,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,yBAAyB,GAC1B,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/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAWtC,OAAO,EAA2B,aAAa,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAItC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAWtC,OAAO,EAA2B,aAAa,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAItC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAOL,yBAAyB,GAC1B,MAAM,eAAe,CAAC","sourcesContent":["export { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nexport { Client } from './client';\nexport { Context, Contexts } from './context';\nexport { Dsn, DsnComponents, DsnLike, DsnProtocol } from './dsn';\nexport { DebugImage, DebugImageType, DebugMeta } from './debugMeta';\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, Primitive, WorkerLocation } from './misc';\nexport { Options } from './options';\nexport { Package } from './package';\nexport { Request, SentryRequest, SentryRequestType } from './request';\nexport { Response } from './response';\nexport { Runtime } from './runtime';\nexport { CaptureContext, Scope, ScopeContext } from './scope';\nexport { SdkInfo } from './sdkinfo';\nexport { SdkMetadata } from './sdkmetadata';\nexport { Session, SessionContext, SessionStatus } from './session';\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 Measurements,\n SamplingContext,\n TraceparentData,\n Transaction,\n TransactionContext,\n TransactionSamplingMethod,\n} from './transaction';\nexport { Thread } from './thread';\nexport { Transport, TransportOptions, TransportClass } from './transport';\nexport { User } from './user';\nexport { WrappedFunction } from './wrappedfunction';\n"]}
|
package/esm/span.d.ts
CHANGED
|
@@ -127,22 +127,12 @@ export interface Span extends SpanContext {
|
|
|
127
127
|
* Determines whether span was successful (HTTP200)
|
|
128
128
|
*/
|
|
129
129
|
isSuccess(): boolean;
|
|
130
|
-
/**
|
|
131
|
-
* Return a traceparent-compatible header string
|
|
132
|
-
*
|
|
133
|
-
* @deprecated Do not use `span.toTraceparnt` directly. Use `span.getTraceHeaders` instead.
|
|
134
|
-
*/
|
|
130
|
+
/** Return a traceparent compatible header string */
|
|
135
131
|
toTraceparent(): string;
|
|
136
132
|
/** Returns the current span properties as a `SpanContext` */
|
|
137
133
|
toContext(): SpanContext;
|
|
138
134
|
/** Updates the current span with a new `SpanContext` */
|
|
139
135
|
updateWithContext(spanContext: SpanContext): this;
|
|
140
|
-
/**
|
|
141
|
-
* Get headers to attach to any outgoing requests made by the operation corresponding to the current span
|
|
142
|
-
*
|
|
143
|
-
* @returns An object containing the headers
|
|
144
|
-
*/
|
|
145
|
-
getTraceHeaders(): TraceHeaders;
|
|
146
136
|
/** Convert the object to JSON for w. spans array info only */
|
|
147
137
|
getTraceContext(): {
|
|
148
138
|
data?: {
|
|
@@ -176,8 +166,4 @@ export interface Span extends SpanContext {
|
|
|
176
166
|
trace_id: string;
|
|
177
167
|
};
|
|
178
168
|
}
|
|
179
|
-
export declare type TraceHeaders = {
|
|
180
|
-
'sentry-trace': string;
|
|
181
|
-
tracestate?: string;
|
|
182
|
-
};
|
|
183
169
|
//# sourceMappingURL=span.d.ts.map
|
package/esm/span.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,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;;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,EAAE,WAAW,GAAG,IAAI,CAAC;IAElD,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,SAAS,CAAA;SAAE,CAAC;QACpC,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,SAAS,CAAA;SAAE,CAAC;QACpC,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH"}
|
package/esm/span.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"span.js","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"","sourcesContent":["import { Primitive } from './misc';\nimport { 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/tracing 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]: Primitive };\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]: Primitive };\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 *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key Tag key\n * @param value Tag value\n */\n setTag(key: string, value: Primitive): 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/tracing 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
|
|
1
|
+
{"version":3,"file":"span.js","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"","sourcesContent":["import { Primitive } from './misc';\nimport { 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/tracing 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]: Primitive };\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]: Primitive };\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 *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key Tag key\n * @param value Tag value\n */\n setTag(key: string, value: Primitive): 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/tracing 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 /** Returns the current span properties as a `SpanContext` */\n toContext(): SpanContext;\n\n /** Updates the current span with a new `SpanContext` */\n updateWithContext(spanContext: SpanContext): this;\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]: Primitive };\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]: Primitive };\n timestamp?: number;\n trace_id: string;\n };\n}\n"]}
|
package/esm/transaction.d.ts
CHANGED
|
@@ -19,10 +19,6 @@ export interface TransactionContext extends SpanContext {
|
|
|
19
19
|
* If this transaction has a parent, the parent's sampling decision
|
|
20
20
|
*/
|
|
21
21
|
parentSampled?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Metadata associated with the transaction, for internal SDK use.
|
|
24
|
-
*/
|
|
25
|
-
metadata?: TransactionMetadata;
|
|
26
22
|
}
|
|
27
23
|
/**
|
|
28
24
|
* Data pulled from a `sentry-trace` header
|
|
@@ -104,15 +100,4 @@ export declare enum TransactionSamplingMethod {
|
|
|
104
100
|
Rate = "client_rate",
|
|
105
101
|
Inheritance = "inheritance"
|
|
106
102
|
}
|
|
107
|
-
export interface TransactionMetadata {
|
|
108
|
-
transactionSampling?: {
|
|
109
|
-
rate?: number;
|
|
110
|
-
method?: string;
|
|
111
|
-
};
|
|
112
|
-
/** The two halves (sentry and third-party) of a transaction's tracestate header, used for dynamic sampling */
|
|
113
|
-
tracestate?: {
|
|
114
|
-
sentry?: string;
|
|
115
|
-
thirdparty?: string;
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
103
|
//# sourceMappingURL=transaction.d.ts.map
|
package/esm/transaction.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../src/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7E,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;
|
|
1
|
+
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../src/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7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IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,wBAAwB,CAAC;CACpC;AAED,oBAAY,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE7D,oBAAY,yBAAyB;IACnC,QAAQ,mBAAmB;IAC3B,OAAO,mBAAmB;IAC1B,IAAI,gBAAgB;IACpB,WAAW,gBAAgB;CAC5B"}
|
package/esm/transaction.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../src/transaction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../src/transaction.ts"],"names":[],"mappings":"AA6GA,MAAM,CAAN,IAAY,yBAKX;AALD,WAAY,yBAAyB;IACnC,wDAA2B,CAAA;IAC3B,uDAA0B,CAAA;IAC1B,iDAAoB,CAAA;IACpB,wDAA2B,CAAA;AAC7B,CAAC,EALW,yBAAyB,KAAzB,yBAAyB,QAKpC","sourcesContent":["import { ExtractedNodeRequestData, Primitive, 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]: Primitive };\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 /** Returns the current transaction properties as a `TransactionContext` */\n toContext(): TransactionContext;\n\n /** Updates the current transaction with a new `TransactionContext` */\n updateWithContext(transactionContext: TransactionContext): this;\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 when using the `BrowserTracing`\n * integration.\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\nexport type Measurements = Record<string, { value: number }>;\n\nexport enum TransactionSamplingMethod {\n Explicit = 'explicitly_set',\n Sampler = 'client_sampler',\n Rate = 'client_rate',\n Inheritance = 'inheritance',\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/types",
|
|
3
|
-
"version": "6.3.0
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "Types for all Sentry JavaScript SDKs",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/types",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@sentry-internal/eslint-config-sdk": "6.3.0
|
|
19
|
+
"@sentry-internal/eslint-config-sdk": "6.3.0",
|
|
20
20
|
"eslint": "7.6.0",
|
|
21
21
|
"npm-run-all": "^4.1.2",
|
|
22
22
|
"prettier": "1.19.0",
|