@sentry/types 5.24.2 → 5.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ export declare type Context = Record<string, unknown>;
2
+ export declare type Contexts = Record<string, Context>;
3
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,oBAAY,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC9C,oBAAY,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"","sourcesContent":["export type Context = Record<string, unknown>;\nexport type Contexts = Record<string, Context>;\n"]}
package/dist/event.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { Breadcrumb } from './breadcrumb';
2
+ import { Contexts } from './context';
2
3
  import { Exception } from './exception';
4
+ import { Extras } from './extra';
3
5
  import { Request } from './request';
4
6
  import { CaptureContext } from './scope';
5
7
  import { SdkInfo } from './sdkinfo';
@@ -32,15 +34,11 @@ export interface Event {
32
34
  };
33
35
  stacktrace?: Stacktrace;
34
36
  breadcrumbs?: Breadcrumb[];
35
- contexts?: {
36
- [key: string]: Record<any, any>;
37
- };
37
+ contexts?: Contexts;
38
38
  tags?: {
39
39
  [key: string]: string;
40
40
  };
41
- extra?: {
42
- [key: string]: any;
43
- };
41
+ extra?: Extras;
44
42
  user?: User;
45
43
  type?: EventType;
46
44
  spans?: Span[];
@@ -1 +1 @@
1
- {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE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AG,aAAa,CAAC;AAEtC,YAAY;AACZ,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,kBAAkB,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAClC,iBAAiB,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAAC;IAC1C,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ"}
package/dist/event.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"event.js","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport { Exception } from './exception';\nimport { Request } from './request';\nimport { CaptureContext } from './scope';\nimport { SdkInfo } from './sdkinfo';\nimport { Severity } from './severity';\nimport { Span } from './span';\nimport { Stacktrace } from './stacktrace';\nimport { User } from './user';\n\n/** JSDoc */\nexport interface Event {\n event_id?: string;\n message?: string;\n timestamp?: number;\n start_timestamp?: number;\n level?: Severity;\n platform?: string;\n logger?: string;\n server_name?: string;\n release?: string;\n dist?: string;\n environment?: string;\n sdk?: SdkInfo;\n request?: Request;\n transaction?: string;\n modules?: { [key: string]: string };\n fingerprint?: string[];\n exception?: {\n values?: Exception[];\n };\n stacktrace?: Stacktrace;\n breadcrumbs?: Breadcrumb[];\n contexts?: {\n [key: string]: Record<any, any>;\n };\n tags?: { [key: string]: string };\n extra?: { [key: string]: any };\n user?: User;\n type?: EventType;\n spans?: Span[];\n}\n\n/** JSDoc */\nexport type EventType = 'transaction';\n\n/** JSDoc */\nexport interface EventHint {\n event_id?: string;\n captureContext?: CaptureContext;\n syntheticException?: Error | null;\n originalException?: Error | string | null;\n data?: any;\n}\n"]}
1
+ {"version":3,"file":"event.js","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport { Contexts } from './context';\nimport { Exception } from './exception';\nimport { Extras } from './extra';\nimport { Request } from './request';\nimport { CaptureContext } from './scope';\nimport { SdkInfo } from './sdkinfo';\nimport { Severity } from './severity';\nimport { Span } from './span';\nimport { Stacktrace } from './stacktrace';\nimport { User } from './user';\n\n/** JSDoc */\nexport interface Event {\n event_id?: string;\n message?: string;\n timestamp?: number;\n start_timestamp?: number;\n level?: Severity;\n platform?: string;\n logger?: string;\n server_name?: string;\n release?: string;\n dist?: string;\n environment?: string;\n sdk?: SdkInfo;\n request?: Request;\n transaction?: string;\n modules?: { [key: string]: string };\n fingerprint?: string[];\n exception?: {\n values?: Exception[];\n };\n stacktrace?: Stacktrace;\n breadcrumbs?: Breadcrumb[];\n contexts?: Contexts;\n tags?: { [key: string]: string };\n extra?: Extras;\n user?: User;\n type?: EventType;\n spans?: Span[];\n}\n\n/** JSDoc */\nexport type EventType = 'transaction';\n\n/** JSDoc */\nexport interface EventHint {\n event_id?: string;\n captureContext?: CaptureContext;\n syntheticException?: Error | null;\n originalException?: Error | string | null;\n data?: any;\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { Breadcrumb, BreadcrumbHint } from './breadcrumb';
2
2
  export { Client } from './client';
3
+ export { Context, Contexts } from './context';
3
4
  export { Dsn, DsnComponents, DsnLike, DsnProtocol } from './dsn';
4
5
  export { ExtendedError } from './error';
5
6
  export { Event, EventHint } from './event';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,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W,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,WAAW,EACX,kBAAkB,GACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAUA,uCAAsC;AAA7B,8BAAA,QAAQ,CAAA;AAUjB,uCAAsC;AAA7B,8BAAA,QAAQ,CAAA;AAIjB,mCAAkC;AAAzB,0BAAA,MAAM,CAAA","sourcesContent":["export { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nexport { Client } from './client';\nexport { Dsn, DsnComponents, DsnLike, DsnProtocol } from './dsn';\nexport { ExtendedError } from './error';\nexport { Event, EventHint } from './event';\nexport { EventProcessor } from './eventprocessor';\nexport { Exception } from './exception';\nexport { Extra, Extras } from './extra';\nexport { Hub } from './hub';\nexport { Integration, IntegrationClass } from './integration';\nexport { LogLevel } from './loglevel';\nexport { Mechanism } from './mechanism';\nexport { ExtractedNodeRequestData, WorkerLocation } from './misc';\nexport { Options } from './options';\nexport { Package } from './package';\nexport { Request } from './request';\nexport { Response } from './response';\nexport { Runtime } from './runtime';\nexport { CaptureContext, Scope, ScopeContext } from './scope';\nexport { SdkInfo } from './sdkinfo';\nexport { Severity } from './severity';\nexport { Span, SpanContext } from './span';\nexport { StackFrame } from './stackframe';\nexport { Stacktrace } from './stacktrace';\nexport { Status } from './status';\nexport {\n CustomSamplingContext,\n SamplingContext,\n TraceparentData,\n Transaction,\n TransactionContext,\n} from './transaction';\nexport { Thread } from './thread';\nexport { Transport, TransportOptions, TransportClass } from './transport';\nexport { User } from './user';\nexport { WrappedFunction } from './wrappedfunction';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAWA,uCAAsC;AAA7B,8BAAA,QAAQ,CAAA;AAUjB,uCAAsC;AAA7B,8BAAA,QAAQ,CAAA;AAIjB,mCAAkC;AAAzB,0BAAA,MAAM,CAAA","sourcesContent":["export { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nexport { Client } from './client';\nexport { Context, Contexts } from './context';\nexport { Dsn, DsnComponents, DsnLike, DsnProtocol } from './dsn';\nexport { ExtendedError } from './error';\nexport { Event, EventHint } from './event';\nexport { EventProcessor } from './eventprocessor';\nexport { Exception } from './exception';\nexport { Extra, Extras } from './extra';\nexport { Hub } from './hub';\nexport { Integration, IntegrationClass } from './integration';\nexport { LogLevel } from './loglevel';\nexport { Mechanism } from './mechanism';\nexport { ExtractedNodeRequestData, WorkerLocation } from './misc';\nexport { Options } from './options';\nexport { Package } from './package';\nexport { Request } from './request';\nexport { Response } from './response';\nexport { Runtime } from './runtime';\nexport { CaptureContext, Scope, ScopeContext } from './scope';\nexport { SdkInfo } from './sdkinfo';\nexport { Severity } from './severity';\nexport { Span, SpanContext } from './span';\nexport { StackFrame } from './stackframe';\nexport { Stacktrace } from './stacktrace';\nexport { Status } from './status';\nexport {\n CustomSamplingContext,\n SamplingContext,\n TraceparentData,\n Transaction,\n TransactionContext,\n} from './transaction';\nexport { Thread } from './thread';\nexport { Transport, TransportOptions, TransportClass } from './transport';\nexport { User } from './user';\nexport { WrappedFunction } from './wrappedfunction';\n"]}
package/dist/scope.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Breadcrumb } from './breadcrumb';
2
+ import { Context, Contexts } from './context';
2
3
  import { EventProcessor } from './eventprocessor';
3
4
  import { Extra, Extras } from './extra';
4
5
  import { Severity } from './severity';
@@ -11,12 +12,8 @@ export declare type CaptureContext = Scope | Partial<ScopeContext> | ((scope: Sc
11
12
  export interface ScopeContext {
12
13
  user: User;
13
14
  level: Severity;
14
- extra: {
15
- [key: string]: any;
16
- };
17
- contexts: {
18
- [key: string]: any;
19
- };
15
+ extra: Extras;
16
+ contexts: Contexts;
20
17
  tags: {
21
18
  [key: string]: string;
22
19
  };
@@ -56,7 +53,7 @@ export interface Scope {
56
53
  /**
57
54
  * Set key:value that will be sent as extra data with the event.
58
55
  * @param key String of extra
59
- * @param extra Any kind of data. This data will be normailzed.
56
+ * @param extra Any kind of data. This data will be normalized.
60
57
  */
61
58
  setExtra(key: string, extra: Extra): this;
62
59
  /**
@@ -76,11 +73,9 @@ export interface Scope {
76
73
  /**
77
74
  * Sets context data with the given name.
78
75
  * @param name of the context
79
- * @param context Any kind of data. This data will be normailzed.
76
+ * @param context an object containing context data. This data will be normalized. Pass `null` to unset the context.
80
77
  */
81
- setContext(name: string, context: {
82
- [key: string]: any;
83
- } | null): this;
78
+ setContext(name: string, context: Context | null): this;
84
79
  /**
85
80
  * Sets the Span on the scope.
86
81
  * @param span Span
@@ -1 +1 @@
1
- {"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,M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ACH,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,kBAAkB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExC;;;;OAIG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI,CAAC;IAExD;;;OAGG;IACH,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,OAAO,IAAI,IAAI,GAAG,SAAS,CAAC;IAE5B;;OAEG;IACH,cAAc,IAAI,WAAW,GAAG,SAAS,CAAC;IAE1C;;;;;;OAMG;IACH,MAAM,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAE9C,0DAA0D;IAC1D,KAAK,IAAI,IAAI,CAAC;IAEd;;;;OAIG;IACH,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErE;;OAEG;IACH,gBAAgB,IAAI,IAAI,CAAC;CAC1B"}
package/dist/scope.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"scope.js","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport { EventProcessor } from './eventprocessor';\nimport { Extra, Extras } from './extra';\nimport { Severity } from './severity';\nimport { Span } from './span';\nimport { Transaction } from './transaction';\nimport { User } from './user';\n\n/** JSDocs */\nexport type CaptureContext = Scope | Partial<ScopeContext> | ((scope: Scope) => Scope);\n\n/** JSDocs */\nexport interface ScopeContext {\n user: User;\n level: Severity;\n extra: { [key: string]: any };\n contexts: { [key: string]: any };\n tags: { [key: string]: string };\n fingerprint: string[];\n}\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport interface Scope {\n /** Add new event processor that will be called after {@link applyToEvent}. */\n addEventProcessor(callback: EventProcessor): this;\n\n /**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\n setUser(user: User | null): this;\n\n /**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\n setTags(tags: { [key: string]: string }): this;\n\n /**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\n setTag(key: string, value: string): this;\n\n /**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\n setExtras(extras: Extras): this;\n\n /**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normailzed.\n */\n setExtra(key: string, extra: Extra): this;\n\n /**\n * Sets the fingerprint on the scope to send with the events.\n * @param fingerprint string[] to group events in Sentry.\n */\n setFingerprint(fingerprint: string[]): this;\n\n /**\n * Sets the level on the scope for future events.\n * @param level string {@link Severity}\n */\n setLevel(level: Severity): this;\n\n /**\n * Sets the transaction name on the scope for future events.\n */\n setTransactionName(name?: string): this;\n\n /**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normailzed.\n */\n setContext(name: string, context: { [key: string]: any } | null): this;\n\n /**\n * Sets the Span on the scope.\n * @param span Span\n */\n setSpan(span?: Span): this;\n\n /**\n * Returns the `Span` if there is one\n */\n getSpan(): Span | undefined;\n\n /**\n * Returns the `Transaction` attached to the scope (if there is one)\n */\n getTransaction(): Transaction | undefined;\n\n /**\n * Updates the scope with provided data. Can work in three variations:\n * - plain object containing updatable attributes\n * - Scope instance that'll extract the attributes from\n * - callback function that'll receive the current scope as an argument and allow for modifications\n * @param captureContext scope modifier to be used\n */\n update(captureContext?: CaptureContext): this;\n\n /** Clears the current scope and resets its properties. */\n clear(): this;\n\n /**\n * Sets the breadcrumbs in the scope\n * @param breadcrumbs Breadcrumb\n * @param maxBreadcrumbs number of max breadcrumbs to merged into event.\n */\n addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this;\n\n /**\n * Clears all currently set Breadcrumbs.\n */\n clearBreadcrumbs(): this;\n}\n"]}
1
+ {"version":3,"file":"scope.js","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport { Context, Contexts } from './context';\nimport { EventProcessor } from './eventprocessor';\nimport { Extra, Extras } from './extra';\nimport { Severity } from './severity';\nimport { Span } from './span';\nimport { Transaction } from './transaction';\nimport { User } from './user';\n\n/** JSDocs */\nexport type CaptureContext = Scope | Partial<ScopeContext> | ((scope: Scope) => Scope);\n\n/** JSDocs */\nexport interface ScopeContext {\n user: User;\n level: Severity;\n extra: Extras;\n contexts: Contexts;\n tags: { [key: string]: string };\n fingerprint: string[];\n}\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport interface Scope {\n /** Add new event processor that will be called after {@link applyToEvent}. */\n addEventProcessor(callback: EventProcessor): this;\n\n /**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\n setUser(user: User | null): this;\n\n /**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\n setTags(tags: { [key: string]: string }): this;\n\n /**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\n setTag(key: string, value: string): this;\n\n /**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\n setExtras(extras: Extras): this;\n\n /**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\n setExtra(key: string, extra: Extra): this;\n\n /**\n * Sets the fingerprint on the scope to send with the events.\n * @param fingerprint string[] to group events in Sentry.\n */\n setFingerprint(fingerprint: string[]): this;\n\n /**\n * Sets the level on the scope for future events.\n * @param level string {@link Severity}\n */\n setLevel(level: Severity): this;\n\n /**\n * Sets the transaction name on the scope for future events.\n */\n setTransactionName(name?: string): this;\n\n /**\n * Sets context data with the given name.\n * @param name of the context\n * @param context an object containing context data. This data will be normalized. Pass `null` to unset the context.\n */\n setContext(name: string, context: Context | null): this;\n\n /**\n * Sets the Span on the scope.\n * @param span Span\n */\n setSpan(span?: Span): this;\n\n /**\n * Returns the `Span` if there is one\n */\n getSpan(): Span | undefined;\n\n /**\n * Returns the `Transaction` attached to the scope (if there is one)\n */\n getTransaction(): Transaction | undefined;\n\n /**\n * Updates the scope with provided data. Can work in three variations:\n * - plain object containing updatable attributes\n * - Scope instance that'll extract the attributes from\n * - callback function that'll receive the current scope as an argument and allow for modifications\n * @param captureContext scope modifier to be used\n */\n update(captureContext?: CaptureContext): this;\n\n /** Clears the current scope and resets its properties. */\n clear(): this;\n\n /**\n * Sets the breadcrumbs in the scope\n * @param breadcrumbs Breadcrumb\n * @param maxBreadcrumbs number of max breadcrumbs to merged into event.\n */\n addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this;\n\n /**\n * Clears all currently set Breadcrumbs.\n */\n clearBreadcrumbs(): this;\n}\n"]}
package/dist/span.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { Transaction } from './transaction';
1
2
  /** Interface holding all properties that can be set on a Span on creation. */
2
3
  export interface SpanContext {
3
4
  /**
@@ -76,6 +77,10 @@ export interface Span extends SpanContext {
76
77
  data: {
77
78
  [key: string]: any;
78
79
  };
80
+ /**
81
+ * The transaction containing this span
82
+ */
83
+ transaction?: Transaction;
79
84
  /**
80
85
  * Sets the finish timestamp on the current span.
81
86
  * @param endTimestamp Takes an endTimestamp if the end should not be the time when you call this function.
@@ -1 +1 @@
1
- {"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IAC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,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAC;QACjC,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,iCAAiC;IACjC,MAAM,IAAI;QACR,IAAI,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;SAAE,CAAC;QAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,OAAO,EAAE,MAAM,CAAC;QAChB,eAAe,EAAE,MAAM,CAAC;QACxB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAC;QACjC,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH"}
package/dist/span.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"span.js","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"","sourcesContent":["/** Interface holding all properties that can be set on a Span on creation. */\nexport interface SpanContext {\n /**\n * Description of the Span.\n */\n description?: string;\n\n /**\n * Operation of the Span.\n */\n op?: string;\n\n /**\n * Completion status of the Span.\n * See: {@sentry/apm SpanStatus} for possible values\n */\n status?: string;\n\n /**\n * Parent Span ID\n */\n parentSpanId?: string;\n\n /**\n * Was this span chosen to be sent as part of the sample?\n */\n sampled?: boolean;\n\n /**\n * Span ID\n */\n spanId?: string;\n\n /**\n * Trace ID\n */\n traceId?: string;\n\n /**\n * Tags of the Span.\n */\n tags?: { [key: string]: string };\n\n /**\n * Data of the Span.\n */\n data?: { [key: string]: any };\n\n /**\n * Timestamp in seconds (epoch time) indicating when the span started.\n */\n startTimestamp?: number;\n\n /**\n * Timestamp in seconds (epoch time) indicating when the span ended.\n */\n endTimestamp?: number;\n}\n\n/** Span holding trace_id, span_id */\nexport interface Span extends SpanContext {\n /**\n * @inheritDoc\n */\n spanId: string;\n\n /**\n * @inheritDoc\n */\n traceId: string;\n\n /**\n * @inheritDoc\n */\n startTimestamp: number;\n\n /**\n * @inheritDoc\n */\n tags: { [key: string]: string };\n\n /**\n * @inheritDoc\n */\n data: { [key: string]: any };\n\n /**\n * Sets the finish timestamp on the current span.\n * @param endTimestamp Takes an endTimestamp if the end should not be the time when you call this function.\n */\n finish(endTimestamp?: number): void;\n\n /**\n * Sets the tag attribute on the current span\n * @param key Tag key\n * @param value Tag value\n */\n setTag(key: string, value: string): this;\n\n /**\n * Sets the data attribute on the current span\n * @param key Data key\n * @param value Data value\n */\n setData(key: string, value: any): this;\n\n /**\n * Sets the status attribute on the current span\n * See: {@sentry/apm SpanStatus} for possible values\n * @param status http code used to set the status\n */\n setStatus(status: string): this;\n\n /**\n * Sets the status attribute on the current span based on the http code\n * @param httpStatus http code used to set the status\n */\n setHttpStatus(httpStatus: number): this;\n\n /**\n * Use {@link startChild}\n * @deprecated\n */\n child(\n spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'spanId' | 'sampled' | 'traceId' | 'parentSpanId'>>,\n ): Span;\n\n /**\n * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.\n * Also the `sampled` decision will be inherited.\n */\n startChild(\n spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'spanId' | 'sampled' | 'traceId' | 'parentSpanId'>>,\n ): Span;\n\n /**\n * Determines whether span was successful (HTTP200)\n */\n isSuccess(): boolean;\n\n /** Return a traceparent compatible header string */\n toTraceparent(): string;\n\n /** Convert the object to JSON for w. spans array info only */\n getTraceContext(): {\n data?: { [key: string]: any };\n description?: string;\n op?: string;\n parent_span_id?: string;\n span_id: string;\n status?: string;\n tags?: { [key: string]: string };\n trace_id: string;\n };\n /** Convert the object to JSON */\n toJSON(): {\n data?: { [key: string]: any };\n description?: string;\n op?: string;\n parent_span_id?: string;\n span_id: string;\n start_timestamp: number;\n status?: string;\n tags?: { [key: string]: string };\n timestamp?: number;\n trace_id: string;\n };\n}\n"]}
1
+ {"version":3,"file":"span.js","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"","sourcesContent":["import { Transaction } from './transaction';\n\n/** Interface holding all properties that can be set on a Span on creation. */\nexport interface SpanContext {\n /**\n * Description of the Span.\n */\n description?: string;\n\n /**\n * Operation of the Span.\n */\n op?: string;\n\n /**\n * Completion status of the Span.\n * See: {@sentry/apm SpanStatus} for possible values\n */\n status?: string;\n\n /**\n * Parent Span ID\n */\n parentSpanId?: string;\n\n /**\n * Was this span chosen to be sent as part of the sample?\n */\n sampled?: boolean;\n\n /**\n * Span ID\n */\n spanId?: string;\n\n /**\n * Trace ID\n */\n traceId?: string;\n\n /**\n * Tags of the Span.\n */\n tags?: { [key: string]: string };\n\n /**\n * Data of the Span.\n */\n data?: { [key: string]: any };\n\n /**\n * Timestamp in seconds (epoch time) indicating when the span started.\n */\n startTimestamp?: number;\n\n /**\n * Timestamp in seconds (epoch time) indicating when the span ended.\n */\n endTimestamp?: number;\n}\n\n/** Span holding trace_id, span_id */\nexport interface Span extends SpanContext {\n /**\n * @inheritDoc\n */\n spanId: string;\n\n /**\n * @inheritDoc\n */\n traceId: string;\n\n /**\n * @inheritDoc\n */\n startTimestamp: number;\n\n /**\n * @inheritDoc\n */\n tags: { [key: string]: string };\n\n /**\n * @inheritDoc\n */\n data: { [key: string]: any };\n\n /**\n * The transaction containing this span\n */\n transaction?: Transaction;\n\n /**\n * Sets the finish timestamp on the current span.\n * @param endTimestamp Takes an endTimestamp if the end should not be the time when you call this function.\n */\n finish(endTimestamp?: number): void;\n\n /**\n * Sets the tag attribute on the current span\n * @param key Tag key\n * @param value Tag value\n */\n setTag(key: string, value: string): this;\n\n /**\n * Sets the data attribute on the current span\n * @param key Data key\n * @param value Data value\n */\n setData(key: string, value: any): this;\n\n /**\n * Sets the status attribute on the current span\n * See: {@sentry/apm SpanStatus} for possible values\n * @param status http code used to set the status\n */\n setStatus(status: string): this;\n\n /**\n * Sets the status attribute on the current span based on the http code\n * @param httpStatus http code used to set the status\n */\n setHttpStatus(httpStatus: number): this;\n\n /**\n * Use {@link startChild}\n * @deprecated\n */\n child(\n spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'spanId' | 'sampled' | 'traceId' | 'parentSpanId'>>,\n ): Span;\n\n /**\n * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.\n * Also the `sampled` decision will be inherited.\n */\n startChild(\n spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'spanId' | 'sampled' | 'traceId' | 'parentSpanId'>>,\n ): Span;\n\n /**\n * Determines whether span was successful (HTTP200)\n */\n isSuccess(): boolean;\n\n /** Return a traceparent compatible header string */\n toTraceparent(): string;\n\n /** Convert the object to JSON for w. spans array info only */\n getTraceContext(): {\n data?: { [key: string]: any };\n description?: string;\n op?: string;\n parent_span_id?: string;\n span_id: string;\n status?: string;\n tags?: { [key: string]: string };\n trace_id: string;\n };\n /** Convert the object to JSON */\n toJSON(): {\n data?: { [key: string]: any };\n description?: string;\n op?: string;\n parent_span_id?: string;\n span_id: string;\n start_timestamp: number;\n status?: string;\n tags?: { [key: string]: string };\n timestamp?: number;\n trace_id: string;\n };\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export declare type Context = Record<string, unknown>;
2
+ export declare type Contexts = Record<string, Context>;
3
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,oBAAY,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC9C,oBAAY,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}
package/esm/context.js ADDED
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"","sourcesContent":["export type Context = Record<string, unknown>;\nexport type Contexts = Record<string, Context>;\n"]}
package/esm/event.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { Breadcrumb } from './breadcrumb';
2
+ import { Contexts } from './context';
2
3
  import { Exception } from './exception';
4
+ import { Extras } from './extra';
3
5
  import { Request } from './request';
4
6
  import { CaptureContext } from './scope';
5
7
  import { SdkInfo } from './sdkinfo';
@@ -32,15 +34,11 @@ export interface Event {
32
34
  };
33
35
  stacktrace?: Stacktrace;
34
36
  breadcrumbs?: Breadcrumb[];
35
- contexts?: {
36
- [key: string]: Record<any, any>;
37
- };
37
+ contexts?: Contexts;
38
38
  tags?: {
39
39
  [key: string]: string;
40
40
  };
41
- extra?: {
42
- [key: string]: any;
43
- };
41
+ extra?: Extras;
44
42
  user?: User;
45
43
  type?: EventType;
46
44
  spans?: Span[];
@@ -1 +1 @@
1
- {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,YAAY;AACZ,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,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AAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE;QACV,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;KACtB,CAAC;IACF,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;CAChB;AAED,YAAY;AACZ,oBAAY,SAAS,GAAG,aAAa,CAAC;AAEtC,YAAY;AACZ,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,kBAAkB,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAClC,iBAAiB,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAAC;IAC1C,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ"}
package/esm/event.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"event.js","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport { Exception } from './exception';\nimport { Request } from './request';\nimport { CaptureContext } from './scope';\nimport { SdkInfo } from './sdkinfo';\nimport { Severity } from './severity';\nimport { Span } from './span';\nimport { Stacktrace } from './stacktrace';\nimport { User } from './user';\n\n/** JSDoc */\nexport interface Event {\n event_id?: string;\n message?: string;\n timestamp?: number;\n start_timestamp?: number;\n level?: Severity;\n platform?: string;\n logger?: string;\n server_name?: string;\n release?: string;\n dist?: string;\n environment?: string;\n sdk?: SdkInfo;\n request?: Request;\n transaction?: string;\n modules?: { [key: string]: string };\n fingerprint?: string[];\n exception?: {\n values?: Exception[];\n };\n stacktrace?: Stacktrace;\n breadcrumbs?: Breadcrumb[];\n contexts?: {\n [key: string]: Record<any, any>;\n };\n tags?: { [key: string]: string };\n extra?: { [key: string]: any };\n user?: User;\n type?: EventType;\n spans?: Span[];\n}\n\n/** JSDoc */\nexport type EventType = 'transaction';\n\n/** JSDoc */\nexport interface EventHint {\n event_id?: string;\n captureContext?: CaptureContext;\n syntheticException?: Error | null;\n originalException?: Error | string | null;\n data?: any;\n}\n"]}
1
+ {"version":3,"file":"event.js","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport { Contexts } from './context';\nimport { Exception } from './exception';\nimport { Extras } from './extra';\nimport { Request } from './request';\nimport { CaptureContext } from './scope';\nimport { SdkInfo } from './sdkinfo';\nimport { Severity } from './severity';\nimport { Span } from './span';\nimport { Stacktrace } from './stacktrace';\nimport { User } from './user';\n\n/** JSDoc */\nexport interface Event {\n event_id?: string;\n message?: string;\n timestamp?: number;\n start_timestamp?: number;\n level?: Severity;\n platform?: string;\n logger?: string;\n server_name?: string;\n release?: string;\n dist?: string;\n environment?: string;\n sdk?: SdkInfo;\n request?: Request;\n transaction?: string;\n modules?: { [key: string]: string };\n fingerprint?: string[];\n exception?: {\n values?: Exception[];\n };\n stacktrace?: Stacktrace;\n breadcrumbs?: Breadcrumb[];\n contexts?: Contexts;\n tags?: { [key: string]: string };\n extra?: Extras;\n user?: User;\n type?: EventType;\n spans?: Span[];\n}\n\n/** JSDoc */\nexport type EventType = 'transaction';\n\n/** JSDoc */\nexport interface EventHint {\n event_id?: string;\n captureContext?: CaptureContext;\n syntheticException?: Error | null;\n originalException?: Error | string | null;\n data?: any;\n}\n"]}
package/esm/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { Breadcrumb, BreadcrumbHint } from './breadcrumb';
2
2
  export { Client } from './client';
3
+ export { Context, Contexts } from './context';
3
4
  export { Dsn, DsnComponents, DsnLike, DsnProtocol } from './dsn';
4
5
  export { ExtendedError } from './error';
5
6
  export { Event, EventHint } from './event';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW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AAE,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":"AAUA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAUtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAItC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["export { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nexport { Client } from './client';\nexport { Dsn, DsnComponents, DsnLike, DsnProtocol } from './dsn';\nexport { ExtendedError } from './error';\nexport { Event, EventHint } from './event';\nexport { EventProcessor } from './eventprocessor';\nexport { Exception } from './exception';\nexport { Extra, Extras } from './extra';\nexport { Hub } from './hub';\nexport { Integration, IntegrationClass } from './integration';\nexport { LogLevel } from './loglevel';\nexport { Mechanism } from './mechanism';\nexport { ExtractedNodeRequestData, WorkerLocation } from './misc';\nexport { Options } from './options';\nexport { Package } from './package';\nexport { Request } from './request';\nexport { Response } from './response';\nexport { Runtime } from './runtime';\nexport { CaptureContext, Scope, ScopeContext } from './scope';\nexport { SdkInfo } from './sdkinfo';\nexport { Severity } from './severity';\nexport { Span, SpanContext } from './span';\nexport { StackFrame } from './stackframe';\nexport { Stacktrace } from './stacktrace';\nexport { Status } from './status';\nexport {\n CustomSamplingContext,\n SamplingContext,\n TraceparentData,\n Transaction,\n TransactionContext,\n} from './transaction';\nexport { Thread } from './thread';\nexport { Transport, TransportOptions, TransportClass } from './transport';\nexport { User } from './user';\nexport { WrappedFunction } from './wrappedfunction';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAUtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAItC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["export { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nexport { Client } from './client';\nexport { Context, Contexts } from './context';\nexport { Dsn, DsnComponents, DsnLike, DsnProtocol } from './dsn';\nexport { ExtendedError } from './error';\nexport { Event, EventHint } from './event';\nexport { EventProcessor } from './eventprocessor';\nexport { Exception } from './exception';\nexport { Extra, Extras } from './extra';\nexport { Hub } from './hub';\nexport { Integration, IntegrationClass } from './integration';\nexport { LogLevel } from './loglevel';\nexport { Mechanism } from './mechanism';\nexport { ExtractedNodeRequestData, WorkerLocation } from './misc';\nexport { Options } from './options';\nexport { Package } from './package';\nexport { Request } from './request';\nexport { Response } from './response';\nexport { Runtime } from './runtime';\nexport { CaptureContext, Scope, ScopeContext } from './scope';\nexport { SdkInfo } from './sdkinfo';\nexport { Severity } from './severity';\nexport { Span, SpanContext } from './span';\nexport { StackFrame } from './stackframe';\nexport { Stacktrace } from './stacktrace';\nexport { Status } from './status';\nexport {\n CustomSamplingContext,\n SamplingContext,\n TraceparentData,\n Transaction,\n TransactionContext,\n} from './transaction';\nexport { Thread } from './thread';\nexport { Transport, TransportOptions, TransportClass } from './transport';\nexport { User } from './user';\nexport { WrappedFunction } from './wrappedfunction';\n"]}
package/esm/scope.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Breadcrumb } from './breadcrumb';
2
+ import { Context, Contexts } from './context';
2
3
  import { EventProcessor } from './eventprocessor';
3
4
  import { Extra, Extras } from './extra';
4
5
  import { Severity } from './severity';
@@ -11,12 +12,8 @@ export declare type CaptureContext = Scope | Partial<ScopeContext> | ((scope: Sc
11
12
  export interface ScopeContext {
12
13
  user: User;
13
14
  level: Severity;
14
- extra: {
15
- [key: string]: any;
16
- };
17
- contexts: {
18
- [key: string]: any;
19
- };
15
+ extra: Extras;
16
+ contexts: Contexts;
20
17
  tags: {
21
18
  [key: string]: string;
22
19
  };
@@ -56,7 +53,7 @@ export interface Scope {
56
53
  /**
57
54
  * Set key:value that will be sent as extra data with the event.
58
55
  * @param key String of extra
59
- * @param extra Any kind of data. This data will be normailzed.
56
+ * @param extra Any kind of data. This data will be normalized.
60
57
  */
61
58
  setExtra(key: string, extra: Extra): this;
62
59
  /**
@@ -76,11 +73,9 @@ export interface Scope {
76
73
  /**
77
74
  * Sets context data with the given name.
78
75
  * @param name of the context
79
- * @param context Any kind of data. This data will be normailzed.
76
+ * @param context an object containing context data. This data will be normalized. Pass `null` to unset the context.
80
77
  */
81
- setContext(name: string, context: {
82
- [key: string]: any;
83
- } | null): this;
78
+ setContext(name: string, context: Context | null): this;
84
79
  /**
85
80
  * Sets the Span on the scope.
86
81
  * @param span Span
@@ -1 +1 @@
1
- {"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,aAAa;AACb,oBAAY,cAAc,GAAG,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,CAAC,CAAC;AAEvF,aAAa;AACb,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,QAAQ,CAAC;IAChB,KAAK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AE,cAAc,GAAG,IAAI,CAAC;IAE9C,0DAA0D;IAC1D,KAAK,IAAI,IAAI,CAAC;IAEd;;;;OAIG;IACH,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErE;;OAEG;IACH,gBAAgB,IAAI,IAAI,CAAC;CAC1B"}
package/esm/scope.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"scope.js","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport { EventProcessor } from './eventprocessor';\nimport { Extra, Extras } from './extra';\nimport { Severity } from './severity';\nimport { Span } from './span';\nimport { Transaction } from './transaction';\nimport { User } from './user';\n\n/** JSDocs */\nexport type CaptureContext = Scope | Partial<ScopeContext> | ((scope: Scope) => Scope);\n\n/** JSDocs */\nexport interface ScopeContext {\n user: User;\n level: Severity;\n extra: { [key: string]: any };\n contexts: { [key: string]: any };\n tags: { [key: string]: string };\n fingerprint: string[];\n}\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport interface Scope {\n /** Add new event processor that will be called after {@link applyToEvent}. */\n addEventProcessor(callback: EventProcessor): this;\n\n /**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\n setUser(user: User | null): this;\n\n /**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\n setTags(tags: { [key: string]: string }): this;\n\n /**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\n setTag(key: string, value: string): this;\n\n /**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\n setExtras(extras: Extras): this;\n\n /**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normailzed.\n */\n setExtra(key: string, extra: Extra): this;\n\n /**\n * Sets the fingerprint on the scope to send with the events.\n * @param fingerprint string[] to group events in Sentry.\n */\n setFingerprint(fingerprint: string[]): this;\n\n /**\n * Sets the level on the scope for future events.\n * @param level string {@link Severity}\n */\n setLevel(level: Severity): this;\n\n /**\n * Sets the transaction name on the scope for future events.\n */\n setTransactionName(name?: string): this;\n\n /**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normailzed.\n */\n setContext(name: string, context: { [key: string]: any } | null): this;\n\n /**\n * Sets the Span on the scope.\n * @param span Span\n */\n setSpan(span?: Span): this;\n\n /**\n * Returns the `Span` if there is one\n */\n getSpan(): Span | undefined;\n\n /**\n * Returns the `Transaction` attached to the scope (if there is one)\n */\n getTransaction(): Transaction | undefined;\n\n /**\n * Updates the scope with provided data. Can work in three variations:\n * - plain object containing updatable attributes\n * - Scope instance that'll extract the attributes from\n * - callback function that'll receive the current scope as an argument and allow for modifications\n * @param captureContext scope modifier to be used\n */\n update(captureContext?: CaptureContext): this;\n\n /** Clears the current scope and resets its properties. */\n clear(): this;\n\n /**\n * Sets the breadcrumbs in the scope\n * @param breadcrumbs Breadcrumb\n * @param maxBreadcrumbs number of max breadcrumbs to merged into event.\n */\n addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this;\n\n /**\n * Clears all currently set Breadcrumbs.\n */\n clearBreadcrumbs(): this;\n}\n"]}
1
+ {"version":3,"file":"scope.js","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport { Context, Contexts } from './context';\nimport { EventProcessor } from './eventprocessor';\nimport { Extra, Extras } from './extra';\nimport { Severity } from './severity';\nimport { Span } from './span';\nimport { Transaction } from './transaction';\nimport { User } from './user';\n\n/** JSDocs */\nexport type CaptureContext = Scope | Partial<ScopeContext> | ((scope: Scope) => Scope);\n\n/** JSDocs */\nexport interface ScopeContext {\n user: User;\n level: Severity;\n extra: Extras;\n contexts: Contexts;\n tags: { [key: string]: string };\n fingerprint: string[];\n}\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport interface Scope {\n /** Add new event processor that will be called after {@link applyToEvent}. */\n addEventProcessor(callback: EventProcessor): this;\n\n /**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\n setUser(user: User | null): this;\n\n /**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\n setTags(tags: { [key: string]: string }): this;\n\n /**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\n setTag(key: string, value: string): this;\n\n /**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\n setExtras(extras: Extras): this;\n\n /**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\n setExtra(key: string, extra: Extra): this;\n\n /**\n * Sets the fingerprint on the scope to send with the events.\n * @param fingerprint string[] to group events in Sentry.\n */\n setFingerprint(fingerprint: string[]): this;\n\n /**\n * Sets the level on the scope for future events.\n * @param level string {@link Severity}\n */\n setLevel(level: Severity): this;\n\n /**\n * Sets the transaction name on the scope for future events.\n */\n setTransactionName(name?: string): this;\n\n /**\n * Sets context data with the given name.\n * @param name of the context\n * @param context an object containing context data. This data will be normalized. Pass `null` to unset the context.\n */\n setContext(name: string, context: Context | null): this;\n\n /**\n * Sets the Span on the scope.\n * @param span Span\n */\n setSpan(span?: Span): this;\n\n /**\n * Returns the `Span` if there is one\n */\n getSpan(): Span | undefined;\n\n /**\n * Returns the `Transaction` attached to the scope (if there is one)\n */\n getTransaction(): Transaction | undefined;\n\n /**\n * Updates the scope with provided data. Can work in three variations:\n * - plain object containing updatable attributes\n * - Scope instance that'll extract the attributes from\n * - callback function that'll receive the current scope as an argument and allow for modifications\n * @param captureContext scope modifier to be used\n */\n update(captureContext?: CaptureContext): this;\n\n /** Clears the current scope and resets its properties. */\n clear(): this;\n\n /**\n * Sets the breadcrumbs in the scope\n * @param breadcrumbs Breadcrumb\n * @param maxBreadcrumbs number of max breadcrumbs to merged into event.\n */\n addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this;\n\n /**\n * Clears all currently set Breadcrumbs.\n */\n clearBreadcrumbs(): this;\n}\n"]}
package/esm/span.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { Transaction } from './transaction';
1
2
  /** Interface holding all properties that can be set on a Span on creation. */
2
3
  export interface SpanContext {
3
4
  /**
@@ -76,6 +77,10 @@ export interface Span extends SpanContext {
76
77
  data: {
77
78
  [key: string]: any;
78
79
  };
80
+ /**
81
+ * The transaction containing this span
82
+ */
83
+ transaction?: Transaction;
79
84
  /**
80
85
  * Sets the finish timestamp on the current span.
81
86
  * @param endTimestamp Takes an endTimestamp if the end should not be the time when you call this function.
package/esm/span.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAEjC;;OAEG;IACH,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAE9B;;OAEG;IACH,cAA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E,MAAM,CAAC;QACxB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAC;QACjC,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH"}
package/esm/span.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"span.js","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"","sourcesContent":["/** Interface holding all properties that can be set on a Span on creation. */\nexport interface SpanContext {\n /**\n * Description of the Span.\n */\n description?: string;\n\n /**\n * Operation of the Span.\n */\n op?: string;\n\n /**\n * Completion status of the Span.\n * See: {@sentry/apm SpanStatus} for possible values\n */\n status?: string;\n\n /**\n * Parent Span ID\n */\n parentSpanId?: string;\n\n /**\n * Was this span chosen to be sent as part of the sample?\n */\n sampled?: boolean;\n\n /**\n * Span ID\n */\n spanId?: string;\n\n /**\n * Trace ID\n */\n traceId?: string;\n\n /**\n * Tags of the Span.\n */\n tags?: { [key: string]: string };\n\n /**\n * Data of the Span.\n */\n data?: { [key: string]: any };\n\n /**\n * Timestamp in seconds (epoch time) indicating when the span started.\n */\n startTimestamp?: number;\n\n /**\n * Timestamp in seconds (epoch time) indicating when the span ended.\n */\n endTimestamp?: number;\n}\n\n/** Span holding trace_id, span_id */\nexport interface Span extends SpanContext {\n /**\n * @inheritDoc\n */\n spanId: string;\n\n /**\n * @inheritDoc\n */\n traceId: string;\n\n /**\n * @inheritDoc\n */\n startTimestamp: number;\n\n /**\n * @inheritDoc\n */\n tags: { [key: string]: string };\n\n /**\n * @inheritDoc\n */\n data: { [key: string]: any };\n\n /**\n * Sets the finish timestamp on the current span.\n * @param endTimestamp Takes an endTimestamp if the end should not be the time when you call this function.\n */\n finish(endTimestamp?: number): void;\n\n /**\n * Sets the tag attribute on the current span\n * @param key Tag key\n * @param value Tag value\n */\n setTag(key: string, value: string): this;\n\n /**\n * Sets the data attribute on the current span\n * @param key Data key\n * @param value Data value\n */\n setData(key: string, value: any): this;\n\n /**\n * Sets the status attribute on the current span\n * See: {@sentry/apm SpanStatus} for possible values\n * @param status http code used to set the status\n */\n setStatus(status: string): this;\n\n /**\n * Sets the status attribute on the current span based on the http code\n * @param httpStatus http code used to set the status\n */\n setHttpStatus(httpStatus: number): this;\n\n /**\n * Use {@link startChild}\n * @deprecated\n */\n child(\n spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'spanId' | 'sampled' | 'traceId' | 'parentSpanId'>>,\n ): Span;\n\n /**\n * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.\n * Also the `sampled` decision will be inherited.\n */\n startChild(\n spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'spanId' | 'sampled' | 'traceId' | 'parentSpanId'>>,\n ): Span;\n\n /**\n * Determines whether span was successful (HTTP200)\n */\n isSuccess(): boolean;\n\n /** Return a traceparent compatible header string */\n toTraceparent(): string;\n\n /** Convert the object to JSON for w. spans array info only */\n getTraceContext(): {\n data?: { [key: string]: any };\n description?: string;\n op?: string;\n parent_span_id?: string;\n span_id: string;\n status?: string;\n tags?: { [key: string]: string };\n trace_id: string;\n };\n /** Convert the object to JSON */\n toJSON(): {\n data?: { [key: string]: any };\n description?: string;\n op?: string;\n parent_span_id?: string;\n span_id: string;\n start_timestamp: number;\n status?: string;\n tags?: { [key: string]: string };\n timestamp?: number;\n trace_id: string;\n };\n}\n"]}
1
+ {"version":3,"file":"span.js","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"","sourcesContent":["import { Transaction } from './transaction';\n\n/** Interface holding all properties that can be set on a Span on creation. */\nexport interface SpanContext {\n /**\n * Description of the Span.\n */\n description?: string;\n\n /**\n * Operation of the Span.\n */\n op?: string;\n\n /**\n * Completion status of the Span.\n * See: {@sentry/apm SpanStatus} for possible values\n */\n status?: string;\n\n /**\n * Parent Span ID\n */\n parentSpanId?: string;\n\n /**\n * Was this span chosen to be sent as part of the sample?\n */\n sampled?: boolean;\n\n /**\n * Span ID\n */\n spanId?: string;\n\n /**\n * Trace ID\n */\n traceId?: string;\n\n /**\n * Tags of the Span.\n */\n tags?: { [key: string]: string };\n\n /**\n * Data of the Span.\n */\n data?: { [key: string]: any };\n\n /**\n * Timestamp in seconds (epoch time) indicating when the span started.\n */\n startTimestamp?: number;\n\n /**\n * Timestamp in seconds (epoch time) indicating when the span ended.\n */\n endTimestamp?: number;\n}\n\n/** Span holding trace_id, span_id */\nexport interface Span extends SpanContext {\n /**\n * @inheritDoc\n */\n spanId: string;\n\n /**\n * @inheritDoc\n */\n traceId: string;\n\n /**\n * @inheritDoc\n */\n startTimestamp: number;\n\n /**\n * @inheritDoc\n */\n tags: { [key: string]: string };\n\n /**\n * @inheritDoc\n */\n data: { [key: string]: any };\n\n /**\n * The transaction containing this span\n */\n transaction?: Transaction;\n\n /**\n * Sets the finish timestamp on the current span.\n * @param endTimestamp Takes an endTimestamp if the end should not be the time when you call this function.\n */\n finish(endTimestamp?: number): void;\n\n /**\n * Sets the tag attribute on the current span\n * @param key Tag key\n * @param value Tag value\n */\n setTag(key: string, value: string): this;\n\n /**\n * Sets the data attribute on the current span\n * @param key Data key\n * @param value Data value\n */\n setData(key: string, value: any): this;\n\n /**\n * Sets the status attribute on the current span\n * See: {@sentry/apm SpanStatus} for possible values\n * @param status http code used to set the status\n */\n setStatus(status: string): this;\n\n /**\n * Sets the status attribute on the current span based on the http code\n * @param httpStatus http code used to set the status\n */\n setHttpStatus(httpStatus: number): this;\n\n /**\n * Use {@link startChild}\n * @deprecated\n */\n child(\n spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'spanId' | 'sampled' | 'traceId' | 'parentSpanId'>>,\n ): Span;\n\n /**\n * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.\n * Also the `sampled` decision will be inherited.\n */\n startChild(\n spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'spanId' | 'sampled' | 'traceId' | 'parentSpanId'>>,\n ): Span;\n\n /**\n * Determines whether span was successful (HTTP200)\n */\n isSuccess(): boolean;\n\n /** Return a traceparent compatible header string */\n toTraceparent(): string;\n\n /** Convert the object to JSON for w. spans array info only */\n getTraceContext(): {\n data?: { [key: string]: any };\n description?: string;\n op?: string;\n parent_span_id?: string;\n span_id: string;\n status?: string;\n tags?: { [key: string]: string };\n trace_id: string;\n };\n /** Convert the object to JSON */\n toJSON(): {\n data?: { [key: string]: any };\n description?: string;\n op?: string;\n parent_span_id?: string;\n span_id: string;\n start_timestamp: number;\n status?: string;\n tags?: { [key: string]: string };\n timestamp?: number;\n trace_id: string;\n };\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/types",
3
- "version": "5.24.2",
3
+ "version": "5.25.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": "5.24.2",
19
+ "@sentry-internal/eslint-config-sdk": "5.25.0",
20
20
  "eslint": "7.6.0",
21
21
  "npm-run-all": "^4.1.2",
22
22
  "prettier": "1.19.0",
@@ -38,5 +38,8 @@
38
38
  "fix:eslint": "eslint . --format stylish --fix",
39
39
  "pack": "npm pack"
40
40
  },
41
+ "volta": {
42
+ "extends": "../../package.json"
43
+ },
41
44
  "sideEffects": false
42
45
  }