@sentry/types 8.41.0 → 8.43.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.
Files changed (177) hide show
  1. package/README.md +5 -1
  2. package/build/esm/package.json +1 -1
  3. package/build/types/index.d.ts +377 -53
  4. package/build/types/index.d.ts.map +1 -1
  5. package/build/types-ts3.8/index.d.ts +377 -53
  6. package/package.json +4 -1
  7. package/build/types/attachment.d.ts +0 -29
  8. package/build/types/attachment.d.ts.map +0 -1
  9. package/build/types/breadcrumb.d.ts +0 -96
  10. package/build/types/breadcrumb.d.ts.map +0 -1
  11. package/build/types/browseroptions.d.ts +0 -25
  12. package/build/types/browseroptions.d.ts.map +0 -1
  13. package/build/types/checkin.d.ts +0 -100
  14. package/build/types/checkin.d.ts.map +0 -1
  15. package/build/types/client.d.ts +0 -323
  16. package/build/types/client.d.ts.map +0 -1
  17. package/build/types/clientreport.d.ts +0 -12
  18. package/build/types/clientreport.d.ts.map +0 -1
  19. package/build/types/context.d.ts +0 -119
  20. package/build/types/context.d.ts.map +0 -1
  21. package/build/types/datacategory.d.ts +0 -2
  22. package/build/types/datacategory.d.ts.map +0 -1
  23. package/build/types/debugMeta.d.ts +0 -28
  24. package/build/types/debugMeta.d.ts.map +0 -1
  25. package/build/types/dsn.d.ts +0 -22
  26. package/build/types/dsn.d.ts.map +0 -1
  27. package/build/types/envelope.d.ts +0 -127
  28. package/build/types/envelope.d.ts.map +0 -1
  29. package/build/types/error.d.ts +0 -7
  30. package/build/types/error.d.ts.map +0 -1
  31. package/build/types/event.d.ts +0 -99
  32. package/build/types/event.d.ts.map +0 -1
  33. package/build/types/eventprocessor.d.ts +0 -12
  34. package/build/types/eventprocessor.d.ts.map +0 -1
  35. package/build/types/exception.d.ts +0 -12
  36. package/build/types/exception.d.ts.map +0 -1
  37. package/build/types/extra.d.ts +0 -3
  38. package/build/types/extra.d.ts.map +0 -1
  39. package/build/types/feedback/config.d.ts +0 -178
  40. package/build/types/feedback/config.d.ts.map +0 -1
  41. package/build/types/feedback/form.d.ts +0 -8
  42. package/build/types/feedback/form.d.ts.map +0 -1
  43. package/build/types/feedback/index.d.ts +0 -71
  44. package/build/types/feedback/index.d.ts.map +0 -1
  45. package/build/types/feedback/sendFeedback.d.ts +0 -49
  46. package/build/types/feedback/sendFeedback.d.ts.map +0 -1
  47. package/build/types/feedback/theme.d.ts +0 -35
  48. package/build/types/feedback/theme.d.ts.map +0 -1
  49. package/build/types/hub.d.ts +0 -195
  50. package/build/types/hub.d.ts.map +0 -1
  51. package/build/types/instrument.d.ts +0 -69
  52. package/build/types/instrument.d.ts.map +0 -1
  53. package/build/types/integration.d.ts +0 -52
  54. package/build/types/integration.d.ts.map +0 -1
  55. package/build/types/measurement.d.ts +0 -24
  56. package/build/types/measurement.d.ts.map +0 -1
  57. package/build/types/mechanism.d.ts +0 -51
  58. package/build/types/mechanism.d.ts.map +0 -1
  59. package/build/types/metrics.d.ts +0 -94
  60. package/build/types/metrics.d.ts.map +0 -1
  61. package/build/types/misc.d.ts +0 -53
  62. package/build/types/misc.d.ts.map +0 -1
  63. package/build/types/opentelemetry.d.ts +0 -14
  64. package/build/types/opentelemetry.d.ts.map +0 -1
  65. package/build/types/options.d.ts +0 -315
  66. package/build/types/options.d.ts.map +0 -1
  67. package/build/types/package.d.ts +0 -8
  68. package/build/types/package.d.ts.map +0 -1
  69. package/build/types/parameterize.d.ts +0 -5
  70. package/build/types/parameterize.d.ts.map +0 -1
  71. package/build/types/polymorphics.d.ts +0 -71
  72. package/build/types/polymorphics.d.ts.map +0 -1
  73. package/build/types/profiling.d.ts +0 -143
  74. package/build/types/profiling.d.ts.map +0 -1
  75. package/build/types/replay.d.ts +0 -25
  76. package/build/types/replay.d.ts.map +0 -1
  77. package/build/types/request.d.ts +0 -38
  78. package/build/types/request.d.ts.map +0 -1
  79. package/build/types/runtime.d.ts +0 -6
  80. package/build/types/runtime.d.ts.map +0 -1
  81. package/build/types/samplingcontext.d.ts +0 -41
  82. package/build/types/samplingcontext.d.ts.map +0 -1
  83. package/build/types/scope.d.ts +0 -241
  84. package/build/types/scope.d.ts.map +0 -1
  85. package/build/types/sdkinfo.d.ts +0 -8
  86. package/build/types/sdkinfo.d.ts.map +0 -1
  87. package/build/types/sdkmetadata.d.ts +0 -5
  88. package/build/types/sdkmetadata.d.ts.map +0 -1
  89. package/build/types/session.d.ts +0 -75
  90. package/build/types/session.d.ts.map +0 -1
  91. package/build/types/severity.d.ts +0 -2
  92. package/build/types/severity.d.ts.map +0 -1
  93. package/build/types/span.d.ts +0 -222
  94. package/build/types/span.d.ts.map +0 -1
  95. package/build/types/spanStatus.d.ts +0 -59
  96. package/build/types/spanStatus.d.ts.map +0 -1
  97. package/build/types/stackframe.d.ts +0 -22
  98. package/build/types/stackframe.d.ts.map +0 -1
  99. package/build/types/stacktrace.d.ts +0 -10
  100. package/build/types/stacktrace.d.ts.map +0 -1
  101. package/build/types/startSpanOptions.d.ts +0 -46
  102. package/build/types/startSpanOptions.d.ts.map +0 -1
  103. package/build/types/thread.d.ts +0 -10
  104. package/build/types/thread.d.ts.map +0 -1
  105. package/build/types/timedEvent.d.ts +0 -7
  106. package/build/types/timedEvent.d.ts.map +0 -1
  107. package/build/types/tracing.d.ts +0 -51
  108. package/build/types/tracing.d.ts.map +0 -1
  109. package/build/types/transaction.d.ts +0 -35
  110. package/build/types/transaction.d.ts.map +0 -1
  111. package/build/types/transport.d.ts +0 -32
  112. package/build/types/transport.d.ts.map +0 -1
  113. package/build/types/user.d.ts +0 -17
  114. package/build/types/user.d.ts.map +0 -1
  115. package/build/types/view-hierarchy.d.ts +0 -18
  116. package/build/types/view-hierarchy.d.ts.map +0 -1
  117. package/build/types/webfetchapi.d.ts +0 -15
  118. package/build/types/webfetchapi.d.ts.map +0 -1
  119. package/build/types/wrappedfunction.d.ts +0 -7
  120. package/build/types/wrappedfunction.d.ts.map +0 -1
  121. package/build/types-ts3.8/attachment.d.ts +0 -29
  122. package/build/types-ts3.8/breadcrumb.d.ts +0 -96
  123. package/build/types-ts3.8/browseroptions.d.ts +0 -25
  124. package/build/types-ts3.8/checkin.d.ts +0 -100
  125. package/build/types-ts3.8/client.d.ts +0 -323
  126. package/build/types-ts3.8/clientreport.d.ts +0 -12
  127. package/build/types-ts3.8/context.d.ts +0 -119
  128. package/build/types-ts3.8/datacategory.d.ts +0 -2
  129. package/build/types-ts3.8/debugMeta.d.ts +0 -28
  130. package/build/types-ts3.8/dsn.d.ts +0 -22
  131. package/build/types-ts3.8/envelope.d.ts +0 -136
  132. package/build/types-ts3.8/error.d.ts +0 -7
  133. package/build/types-ts3.8/event.d.ts +0 -99
  134. package/build/types-ts3.8/eventprocessor.d.ts +0 -12
  135. package/build/types-ts3.8/exception.d.ts +0 -12
  136. package/build/types-ts3.8/extra.d.ts +0 -3
  137. package/build/types-ts3.8/feedback/config.d.ts +0 -178
  138. package/build/types-ts3.8/feedback/form.d.ts +0 -8
  139. package/build/types-ts3.8/feedback/index.d.ts +0 -71
  140. package/build/types-ts3.8/feedback/sendFeedback.d.ts +0 -49
  141. package/build/types-ts3.8/feedback/theme.d.ts +0 -35
  142. package/build/types-ts3.8/hub.d.ts +0 -195
  143. package/build/types-ts3.8/instrument.d.ts +0 -69
  144. package/build/types-ts3.8/integration.d.ts +0 -52
  145. package/build/types-ts3.8/measurement.d.ts +0 -24
  146. package/build/types-ts3.8/mechanism.d.ts +0 -51
  147. package/build/types-ts3.8/metrics.d.ts +0 -94
  148. package/build/types-ts3.8/misc.d.ts +0 -53
  149. package/build/types-ts3.8/opentelemetry.d.ts +0 -17
  150. package/build/types-ts3.8/options.d.ts +0 -315
  151. package/build/types-ts3.8/package.d.ts +0 -8
  152. package/build/types-ts3.8/parameterize.d.ts +0 -5
  153. package/build/types-ts3.8/polymorphics.d.ts +0 -71
  154. package/build/types-ts3.8/profiling.d.ts +0 -143
  155. package/build/types-ts3.8/replay.d.ts +0 -25
  156. package/build/types-ts3.8/request.d.ts +0 -41
  157. package/build/types-ts3.8/runtime.d.ts +0 -6
  158. package/build/types-ts3.8/samplingcontext.d.ts +0 -41
  159. package/build/types-ts3.8/scope.d.ts +0 -241
  160. package/build/types-ts3.8/sdkinfo.d.ts +0 -8
  161. package/build/types-ts3.8/sdkmetadata.d.ts +0 -5
  162. package/build/types-ts3.8/session.d.ts +0 -75
  163. package/build/types-ts3.8/severity.d.ts +0 -2
  164. package/build/types-ts3.8/span.d.ts +0 -222
  165. package/build/types-ts3.8/spanStatus.d.ts +0 -59
  166. package/build/types-ts3.8/stackframe.d.ts +0 -22
  167. package/build/types-ts3.8/stacktrace.d.ts +0 -16
  168. package/build/types-ts3.8/startSpanOptions.d.ts +0 -46
  169. package/build/types-ts3.8/thread.d.ts +0 -10
  170. package/build/types-ts3.8/timedEvent.d.ts +0 -7
  171. package/build/types-ts3.8/tracing.d.ts +0 -51
  172. package/build/types-ts3.8/transaction.d.ts +0 -35
  173. package/build/types-ts3.8/transport.d.ts +0 -32
  174. package/build/types-ts3.8/user.d.ts +0 -17
  175. package/build/types-ts3.8/view-hierarchy.d.ts +0 -18
  176. package/build/types-ts3.8/webfetchapi.d.ts +0 -15
  177. package/build/types-ts3.8/wrappedfunction.d.ts +0 -7
