@sentry/types 6.0.3 → 6.2.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.
@@ -3,6 +3,10 @@
3
3
  **/
4
4
  export interface DebugMeta {
5
5
  images?: Array<DebugImage>;
6
+ transactionSampling?: {
7
+ rate?: number;
8
+ method?: string;
9
+ };
6
10
  }
7
11
  /**
8
12
  * Possible choices for debug images.
@@ -1 +1 @@
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;CAC5B;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"}
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"}
@@ -1 +1 @@
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}\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"]}
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/dsn.d.ts CHANGED
@@ -4,8 +4,10 @@ export declare type DsnProtocol = 'http' | 'https';
4
4
  export interface DsnComponents {
5
5
  /** Protocol used to connect to Sentry. */
6
6
  protocol: DsnProtocol;
7
+ /** Public authorization key (deprecated, renamed to publicKey). */
8
+ user?: string;
7
9
  /** Public authorization key. */
8
- user: string;
10
+ publicKey?: string;
9
11
  /** Private authorization key (deprecated, optional). */
10
12
  pass?: string;
11
13
  /** Hostname of the Sentry instance. */
package/dist/dsn.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"dsn.d.ts","sourceRoot":"","sources":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8CAA8C;AAC9C,oBAAY,OAAO,GAAG,MAAM,GAAG,aAAa,CAAC;AAE7C,iEAAiE;AACjE,MAAM,WAAW,GAAI,SAAQ,aAAa;IACxC;;;;;;;;OAQG;IACH,QAAQ,CAAC,YAAY,EAAE,OAAO,GAAG,MAAM,CAAC;CACzC"}
package/dist/dsn.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"dsn.js","sourceRoot":"","sources":["../src/dsn.ts"],"names":[],"mappings":"","sourcesContent":["/** Supported Sentry transport protocols in a Dsn. */\nexport type DsnProtocol = 'http' | 'https';\n\n/** Primitive components of a Dsn. */\nexport interface DsnComponents {\n /** Protocol used to connect to Sentry. */\n protocol: DsnProtocol;\n /** Public authorization key. */\n user: string;\n /** Private authorization key (deprecated, optional). */\n pass?: string;\n /** Hostname of the Sentry instance. */\n host: string;\n /** Port of the Sentry instance. */\n port?: string;\n /** Sub path/ */\n path?: string;\n /** Project ID */\n projectId: string;\n}\n\n/** Anything that can be parsed into a Dsn. */\nexport type DsnLike = string | DsnComponents;\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport interface Dsn extends DsnComponents {\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n toString(withPassword: boolean): string;\n}\n"]}
1
+ {"version":3,"file":"dsn.js","sourceRoot":"","sources":["../src/dsn.ts"],"names":[],"mappings":"","sourcesContent":["/** Supported Sentry transport protocols in a Dsn. */\nexport type DsnProtocol = 'http' | 'https';\n\n/** Primitive components of a Dsn. */\nexport interface DsnComponents {\n /** Protocol used to connect to Sentry. */\n protocol: DsnProtocol;\n /** Public authorization key (deprecated, renamed to publicKey). */\n user?: string;\n /** Public authorization key. */\n publicKey?: string;\n /** Private authorization key (deprecated, optional). */\n pass?: string;\n /** Hostname of the Sentry instance. */\n host: string;\n /** Port of the Sentry instance. */\n port?: string;\n /** Sub path/ */\n path?: string;\n /** Project ID */\n projectId: string;\n}\n\n/** Anything that can be parsed into a Dsn. */\nexport type DsnLike = string | DsnComponents;\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport interface Dsn extends DsnComponents {\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n toString(withPassword: boolean): string;\n}\n"]}
package/dist/hub.d.ts CHANGED
@@ -203,5 +203,10 @@ export interface Hub {
203
203
  * Ends the session that lives on the current scope and sends it to Sentry
204
204
  */
205
205
  endSession(): void;
206
+ /**
207
+ * Sends the current session on the scope to Sentry
208
+ * @param endSession If set the session will be marked as exited and removed from the scope
209
+ */
210
+ captureSession(endSession: boolean): void;
206
211
  }