@@ -1,8 +0,0 @@
1
- /** JSDoc */
2
- export interface Package {
3
- name: string;
4
- version: string;
5
- dependencies?: Record<string, string>;
6
- devDependencies?: Record<string, string>;
7
- }
8
- //# sourceMappingURL=package.d.ts.map
@@ -1,5 +0,0 @@
1
- export type ParameterizedString = string & {
2
- __sentry_template_string__?: string;
3
- __sentry_template_values__?: string[];
4
- };
5
- //# sourceMappingURL=parameterize.d.ts.map
@@ -1,71 +0,0 @@
1
- /**
2
- * Event-like interface that's usable in browser and node.
3
- *
4
- * Note: Here we mean the kind of events handled by event listeners, not our `Event` type.
5
- *
6
- * Property availability taken from https://developer.mozilla.org/en-US/docs/Web/API/Event#browser_compatibility
7
- */
8
- export interface PolymorphicEvent {
9
- [key: string]: unknown;
10
- readonly type: string;
11
- readonly target?: unknown;
12
- readonly currentTarget?: unknown;
13
- }
14
- /** A `Request` type compatible with Node, Express, browser, etc., because everything is optional */
15
- export type PolymorphicRequest = BaseRequest & BrowserRequest & NodeRequest & ExpressRequest & KoaRequest & NextjsRequest;
16
- type BaseRequest = {
17
- method?: string;
18
- url?: string;
19
- };
20
- type BrowserRequest = BaseRequest;
21
- type NodeRequest = BaseRequest & {
22
- headers?: {
23
- [key: string]: string | string[] | undefined;
24
- };
25
- protocol?: string;
26
- socket?: {
27
- encrypted?: boolean;
28
- remoteAddress?: string;
29
- };
30
- };
31
- type KoaRequest = NodeRequest & {
32
- host?: string;
33
- hostname?: string;
34
- ip?: string;
35
- originalUrl?: string;
36
- };
37
- type NextjsRequest = NodeRequest & {
38
- cookies?: {
39
- [key: string]: string;
40
- };
41
- query?: {
42
- [key: string]: any;
43
- };
44
- };
45
- type ExpressRequest = NodeRequest & {
46
- baseUrl?: string;
47
- body?: string | {
48
- [key: string]: any;
49
- };
50
- host?: string;
51
- hostname?: string;
52
- ip?: string;
53
- originalUrl?: string;
54
- route?: {
55
- path: string;
56
- stack: [
57
- {
58
- name: string;
59
- }
60
- ];
61
- };
62
- query?: {
63
- [key: string]: any;
64
- };
65
- user?: {
66
- [key: string]: any;
67
- };
68
- _reconstructedRoute?: string;
69
- };
70
- export {};
71
- //# sourceMappingURL=polymorphics.d.ts.map
@@ -1,143 +0,0 @@
1
- import { Client } from './client';
2
- import { DebugImage } from './debugMeta';
3
- import { Integration } from './integration';
4
- import { MeasurementUnit } from './measurement';
5
- export interface ContinuousProfiler<T extends Client> {
6
- initialize(client: T): void;
7
- start(): void;
8
- stop(): void;
9
- }
10
- export interface ProfilingIntegration<T extends Client> extends Integration {
11
- _profiler: ContinuousProfiler<T>;
12
- }
13
- export interface Profiler {
14
- startProfiler(): void;
15
- stopProfiler(): void;
16
- }
17
- export type ThreadId = string;
18
- export type FrameId = number;
19
- export type StackId = number;
20
- export interface ThreadCpuSample {
21
- stack_id: StackId;
22
- thread_id: ThreadId;
23
- queue_address?: string;
24
- elapsed_since_start_ns: string;
25
- }
26
- export interface ContinuousThreadCpuSample {
27
- stack_id: StackId;
28
- thread_id: ThreadId;
29
- queue_address?: string;
30
- timestamp: number;
31
- }
32
- export type ThreadCpuStack = FrameId[];
33
- export type ThreadCpuFrame = {
34
- function?: string;
35
- file?: string;
36
- lineno?: number;
37
- colno?: number;
38
- abs_path?: string;
39
- platform?: string;
40
- instruction_addr?: string;
41
- module?: string;
42
- in_app?: boolean;
43
- };
44
- export interface ThreadCpuProfile {
45
- samples: ThreadCpuSample[];
46
- stacks: ThreadCpuStack[];
47
- frames: ThreadCpuFrame[];
48
- thread_metadata: Record<ThreadId, {
49
- name?: string;
50
- priority?: number;
51
- }>;
52
- queue_metadata?: Record<string, {
53
- label: string;
54
- }>;
55
- }
56
- export interface ContinuousThreadCpuProfile {
57
- samples: ContinuousThreadCpuSample[];
58
- stacks: ThreadCpuStack[];
59
- frames: ThreadCpuFrame[];
60
- thread_metadata: Record<ThreadId, {
61
- name?: string;
62
- priority?: number;
63
- }>;
64
- queue_metadata?: Record<string, {
65
- label: string;
66
- }>;
67
- }
68
- interface BaseProfile<T> {
69
- version: string;
70
- release: string;
71
- environment: string;
72
- platform: string;
73
- profile: T;
74
- debug_meta?: {
75
- images: DebugImage[];
76
- };
77
- measurements?: Record<string, {
78
- unit: MeasurementUnit;
79
- values: {
80
- elapsed_since_start_ns: number;
81
- value: number;
82
- }[];
83
- }>;
84
- }
85
- export interface Profile extends BaseProfile<ThreadCpuProfile> {
86
- event_id: string;
87
- version: string;
88
- os: {
89
- name: string;
90
- version: string;
91
- build_number?: string;
92
- };
93
- runtime: {
94
- name: string;
95
- version: string;
96
- };
97
- device: {
98
- architecture: string;
99
- is_emulator: boolean;
100
- locale: string;
101
- manufacturer: string;
102
- model: string;
103
- };
104
- timestamp: string;
105
- release: string;
106
- environment: string;
107
- platform: string;
108
- profile: ThreadCpuProfile;
109
- debug_meta?: {
110
- images: DebugImage[];
111
- };
112
- transaction?: {
113
- name: string;
114
- id: string;
115
- trace_id: string;
116
- active_thread_id: string;
117
- };
118
- transactions?: {
119
- name: string;
120
- id: string;
121
- trace_id: string;
122
- active_thread_id: string;
123
- relative_start_ns: string;
124
- relative_end_ns: string;
125
- }[];
126
- measurements?: Record<string, {
127
- unit: MeasurementUnit;
128
- values: {
129
- elapsed_since_start_ns: number;
130
- value: number;
131
- }[];
132
- }>;
133
- }
134
- export interface ProfileChunk extends BaseProfile<ContinuousThreadCpuProfile> {
135
- chunk_id: string;
136
- profiler_id: string;
137
- client_sdk: {
138
- name: string;
139
- version: string;
140
- };
141
- }
142
- export {};
143
- //# sourceMappingURL=profiling.d.ts.map
@@ -1,25 +0,0 @@
1
- import { Event } from './event';
2
- /**
3
- * NOTE: These types are still considered Beta and subject to change.
4
- * @hidden
5
- */
6
- export interface ReplayEvent extends Event {
7
- urls: string[];
8
- replay_start_timestamp?: number;
9
- error_ids: string[];
10
- trace_ids: string[];
11
- replay_id: string;
12
- segment_id: number;
13
- replay_type: ReplayRecordingMode;
14
- }
15
- /**
16
- * NOTE: These types are still considered Beta and subject to change.
17
- * @hidden
18
- */
19
- export type ReplayRecordingData = string | Uint8Array;
20
- /**
21
- * NOTE: These types are still considered Beta and subject to change.
22
- * @hidden
23
- */
24
- export type ReplayRecordingMode = 'session' | 'buffer';
25
- //# sourceMappingURL=replay.d.ts.map
@@ -1,41 +0,0 @@
1
- /**
2
- * Request data included in an event as sent to Sentry.
3
- */
4
- export interface RequestEventData {
5
- url?: string;
6
- method?: string;
7
- data?: any;
8
- query_string?: QueryParams;
9
- cookies?: {
10
- [key: string]: string;
11
- };
12
- env?: {
13
- [key: string]: string;
14
- };
15
- headers?: {
16
- [key: string]: string;
17
- };
18
- }
19
- /**
20
- * Request data included in an event as sent to Sentry.
21
- * @deprecated: This type will be removed in v9. Use `RequestEventData` instead.
22
- */
23
- export type Request = RequestEventData;
24
- export type QueryParams = string | {
25
- [key: string]: string;
26
- } | Array<[
27
- string,
28
- string
29
- ]>;
30
- /**
31
- * Request data that is considered safe for `span.data` on `http.client` spans
32
- * and for `http` breadcrumbs
33
- * See https://develop.sentry.dev/sdk/data-handling/#structuring-data
34
- */
35
- export type SanitizedRequestData = {
36
- url: string;
37
- 'http.method': string;
38
- 'http.fragment'?: string;
39
- 'http.query'?: string;
40
- };
41
- //# sourceMappingURL=request.d.ts.map
@@ -1,6 +0,0 @@
1
- /** Runtime Context. */
2
- export interface Runtime {
3
- name?: string;
4
- version?: string;
5
- }
6
- //# sourceMappingURL=runtime.d.ts.map
@@ -1,41 +0,0 @@
1
- import { ExtractedNodeRequestData, WorkerLocation } from './misc';
2
- import { SpanAttributes } from './span';
3
- /**
4
- * Context data passed by the user when starting a transaction, to be used by the tracesSampler method.
5
- */
6
- export interface CustomSamplingContext {
7
- [key: string]: any;
8
- }
9
- /**
10
- * Data passed to the `tracesSampler` function, which forms the basis for whatever decisions it might make.
11
- *
12
- * Adds default data to data provided by the user. See {@link Hub.startTransaction}
13
- */
14
- export interface SamplingContext extends CustomSamplingContext {
15
- /**
16
- * Context data with which transaction being sampled was created.
17
- * @deprecated This is duplicate data and will be removed eventually.
18
- */
19
- transactionContext: {
20
- name: string;
21
- parentSampled?: boolean | undefined;
22
- };
23
- /**
24
- * Sampling decision from the parent transaction, if any.
25
- */
26
- parentSampled?: boolean;
27
- /**
28
- * Object representing the URL of the current page or worker script. Passed by default when using the `BrowserTracing`
29
- * integration.
30
- */
31
- location?: WorkerLocation;
32
- /**
33
- * Object representing the incoming request to a node server. Passed by default when using the TracingHandler.
34
- */
35
- request?: ExtractedNodeRequestData;
36
- /** The name of the span being sampled. */
37
- name: string;
38
- /** Initial attributes that have been passed to the span being sampled. */
39
- attributes?: SpanAttributes;
40
- }
41
- //# sourceMappingURL=samplingcontext.d.ts.map
@@ -1,241 +0,0 @@
1
- import { Attachment } from './attachment';
2
- import { Breadcrumb } from './breadcrumb';
3
- import { Client } from './client';
4
- import { Context, Contexts } from './context';
5
- import { Event, EventHint } from './event';
6
- import { EventProcessor } from './eventprocessor';
7
- import { Extra, Extras } from './extra';
8
- import { Primitive } from './misc';
9
- import { RequestSession, Session } from './session';
10
- import { SeverityLevel } from './severity';
11
- import { Span } from './span';
12
- import { PropagationContext } from './tracing';
13
- import { User } from './user';
14
- /** JSDocs */
15
- export type CaptureContext = Scope | Partial<ScopeContext> | ((scope: Scope) => Scope);
16
- /** JSDocs */
17
- export interface ScopeContext {
18
- user: User;
19
- level: SeverityLevel;
20
- extra: Extras;
21
- contexts: Contexts;
22
- tags: {
23
- [key: string]: Primitive;
24
- };
25
- fingerprint: string[];
26
- requestSession: RequestSession;
27
- propagationContext: PropagationContext;
28
- }
29
- export interface ScopeData {
30
- eventProcessors: EventProcessor[];
31
- breadcrumbs: Breadcrumb[];
32
- user: User;
33
- tags: {
34
- [key: string]: Primitive;
35
- };
36
- extra: Extras;
37
- contexts: Contexts;
38
- attachments: Attachment[];
39
- propagationContext: PropagationContext;
40
- sdkProcessingMetadata: {
41
- [key: string]: unknown;
42
- };
43
- fingerprint: string[];
44
- level?: SeverityLevel;
45
- transactionName?: string;
46
- span?: Span;
47
- }
48
- /**
49
- * Holds additional event information.
50
- */
51
- export interface Scope {
52
- /**
53
- * Update the client on the scope.
54
- */
55
- setClient(client: Client | undefined): void;
56
- /**
57
- * Get the client assigned to this scope.
58
- *
59
- * It is generally recommended to use the global function `Sentry.getClient()` instead, unless you know what you are doing.
60
- */
61
- getClient<C extends Client>(): C | undefined;
62
- /**
63
- * Sets the last event id on the scope.
64
- * @param lastEventId The last event id of a captured event.
65
- */
66
- setLastEventId(lastEventId: string | undefined): void;
67
- /**
68
- * This is the getter for lastEventId.
69
- * @returns The last event id of a captured event.
70
- */
71
- lastEventId(): string | undefined;
72
- /**
73
- * Add internal on change listener. Used for sub SDKs that need to store the scope.
74
- * @hidden
75
- */
76
- addScopeListener(callback: (scope: Scope) => void): void;
77
- /** Add new event processor that will be called during event processing. */
78
- addEventProcessor(callback: EventProcessor): this;
79
- /** Get the data of this scope, which is applied to an event during processing. */
80
- getScopeData(): ScopeData;
81
- /**
82
- * Updates user context information for future events.
83
- *
84
- * @param user User context object to be set in the current context. Pass `null` to unset the user.
85
- */
86
- setUser(user: User | null): this;
87
- /**
88
- * Returns the `User` if there is one
89
- */
90
- getUser(): User | undefined;
91
- /**
92
- * Set an object that will be merged sent as tags data with the event.
93
- * @param tags Tags context object to merge into current context.
94
- */
95
- setTags(tags: {
96
- [key: string]: Primitive;
97
- }): this;
98
- /**
99
- * Set key:value that will be sent as tags data with the event.
100
- *
101
- * Can also be used to unset a tag by passing `undefined`.
102
- *
103
- * @param key String key of tag
104
- * @param value Value of tag
105
- */
106
- setTag(key: string, value: Primitive): this;
107
- /**
108
- * Set an object that will be merged sent as extra data with the event.
109
- * @param extras Extras object to merge into current context.
110
- */
111
- setExtras(extras: Extras): this;
112
- /**
113
- * Set key:value that will be sent as extra data with the event.
114
- * @param key String of extra
115
- * @param extra Any kind of data. This data will be normalized.
116
- */
117
- setExtra(key: string, extra: Extra): this;
118
- /**
119
- * Sets the fingerprint on the scope to send with the events.
120
- * @param fingerprint string[] to group events in Sentry.
121
- */
122
- setFingerprint(fingerprint: string[]): this;
123
- /**
124
- * Sets the level on the scope for future events.
125
- * @param level string {@link SeverityLevel}
126
- */
127
- setLevel(level: SeverityLevel): this;
128
- /**
129
- * Sets the transaction name on the scope so that the name of the transaction
130
- * (e.g. taken server route or page location) is attached to future events.
131
- *
132
- * IMPORTANT: Calling this function does NOT change the name of the currently active
133
- * span. If you want to change the name of the active span, use `span.updateName()`
134
- * instead.
135
- *
136
- * By default, the SDK updates the scope's transaction name automatically on sensible
137
- * occasions, such as a page navigation or when handling a new request on the server.
138
- */
139
- setTransactionName(name?: string): this;
140
- /**
141
- * Sets context data with the given name.
142
- * @param name of the context
143
- * @param context an object containing context data. This data will be normalized. Pass `null` to unset the context.
144
- */
145
- setContext(name: string, context: Context | null): this;
146
- /**
147
- * Returns the `Session` if there is one
148
- */
149
- getSession(): Session | undefined;
150
- /**
151
- * Sets the `Session` on the scope
152
- */
153
- setSession(session?: Session): this;
154
- /**
155
- * Returns the `RequestSession` if there is one
156
- */
157
- getRequestSession(): RequestSession | undefined;
158
- /**
159
- * Sets the `RequestSession` on the scope
160
- */
161
- setRequestSession(requestSession?: RequestSession): this;
162
- /**
163
- * Updates the scope with provided data. Can work in three variations:
164
- * - plain object containing updatable attributes
165
- * - Scope instance that'll extract the attributes from
166
- * - callback function that'll receive the current scope as an argument and allow for modifications
167
- * @param captureContext scope modifier to be used
168
- */
169
- update(captureContext?: CaptureContext): this;
170
- /** Clears the current scope and resets its properties. */
171
- clear(): this;
172
- /**
173
- * Adds a breadcrumb to the scope
174
- * @param breadcrumb Breadcrumb
175
- * @param maxBreadcrumbs number of max breadcrumbs to merged into event.
176
- */
177
- addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this;
178
- /**
179
- * Get the last breadcrumb.
180
- */
181
- getLastBreadcrumb(): Breadcrumb | undefined;
182
- /**
183
- * Clears all breadcrumbs from the scope.
184
- */
185
- clearBreadcrumbs(): this;
186
- /**
187
- * Adds an attachment to the scope
188
- * @param attachment Attachment options
189
- */
190
- addAttachment(attachment: Attachment): this;
191
- /**
192
- * Clears attachments from the scope
193
- */
194
- clearAttachments(): this;
195
- /**
196
- * Add data which will be accessible during event processing but won't get sent to Sentry.
197
- *
198
- * TODO(v9): We should type this stricter, so that e.g. `normalizedRequest` is strictly typed.
199
- */
200
- setSDKProcessingMetadata(newData: {
201
- [key: string]: unknown;
202
- }): this;
203
- /**
204
- * Add propagation context to the scope, used for distributed tracing
205
- */
206
- setPropagationContext(context: PropagationContext): this;
207
- /**
208
- * Get propagation context from the scope, used for distributed tracing
209
- */
210
- getPropagationContext(): PropagationContext;
211
- /**
212
- * Capture an exception for this scope.
213
- *
214
- * @param exception The exception to capture.
215
- * @param hint Optional additional data to attach to the Sentry event.
216
- * @returns the id of the captured Sentry event.
217
- */
218
- captureException(exception: unknown, hint?: EventHint): string;
219
- /**
220
- * Capture a message for this scope.
221
- *
222
- * @param message The message to capture.
223
- * @param level An optional severity level to report the message with.
224
- * @param hint Optional additional data to attach to the Sentry event.
225
- * @returns the id of the captured message.
226
- */
227
- captureMessage(message: string, level?: SeverityLevel, hint?: EventHint): string;
228
- /**
229
- * Capture a Sentry event for this scope.
230
- *
231
- * @param event The event to capture.
232
- * @param hint Optional additional data to attach to the Sentry event.
233
- * @returns the id of the captured event.
234
- */
235
- captureEvent(event: Event, hint?: EventHint): string;
236
- /**
237
- * Clone all data from this scope into a new scope.
238
- */
239
- clone(): Scope;
240
- }
241
- //# sourceMappingURL=scope.d.ts.map
@@ -1,8 +0,0 @@
1
- import { Package } from './package';
2
- export interface SdkInfo {
3
- name?: string;
4
- version?: string;
5
- integrations?: string[];
6
- packages?: Package[];
7
- }
8
- //# sourceMappingURL=sdkinfo.d.ts.map
@@ -1,5 +0,0 @@
1
- import { SdkInfo } from './sdkinfo';
2
- export interface SdkMetadata {
3
- sdk?: SdkInfo;
4
- }
5
- //# sourceMappingURL=sdkmetadata.d.ts.map
@@ -1,75 +0,0 @@
1
- import { User } from './user';
2
- export interface RequestSession {
3
- status?: RequestSessionStatus;
4
- }
5
- export interface Session {
6
- sid: string;
7
- did?: string | number;
8
- init: boolean;
9
- timestamp: number;
10
- started: number;
11
- duration?: number;
12
- status: SessionStatus;
13
- release?: string;
14
- environment?: string;
15
- userAgent?: string;
16
- ipAddress?: string;
17
- errors: number;
18
- user?: User | null;
19
- ignoreDuration: boolean;
20
- abnormal_mechanism?: string;
21
- /**
22
- * Overrides default JSON serialization of the Session because
23
- * the Sentry servers expect a slightly different schema of a session
24
- * which is described in the interface @see SerializedSession in this file.
25
- *
26
- * @return a Sentry-backend conforming JSON object of the session
27
- */
28
- toJSON(): SerializedSession;
29
- }
30
- export type SessionContext = Partial<Session>;
31
- export type SessionStatus = 'ok' | 'exited' | 'crashed' | 'abnormal';
32
- export type RequestSessionStatus = 'ok' | 'errored' | 'crashed';
33
- /** JSDoc */
34
- export interface SessionAggregates {
35
- attrs?: {
36
- environment?: string;
37
- release?: string;
38
- };
39
- aggregates: Array<AggregationCounts>;
40
- }
41
- export interface SessionFlusherLike {
42
- /**
43
- * Increments the Session Status bucket in SessionAggregates Object corresponding to the status of the session
44
- * captured
45
- */
46
- incrementSessionStatusCount(): void;
47
- /** Empties Aggregate Buckets and Sends them to Transport Buffer */
48
- flush(): void;
49
- /** Clears setInterval and calls flush */
50
- close(): void;
51
- }
52
- export interface AggregationCounts {
53
- started: string;
54
- errored?: number;
55
- exited?: number;
56
- crashed?: number;
57
- }
58
- export interface SerializedSession {
59
- init: boolean;
60
- sid: string;
61
- did?: string;
62
- timestamp: string;
63
- started: string;
64
- duration?: number;
65
- status: SessionStatus;
66
- errors: number;
67
- abnormal_mechanism?: string;
68
- attrs?: {
69
- release?: string;
70
- environment?: string;
71
- user_agent?: string;
72
- ip_address?: string;
73
- };
74
- }
75
- //# sourceMappingURL=session.d.ts.map
@@ -1,2 +0,0 @@
1
- export type SeverityLevel = 'fatal' | 'error' | 'warning' | 'log' | 'info' | 'debug';
2
- //# sourceMappingURL=severity.d.ts.map