207
212
  //# 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,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,EAA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AI,CAAC;IAExC,kEAAkE;IAClE,cAAc,CAAC,CAAC,SAAS,WAAW,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;;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 /** 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"]}
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/session.d.ts CHANGED
@@ -31,6 +31,7 @@ export interface Session extends SessionContext {
31
31
  export interface SessionContext {
32
32
  sid?: string;
33
33
  did?: string;
34
+ init?: boolean;
34
35
  timestamp?: number;
35
36
  started?: number;
36
37
  duration?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B;;GAEG;AACH,MAAM,WAAW,OAAQ,SAAQ,cAAc;IAC7C,YAAY;IACZ,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAEvC,YAAY;IACZ,KAAK,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAEpC,YAAY;IACZ,MAAM,IAAI;QACR,IAAI,EAAE,OAAO,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,aAAa,CAAC;QACtB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE;YACN,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB,CAAC;KACH,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,C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AAU,CAAC,EAAE,MAAM,CAAC;YACpB,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB,CAAC;KACH,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAED;;GAEG;AACH,oBAAY,aAAa;IACvB,YAAY;IACZ,EAAE,OAAO;IACT,YAAY;IACZ,MAAM,WAAW;IACjB,YAAY;IACZ,OAAO,YAAY;IACnB,YAAY;IACZ,QAAQ,aAAa;CACtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"session.js","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":";AAiDA;;GAEG;AACH,IAAY,aASX;AATD,WAAY,aAAa;IACvB,YAAY;IACZ,0BAAS,CAAA;IACT,YAAY;IACZ,kCAAiB,CAAA;IACjB,YAAY;IACZ,oCAAmB,CAAA;IACnB,YAAY;IACZ,sCAAqB,CAAA;AACvB,CAAC,EATW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QASxB","sourcesContent":["import { User } from './user';\n\n/**\n * @inheritdoc\n */\nexport interface Session extends SessionContext {\n /** JSDoc */\n update(context?: SessionContext): void;\n\n /** JSDoc */\n close(status?: SessionStatus): void;\n\n /** JSDoc */\n toJSON(): {\n init: boolean;\n sid: string;\n did?: string;\n timestamp: string;\n started: string;\n duration: number;\n status: SessionStatus;\n errors: number;\n attrs?: {\n release?: string;\n environment?: string;\n user_agent?: string;\n ip_address?: string;\n };\n };\n}\n\n/**\n * Session Context\n */\nexport interface SessionContext {\n sid?: string;\n did?: string;\n timestamp?: number;\n started?: number;\n duration?: number;\n status?: SessionStatus;\n release?: string;\n environment?: string;\n userAgent?: string;\n ipAddress?: string;\n errors?: number;\n user?: User | null;\n}\n\n/**\n * Session Status\n */\nexport enum SessionStatus {\n /** JSDoc */\n Ok = 'ok',\n /** JSDoc */\n Exited = 'exited',\n /** JSDoc */\n Crashed = 'crashed',\n /** JSDoc */\n Abnormal = 'abnormal',\n}\n"]}
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":";AAkDA;;GAEG;AACH,IAAY,aASX;AATD,WAAY,aAAa;IACvB,YAAY;IACZ,0BAAS,CAAA;IACT,YAAY;IACZ,kCAAiB,CAAA;IACjB,YAAY;IACZ,oCAAmB,CAAA;IACnB,YAAY;IACZ,sCAAqB,CAAA;AACvB,CAAC,EATW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QASxB","sourcesContent":["import { User } from './user';\n\n/**\n * @inheritdoc\n */\nexport interface Session extends SessionContext {\n /** JSDoc */\n update(context?: SessionContext): void;\n\n /** JSDoc */\n close(status?: SessionStatus): void;\n\n /** JSDoc */\n toJSON(): {\n init: boolean;\n sid: string;\n did?: string;\n timestamp: string;\n started: string;\n duration: number;\n status: SessionStatus;\n errors: number;\n attrs?: {\n release?: string;\n environment?: string;\n user_agent?: string;\n ip_address?: string;\n };\n };\n}\n\n/**\n * Session Context\n */\nexport interface SessionContext {\n sid?: string;\n did?: string;\n init?: boolean;\n timestamp?: number;\n started?: number;\n duration?: number;\n status?: SessionStatus;\n release?: string;\n environment?: string;\n userAgent?: string;\n ipAddress?: string;\n errors?: number;\n user?: User | null;\n}\n\n/**\n * Session Status\n */\nexport enum SessionStatus {\n /** JSDoc */\n Ok = 'ok',\n /** JSDoc */\n Exited = 'exited',\n /** JSDoc */\n Crashed = 'crashed',\n /** JSDoc */\n Abnormal = 'abnormal',\n}\n"]}
@@ -82,8 +82,8 @@ export interface SamplingContext extends CustomSamplingContext {
82
82
  */
83
83
  parentSampled?: boolean;
84
84
  /**
85
- * Object representing the URL of the current page or worker script. Passed by default in a browser or service worker
86
- * context.
85
+ * Object representing the URL of the current page or worker script. Passed by default when using the `BrowserTracing`
86
+ * integration.
87
87
  */
88
88
  location?: WorkerLocation;
89
89
  /**
@@ -1 +1 @@
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 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\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"]}
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"]}
@@ -3,6 +3,10 @@
3
3
  **/
4
4
  export interface DebugMeta {
5
5
  images?: Array<DebugImage>;
6
+ transactionSampling?: {
7
+ rate?: number;
8
+ method?: string;
9
+ };
6
10
  }
7
11
  /**
8
12
  * Possible choices for debug images.
@@ -1 +1 @@
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;CAC5B;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"}
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"}
@@ -1 +1 @@
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}\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"]}
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/dsn.d.ts CHANGED
@@ -4,8 +4,10 @@ export declare type DsnProtocol = 'http' | 'https';
4
4
  export interface DsnComponents {
5
5
  /** Protocol used to connect to Sentry. */
6
6
  protocol: DsnProtocol;
7
+ /** Public authorization key (deprecated, renamed to publicKey). */
8
+ user?: string;
7
9
  /** Public authorization key. */
8
- user: string;
10
+ publicKey?: string;
9
11
  /** Private authorization key (deprecated, optional). */
10
12
  pass?: string;
11
13
  /** Hostname of the Sentry instance. */
package/esm/dsn.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"dsn.d.ts","sourceRoot":"","sources":["../src/dsn.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,oBAAY,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3C,qCAAqC;AACrC,MAAM,WAAW,aAAa;IAC5B,0CAA0C;IAC1C,QAAQ,EAAE,WAAW,CAAC;IACtB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,8CAA8C;AAC9C,oBAAY,OAAO,GAAG,MAAM,GAAG,aAAa,CAAC;AAE7C,iEAAiE;AACjE,MAAM,WAAW,GAAI,SAAQ,aAAa;IACxC;;;;;;;;OAQG;IACH,QAAQ,CAAC,YAAY,EAAE,OAAO,GAAG,MAAM,CAAC;CACzC"}
1
+ {"version":3,"file":"dsn.d.ts","sourceRoot":"","sources":["../src/dsn.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,oBAAY,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3C,qCAAqC;AACrC,MAAM,WAAW,aAAa;IAC5B,0CAA0C;IAC1C,QAAQ,EAAE,WAAW,CAAC;IACtB,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,8CAA8C;AAC9C,oBAAY,OAAO,GAAG,MAAM,GAAG,aAAa,CAAC;AAE7C,iEAAiE;AACjE,MAAM,WAAW,GAAI,SAAQ,aAAa;IACxC;;;;;;;;OAQG;IACH,QAAQ,CAAC,YAAY,EAAE,OAAO,GAAG,MAAM,CAAC;CACzC"}
package/esm/dsn.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"dsn.js","sourceRoot":"","sources":["../src/dsn.ts"],"names":[],"mappings":"","sourcesContent":["/** Supported Sentry transport protocols in a Dsn. */\nexport type DsnProtocol = 'http' | 'https';\n\n/** Primitive components of a Dsn. */\nexport interface DsnComponents {\n /** Protocol used to connect to Sentry. */\n protocol: DsnProtocol;\n /** Public authorization key. */\n user: string;\n /** Private authorization key (deprecated, optional). */\n pass?: string;\n /** Hostname of the Sentry instance. */\n host: string;\n /** Port of the Sentry instance. */\n port?: string;\n /** Sub path/ */\n path?: string;\n /** Project ID */\n projectId: string;\n}\n\n/** Anything that can be parsed into a Dsn. */\nexport type DsnLike = string | DsnComponents;\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport interface Dsn extends DsnComponents {\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n toString(withPassword: boolean): string;\n}\n"]}
1
+ {"version":3,"file":"dsn.js","sourceRoot":"","sources":["../src/dsn.ts"],"names":[],"mappings":"","sourcesContent":["/** Supported Sentry transport protocols in a Dsn. */\nexport type DsnProtocol = 'http' | 'https';\n\n/** Primitive components of a Dsn. */\nexport interface DsnComponents {\n /** Protocol used to connect to Sentry. */\n protocol: DsnProtocol;\n /** Public authorization key (deprecated, renamed to publicKey). */\n user?: string;\n /** Public authorization key. */\n publicKey?: string;\n /** Private authorization key (deprecated, optional). */\n pass?: string;\n /** Hostname of the Sentry instance. */\n host: string;\n /** Port of the Sentry instance. */\n port?: string;\n /** Sub path/ */\n path?: string;\n /** Project ID */\n projectId: string;\n}\n\n/** Anything that can be parsed into a Dsn. */\nexport type DsnLike = string | DsnComponents;\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport interface Dsn extends DsnComponents {\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n toString(withPassword: boolean): string;\n}\n"]}
package/esm/hub.d.ts CHANGED
@@ -203,5 +203,10 @@ export interface Hub {
203
203
  * Ends the session that lives on the current scope and sends it to Sentry
204
204
  */
205
205
  endSession(): void;
206
+ /**
207
+ * Sends the current session on the scope to Sentry
208
+ * @param endSession If set the session will be marked as exited and removed from the scope
209
+ */
210
+ captureSession(endSession: boolean): void;
206
211
  }
207
212
  //# sourceMappingURL=hub.d.ts.map
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,EA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Q,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAAC;IAExC,kEAAkE;IAClE,cAAc,CAAC,CAAC,SAAS,WAAW,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;;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 /** 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"]}
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/session.d.ts CHANGED
@@ -31,6 +31,7 @@ export interface Session extends SessionContext {
31
31
  export interface SessionContext {
32
32
  sid?: string;
33
33
  did?: string;
34
+ init?: boolean;
34
35
  timestamp?: number;
35
36
  started?: number;
36
37
  duration?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B;;GAEG;AACH,MAAM,WAAW,OAAQ,SAAQ,cAAc;IAC7C,YAAY;IACZ,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAEvC,YAAY;IACZ,KAAK,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAEpC,YAAY;IACZ,MAAM,IAAI;QACR,IAAI,EAAE,OAAO,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,aAAa,CAAC;QACtB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE;YACN,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB,CAAC;KACH,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,GAAG,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AAM,CAAC;YACjB,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB,CAAC;KACH,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAED;;GAEG;AACH,oBAAY,aAAa;IACvB,YAAY;IACZ,EAAE,OAAO;IACT,YAAY;IACZ,MAAM,WAAW;IACjB,YAAY;IACZ,OAAO,YAAY;IACnB,YAAY;IACZ,QAAQ,aAAa;CACtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"session.js","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAiDA;;GAEG;AACH,MAAM,CAAN,IAAY,aASX;AATD,WAAY,aAAa;IACvB,YAAY;IACZ,0BAAS,CAAA;IACT,YAAY;IACZ,kCAAiB,CAAA;IACjB,YAAY;IACZ,oCAAmB,CAAA;IACnB,YAAY;IACZ,sCAAqB,CAAA;AACvB,CAAC,EATW,aAAa,KAAb,aAAa,QASxB","sourcesContent":["import { User } from './user';\n\n/**\n * @inheritdoc\n */\nexport interface Session extends SessionContext {\n /** JSDoc */\n update(context?: SessionContext): void;\n\n /** JSDoc */\n close(status?: SessionStatus): void;\n\n /** JSDoc */\n toJSON(): {\n init: boolean;\n sid: string;\n did?: string;\n timestamp: string;\n started: string;\n duration: number;\n status: SessionStatus;\n errors: number;\n attrs?: {\n release?: string;\n environment?: string;\n user_agent?: string;\n ip_address?: string;\n };\n };\n}\n\n/**\n * Session Context\n */\nexport interface SessionContext {\n sid?: string;\n did?: string;\n timestamp?: number;\n started?: number;\n duration?: number;\n status?: SessionStatus;\n release?: string;\n environment?: string;\n userAgent?: string;\n ipAddress?: string;\n errors?: number;\n user?: User | null;\n}\n\n/**\n * Session Status\n */\nexport enum SessionStatus {\n /** JSDoc */\n Ok = 'ok',\n /** JSDoc */\n Exited = 'exited',\n /** JSDoc */\n Crashed = 'crashed',\n /** JSDoc */\n Abnormal = 'abnormal',\n}\n"]}
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAkDA;;GAEG;AACH,MAAM,CAAN,IAAY,aASX;AATD,WAAY,aAAa;IACvB,YAAY;IACZ,0BAAS,CAAA;IACT,YAAY;IACZ,kCAAiB,CAAA;IACjB,YAAY;IACZ,oCAAmB,CAAA;IACnB,YAAY;IACZ,sCAAqB,CAAA;AACvB,CAAC,EATW,aAAa,KAAb,aAAa,QASxB","sourcesContent":["import { User } from './user';\n\n/**\n * @inheritdoc\n */\nexport interface Session extends SessionContext {\n /** JSDoc */\n update(context?: SessionContext): void;\n\n /** JSDoc */\n close(status?: SessionStatus): void;\n\n /** JSDoc */\n toJSON(): {\n init: boolean;\n sid: string;\n did?: string;\n timestamp: string;\n started: string;\n duration: number;\n status: SessionStatus;\n errors: number;\n attrs?: {\n release?: string;\n environment?: string;\n user_agent?: string;\n ip_address?: string;\n };\n };\n}\n\n/**\n * Session Context\n */\nexport interface SessionContext {\n sid?: string;\n did?: string;\n init?: boolean;\n timestamp?: number;\n started?: number;\n duration?: number;\n status?: SessionStatus;\n release?: string;\n environment?: string;\n userAgent?: string;\n ipAddress?: string;\n errors?: number;\n user?: User | null;\n}\n\n/**\n * Session Status\n */\nexport enum SessionStatus {\n /** JSDoc */\n Ok = 'ok',\n /** JSDoc */\n Exited = 'exited',\n /** JSDoc */\n Crashed = 'crashed',\n /** JSDoc */\n Abnormal = 'abnormal',\n}\n"]}
@@ -82,8 +82,8 @@ export interface SamplingContext extends CustomSamplingContext {
82
82
  */
83
83
  parentSampled?: boolean;
84
84
  /**
85
- * Object representing the URL of the current page or worker script. Passed by default in a browser or service worker
86
- * context.
85
+ * Object representing the URL of the current page or worker script. Passed by default when using the `BrowserTracing`
86
+ * integration.
87
87
  */
88
88
  location?: WorkerLocation;
89
89
  /**
@@ -1 +1 @@
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 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\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"]}
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.0.3",
3
+ "version": "6.2.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.0.3",
19
+ "@sentry-internal/eslint-config-sdk": "6.2.0",
20
20
  "eslint": "7.6.0",
21
21
  "npm-run-all": "^4.1.2",
22
22
  "prettier": "1.19.0",