@allstak/react 0.1.3 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1 +1,552 @@
1
- export { AllStak, AllStakErrorBoundary, AllStakErrorBoundaryProps, useAllStak, withAllStakProfiler } from '@allstak/js/react';
1
+ import * as React from 'react';
2
+
3
+ /**
4
+ * Per-call scoped context isolation.
5
+ *
6
+ * A `Scope` carries the same shape as the top-level config (user, tags,
7
+ * extras, contexts, fingerprint, level) but only applies inside the
8
+ * `withScope` callback that owns it. The client merges the active scope
9
+ * stack on top of the base config when building each event payload, so:
10
+ *
11
+ * - context set inside `withScope` does NOT leak out
12
+ * - nested scopes layer additively (later wins on key conflicts)
13
+ * - throwing or async work in the callback still pops the scope
14
+ *
15
+ * Use this on the server (SSR / RSC / API route handlers) to attach
16
+ * per-request user/tags without leaking that data into another request
17
+ * being processed concurrently.
18
+ */
19
+ type Severity = 'fatal' | 'error' | 'warning' | 'info' | 'debug';
20
+ declare class Scope {
21
+ user?: {
22
+ id?: string;
23
+ email?: string;
24
+ };
25
+ tags: Record<string, string>;
26
+ extras: Record<string, unknown>;
27
+ contexts: Record<string, Record<string, unknown>>;
28
+ fingerprint?: string[];
29
+ level?: Severity;
30
+ setUser(user: {
31
+ id?: string;
32
+ email?: string;
33
+ }): this;
34
+ setTag(key: string, value: string): this;
35
+ setTags(tags: Record<string, string>): this;
36
+ setExtra(key: string, value: unknown): this;
37
+ setExtras(extras: Record<string, unknown>): this;
38
+ setContext(name: string, ctx: Record<string, unknown> | null): this;
39
+ setLevel(level: Severity): this;
40
+ setFingerprint(fingerprint: string[] | null): this;
41
+ clear(): this;
42
+ }
43
+
44
+ /**
45
+ * Minimal HTTP transport for React Native. Uses the global `fetch` (always
46
+ * present in RN >= 0.60) with a 3s timeout. Failed sends fall into a small
47
+ * in-memory ring buffer that we retry on the next successful flush.
48
+ *
49
+ * No window, no AbortController fallback shims — RN exposes both natively.
50
+ */
51
+ declare class HttpTransport {
52
+ private baseUrl;
53
+ private apiKey;
54
+ private buffer;
55
+ private flushing;
56
+ constructor(baseUrl: string, apiKey: string);
57
+ send(path: string, payload: unknown): Promise<void>;
58
+ private doFetch;
59
+ private flushBuffer;
60
+ getBufferSize(): number;
61
+ /**
62
+ * Wait for the in-flight retry-buffer to drain. Resolves `true` if the
63
+ * buffer empties within `timeoutMs` (default 2000ms), `false` otherwise.
64
+ * Useful at process exit / before navigation away.
65
+ */
66
+ flush(timeoutMs?: number): Promise<boolean>;
67
+ }
68
+
69
+ /**
70
+ * Lightweight distributed tracing primitives.
71
+ *
72
+ * A `Span` represents a unit of work — `startSpan('http.client', { description: 'GET /api/users' })`
73
+ * returns a Span; call `span.finish()` when the work completes. Spans
74
+ * batch into the transport's `/ingest/v1/spans` channel and ship every 5s
75
+ * (or when 20 spans accumulate).
76
+ *
77
+ * Trace propagation: each span carries a `traceId` (UUID, generated lazily
78
+ * on first call to `getTraceId()`) and a `spanId`. Nested calls to
79
+ * `startSpan()` automatically inherit the active span as their parent.
80
+ *
81
+ * Sampling: `tracesSampleRate` (config) gates whether `startSpan` actually
82
+ * records anything — drops when `Math.random() >= rate`. The returned
83
+ * Span is a no-op shim in that case so call sites don't need to null-check.
84
+ */
85
+
86
+ interface SpanData {
87
+ traceId: string;
88
+ spanId: string;
89
+ parentSpanId: string;
90
+ operation: string;
91
+ description: string;
92
+ status: 'ok' | 'error' | 'timeout';
93
+ durationMs: number;
94
+ startTimeMillis: number;
95
+ endTimeMillis: number;
96
+ service: string;
97
+ environment: string;
98
+ tags: Record<string, string>;
99
+ data: string;
100
+ }
101
+ declare class Span {
102
+ private _traceId;
103
+ private _spanId;
104
+ private _parentSpanId;
105
+ private _operation;
106
+ private _description;
107
+ private _service;
108
+ private _environment;
109
+ private _tags;
110
+ private _onFinish;
111
+ private _finished;
112
+ private _startTimeMillis;
113
+ private _data;
114
+ constructor(_traceId: string, _spanId: string, _parentSpanId: string, _operation: string, _description: string, _service: string, _environment: string, _tags: Record<string, string>, _onFinish: (data: SpanData) => void);
115
+ setTag(key: string, value: string): this;
116
+ setData(data: string): this;
117
+ setDescription(description: string): this;
118
+ finish(status?: 'ok' | 'error' | 'timeout'): void;
119
+ get traceId(): string;
120
+ get spanId(): string;
121
+ get isFinished(): boolean;
122
+ }
123
+
124
+ /**
125
+ * Lightweight session-replay surrogate for the browser.
126
+ *
127
+ * **Status:** experimental. Captures DOM mutation events as a chronological
128
+ * log so a server-side replay viewer can reconstruct the visible page over
129
+ * time. Privacy-first defaults:
130
+ *
131
+ * - all `<input>`, `<textarea>`, `<select>` values are masked by default
132
+ * - elements with `data-allstak-mask` are entirely replaced with `***`
133
+ * - `[type="password"]` is always masked, even with masking off
134
+ * - `sampleRate` defaults to 0 — replay is OPT-IN per init
135
+ *
136
+ * NOT a drop-in replacement for full DOM-snapshot replay libraries — it
137
+ * does not record initial paint, window resizes, scroll positions, or
138
+ * canvas content. It records:
139
+ *
140
+ * 1. an initial sanitized DOM snapshot at start
141
+ * 2. mutations: childList add/remove + attributes (filtered)
142
+ * 3. user input events with values masked
143
+ * 4. a periodic flush of the buffered log to /ingest/v1/replay
144
+ *
145
+ * Because the wire format is a JSON event log (not a binary blob), payloads
146
+ * are larger than dedicated replay tools — appropriate for low-volume
147
+ * debugging, not for sampling 100% of production traffic.
148
+ */
149
+
150
+ type AddBreadcrumbFn$2 = (type: string, msg: string, level?: string, data?: Record<string, unknown>) => void;
151
+ interface ReplayOptions {
152
+ enabled?: boolean;
153
+ /** Probability per session that replay records. Default 0 (opt-in). */
154
+ sampleRate?: number;
155
+ /** Mask all text inputs / textareas / selects by default. Default true. */
156
+ maskAllInputs?: boolean;
157
+ /** Custom attribute name that flags an element to be masked. Default `data-allstak-mask`. */
158
+ maskAttribute?: string;
159
+ /** Max number of events buffered before forced flush. Default 200. */
160
+ maxBufferedEvents?: number;
161
+ }
162
+ interface ReplayEvent {
163
+ /** UNIX millis when the event was observed. */
164
+ ts: number;
165
+ /** event kind */
166
+ k: 'snap' | 'mut' | 'input' | 'nav';
167
+ /** Free-form JSON-friendly payload. */
168
+ data: Record<string, unknown>;
169
+ }
170
+ declare class ReplayRecorder {
171
+ private transport;
172
+ private addBreadcrumb;
173
+ private buffer;
174
+ private flushTimer;
175
+ private observer;
176
+ private inputListener;
177
+ private opts;
178
+ private sessionId;
179
+ private destroyed;
180
+ constructor(transport: HttpTransport, sessionId: string, addBreadcrumb: AddBreadcrumbFn$2, options?: ReplayOptions);
181
+ start(): void;
182
+ destroy(): void;
183
+ /** @internal — exposed for tests. */
184
+ getBuffer(): ReadonlyArray<ReplayEvent>;
185
+ private push;
186
+ private flush;
187
+ private snapshotBody;
188
+ private maskTree;
189
+ private maskInputValue;
190
+ private describeNode;
191
+ private describePath;
192
+ private safeAttribute;
193
+ }
194
+
195
+ /**
196
+ * Standalone AllStak client for the browser/React environment. No external
197
+ * AllStak SDK dependencies — only the browser's native `fetch`, AbortController,
198
+ * Date, JSON, and (optionally) `window` for unhandled error auto-capture.
199
+ *
200
+ * Surface mirrors the public AllStak API used by web apps:
201
+ * init / captureException / captureMessage / addBreadcrumb / clearBreadcrumbs
202
+ * setUser / setTag / setIdentity / getSessionId
203
+ */
204
+
205
+ declare const INGEST_HOST = "https://api.allstak.sa";
206
+ declare const SDK_NAME = "allstak-react";
207
+ declare const SDK_VERSION = "0.2.1";
208
+
209
+ interface AllStakConfig {
210
+ /** Project API key (`ask_live_…`). Required. */
211
+ apiKey: string;
212
+ /** Optional ingest host override; defaults to {@link INGEST_HOST}. */
213
+ host?: string;
214
+ environment?: string;
215
+ release?: string;
216
+ user?: {
217
+ id?: string;
218
+ email?: string;
219
+ };
220
+ tags?: Record<string, string>;
221
+ /** Per-event extra data attached to every capture (override per call via context arg). */
222
+ extras?: Record<string, unknown>;
223
+ /** Named context bags (e.g. `app`, `device`). Each lives under `metadata['context.<name>']`. */
224
+ contexts?: Record<string, Record<string, unknown>>;
225
+ /**
226
+ * Default severity level for events that don't specify their own.
227
+ * Customer-set default severity, mirrors `setLevel`.
228
+ */
229
+ level?: 'fatal' | 'error' | 'warning' | 'info' | 'debug';
230
+ /**
231
+ * Custom grouping fingerprint applied to every event. Customer-set grouping override —
232
+ * `setFingerprint`. Pass an empty array or `null` to clear.
233
+ */
234
+ fingerprint?: string[];
235
+ /** Probability in [0, 1] that any new span is recorded. Default 1. */
236
+ tracesSampleRate?: number;
237
+ /** Service name attached to every span (defaults to release if unset). */
238
+ service?: string;
239
+ maxBreadcrumbs?: number;
240
+ /** Auto-capture unhandled `error` and `unhandledrejection` on `window`. Default: true */
241
+ autoCaptureBrowserErrors?: boolean;
242
+ /** Wrap `globalThis.fetch` to record HTTP breadcrumbs. Default: true */
243
+ autoBreadcrumbsFetch?: boolean;
244
+ /** Wrap `console.warn` and `console.error` to record log breadcrumbs. Default: true */
245
+ autoBreadcrumbsConsole?: boolean;
246
+ /** Wrap `history.pushState`/`replaceState` and listen to `popstate` for SPA navigation breadcrumbs. Default: true */
247
+ autoBreadcrumbsNavigation?: boolean;
248
+ /**
249
+ * Experimental session-replay surrogate. **Off by default.** Enable with
250
+ * `replay: { sampleRate: 0.1 }`. Captures sanitized initial DOM snapshot +
251
+ * subsequent mutations + masked input events. See `src/replay.ts` for
252
+ * the full privacy contract.
253
+ */
254
+ replay?: ReplayOptions;
255
+ /**
256
+ * Probability in [0, 1] that any given error is sent. Default: 1 (no sampling).
257
+ * Applied per event before {@link beforeSend}.
258
+ */
259
+ sampleRate?: number;
260
+ /**
261
+ * Mutate or drop an event before it is sent. Return `null` (or a falsy
262
+ * value) to drop. Sync or async. Errors thrown inside the hook are caught
263
+ * — the event is sent as-is so a buggy hook can't black-hole telemetry.
264
+ */
265
+ beforeSend?: (event: ErrorIngestPayload) => ErrorIngestPayload | null | undefined | Promise<ErrorIngestPayload | null | undefined>;
266
+ /** SDK identity overrides. */
267
+ sdkName?: string;
268
+ sdkVersion?: string;
269
+ platform?: string;
270
+ dist?: string;
271
+ commitSha?: string;
272
+ branch?: string;
273
+ }
274
+ interface Breadcrumb {
275
+ timestamp: string;
276
+ type: string;
277
+ message: string;
278
+ level: string;
279
+ data?: Record<string, unknown>;
280
+ }
281
+ interface PayloadFrame {
282
+ filename?: string;
283
+ absPath?: string;
284
+ function?: string;
285
+ lineno?: number;
286
+ colno?: number;
287
+ inApp?: boolean;
288
+ platform?: string;
289
+ debugId?: string;
290
+ }
291
+ interface ErrorIngestPayload {
292
+ exceptionClass: string;
293
+ message: string;
294
+ stackTrace?: string[];
295
+ frames?: PayloadFrame[];
296
+ platform?: string;
297
+ sdkName?: string;
298
+ sdkVersion?: string;
299
+ dist?: string;
300
+ level: string;
301
+ environment?: string;
302
+ release?: string;
303
+ sessionId?: string;
304
+ user?: {
305
+ id?: string;
306
+ email?: string;
307
+ };
308
+ metadata?: Record<string, unknown>;
309
+ breadcrumbs?: Breadcrumb[];
310
+ requestContext?: {
311
+ method?: string;
312
+ path?: string;
313
+ host?: string;
314
+ userAgent?: string;
315
+ };
316
+ fingerprint?: string[];
317
+ }
318
+ declare class AllStakClient {
319
+ private transport;
320
+ private config;
321
+ private sessionId;
322
+ private breadcrumbs;
323
+ private maxBreadcrumbs;
324
+ private scopeStack;
325
+ private tracing;
326
+ private replay;
327
+ private onErrorHandler;
328
+ private onRejectionHandler;
329
+ constructor(config: AllStakConfig);
330
+ captureException(error: Error, context?: Record<string, unknown>): void;
331
+ /** Start a new span — auto-parented to any currently-active span. */
332
+ startSpan(operation: string, options?: {
333
+ description?: string;
334
+ tags?: Record<string, string>;
335
+ }): Span;
336
+ /** Get (and lazily create) the active trace ID. */
337
+ getTraceId(): string;
338
+ /** Override the active trace ID, e.g. from an inbound request header. */
339
+ setTraceId(traceId: string): void;
340
+ /** ID of the currently-active span, or null. */
341
+ getCurrentSpanId(): string | null;
342
+ /** Reset the trace ID and the active span stack. */
343
+ resetTrace(): void;
344
+ captureMessage(message: string, level?: 'fatal' | 'error' | 'warning' | 'info', options?: {
345
+ as?: 'log' | 'error' | 'both';
346
+ }): void;
347
+ addBreadcrumb(type: string, message: string, level?: string, data?: Record<string, unknown>): void;
348
+ clearBreadcrumbs(): void;
349
+ setUser(user: {
350
+ id?: string;
351
+ email?: string;
352
+ }): void;
353
+ setTag(key: string, value: string): void;
354
+ /** Bulk-set tags. Merges with existing tags. */
355
+ setTags(tags: Record<string, string>): void;
356
+ /** Set a single extra value. */
357
+ setExtra(key: string, value: unknown): void;
358
+ /** Bulk-set extras. Merges with existing extras. */
359
+ setExtras(extras: Record<string, unknown>): void;
360
+ /**
361
+ * Attach a named context bag (e.g. `app`, `device`, `runtime`) — appears
362
+ * under `metadata['context.<name>']` on every subsequent event. Pass
363
+ * `null` to remove a previously-set context.
364
+ */
365
+ setContext(name: string, ctx: Record<string, unknown> | null): void;
366
+ /**
367
+ * Wait for the in-flight retry-buffer to drain. Resolves `true` if the
368
+ * buffer empties within `timeoutMs` (default 2000ms), `false` otherwise.
369
+ */
370
+ flush(timeoutMs?: number): Promise<boolean>;
371
+ /** Set the default severity level applied to subsequent captures. */
372
+ setLevel(level: 'fatal' | 'error' | 'warning' | 'info' | 'debug'): void;
373
+ /**
374
+ * Set a custom grouping fingerprint applied to subsequent events.
375
+ * Pass `null` or an empty array to clear and revert to default grouping.
376
+ */
377
+ setFingerprint(fingerprint: string[] | null): void;
378
+ setIdentity(identity: {
379
+ sdkName?: string;
380
+ sdkVersion?: string;
381
+ platform?: string;
382
+ dist?: string;
383
+ }): void;
384
+ getSessionId(): string;
385
+ getConfig(): AllStakConfig;
386
+ destroy(): void;
387
+ private installBrowserHandlers;
388
+ private sendLog;
389
+ private passesSampleRate;
390
+ /**
391
+ * Returns the effective config layer = base config + every active scope.
392
+ * Scope-only overrides (set inside `withScope`) flow into the wire
393
+ * payload without leaking out of the callback.
394
+ */
395
+ private effective;
396
+ private buildMetadata;
397
+ /**
398
+ * Run `callback` with a fresh, temporary {@link Scope} that isolates
399
+ * any user/tag/extra/context/fingerprint/level it sets. The scope is
400
+ * popped automatically when the callback returns or throws — including
401
+ * for `Promise`-returning callbacks (the pop runs in `.finally`).
402
+ *
403
+ * Use this on the server (SSR / RSC / API route handlers) to attach
404
+ * per-request user/tags without leaking that data into another request
405
+ * being processed concurrently.
406
+ */
407
+ withScope<T>(callback: (scope: Scope) => T): T;
408
+ /** Direct access to the topmost active scope, or null. @internal */
409
+ getCurrentScope(): Scope | null;
410
+ private sendThroughBeforeSend;
411
+ private releaseTags;
412
+ }
413
+ declare const AllStak: {
414
+ init(config: AllStakConfig): AllStakClient;
415
+ captureException(error: Error, context?: Record<string, unknown>): void;
416
+ captureMessage(message: string, level?: "fatal" | "error" | "warning" | "info", options?: {
417
+ as?: "log" | "error" | "both";
418
+ }): void;
419
+ addBreadcrumb(type: string, message: string, level?: string, data?: Record<string, unknown>): void;
420
+ clearBreadcrumbs(): void;
421
+ setUser(user: {
422
+ id?: string;
423
+ email?: string;
424
+ }): void;
425
+ setTag(key: string, value: string): void;
426
+ setTags(tags: Record<string, string>): void;
427
+ setExtra(key: string, value: unknown): void;
428
+ setExtras(extras: Record<string, unknown>): void;
429
+ setContext(name: string, ctx: Record<string, unknown> | null): void;
430
+ setLevel(level: "fatal" | "error" | "warning" | "info" | "debug"): void;
431
+ setFingerprint(fingerprint: string[] | null): void;
432
+ flush(timeoutMs?: number): Promise<boolean>;
433
+ setIdentity(identity: {
434
+ sdkName?: string;
435
+ sdkVersion?: string;
436
+ platform?: string;
437
+ dist?: string;
438
+ }): void;
439
+ /**
440
+ * Run `callback` with a fresh, temporary {@link Scope}. Any user/tag/
441
+ * extra/context/fingerprint/level set on the scope is visible only inside
442
+ * the callback. Pop is automatic (sync, async, throwing).
443
+ */
444
+ withScope<T>(callback: (scope: Scope) => T): T;
445
+ startSpan(operation: string, options?: {
446
+ description?: string;
447
+ tags?: Record<string, string>;
448
+ }): Span;
449
+ getTraceId(): string;
450
+ setTraceId(traceId: string): void;
451
+ getCurrentSpanId(): string | null;
452
+ resetTrace(): void;
453
+ getSessionId(): string;
454
+ getConfig(): AllStakConfig | null;
455
+ destroy(): void;
456
+ /** @internal */ _getInstance(): AllStakClient | null;
457
+ };
458
+
459
+ /**
460
+ * Browser navigation breadcrumbs — minimal fallback that doesn't depend on
461
+ * any specific router library. Wraps `history.pushState`/`replaceState` and
462
+ * listens to `popstate` so SPA navigation transitions appear in the
463
+ * breadcrumb feed regardless of which router (React Router, Next, Remix,
464
+ * none) the app uses.
465
+ *
466
+ * Idempotent — calling twice is safe (the wrappers tag themselves).
467
+ *
468
+ * For framework-specific instrumentation (React Router's `useNavigate`,
469
+ * Next's `router.events`), bind manually with `AllStak.addBreadcrumb`.
470
+ */
471
+ type AddBreadcrumbFn$1 = (type: string, msg: string, level?: string, data?: Record<string, unknown>) => void;
472
+ declare function instrumentBrowserNavigation(addBreadcrumb: AddBreadcrumbFn$1): void;
473
+ declare function instrumentReactRouter(location: {
474
+ pathname: string;
475
+ search?: string;
476
+ }, addBreadcrumb?: AddBreadcrumbFn$1): void;
477
+ declare function instrumentNextRouter(url: string, addBreadcrumb?: AddBreadcrumbFn$1): void;
478
+
479
+ /**
480
+ * Idempotent instrumentation of `globalThis.fetch` and `console.warn/error`
481
+ * to feed breadcrumbs into the AllStak client. Safe to call once at init.
482
+ *
483
+ * - `instrumentFetch`: wraps fetch and records a breadcrumb per request
484
+ * (success and failure). Skips requests targeting the SDK's own ingest
485
+ * host so the wrap never recurses. Preserves the original return type
486
+ * and rethrows fetch errors after the breadcrumb is recorded.
487
+ * - `instrumentConsole`: wraps `console.warn` and `console.error` to
488
+ * record `log`-type breadcrumbs at the corresponding level.
489
+ *
490
+ * Both patches use a flag on the wrapper function so a second call is a
491
+ * no-op — important because hot-module-reload in dev would otherwise
492
+ * stack patches and double-fire breadcrumbs.
493
+ */
494
+ type AddBreadcrumbFn = (type: string, msg: string, level?: string, data?: Record<string, unknown>) => void;
495
+ declare function instrumentFetch(addBreadcrumb: AddBreadcrumbFn, ownBaseUrl?: string): void;
496
+ declare function instrumentConsole(addBreadcrumb: AddBreadcrumbFn): void;
497
+
498
+ /**
499
+ * @allstak/react — standalone React SDK.
500
+ *
501
+ * Self-contained: no @allstak/js or @allstak-io/* dependencies. Ships its own
502
+ * AllStak client (init/capture/breadcrumbs/transport) plus React-specific
503
+ * helpers (ErrorBoundary, useAllStak hook, withAllStakProfiler HOC).
504
+ *
505
+ * Usage:
506
+ * AllStak.init({ apiKey, environment, release });
507
+ * <AllStakErrorBoundary>...</AllStakErrorBoundary>
508
+ * const { captureException } = useAllStak();
509
+ */
510
+
511
+ interface AllStakErrorBoundaryProps {
512
+ children: React.ReactNode;
513
+ fallback?: React.ReactNode | ((props: {
514
+ error: Error;
515
+ reset: () => void;
516
+ }) => React.ReactNode);
517
+ /** Extra tags attached only to errors captured by this boundary. */
518
+ tags?: Record<string, string>;
519
+ /** Called after the error has been captured. */
520
+ onError?: (error: Error, info: React.ErrorInfo) => void;
521
+ }
522
+ interface AllStakErrorBoundaryState {
523
+ error: Error | null;
524
+ }
525
+ declare class AllStakErrorBoundary extends React.Component<AllStakErrorBoundaryProps, AllStakErrorBoundaryState> {
526
+ state: AllStakErrorBoundaryState;
527
+ static getDerivedStateFromError(error: Error): AllStakErrorBoundaryState;
528
+ componentDidCatch(error: Error, info: React.ErrorInfo): void;
529
+ private reset;
530
+ render(): React.ReactNode;
531
+ }
532
+ /**
533
+ * Convenience hook — exposes the most common capture/context APIs with a
534
+ * stable identity so components don't have to import the namespace.
535
+ */
536
+ declare function useAllStak(): {
537
+ captureException: (error: Error, ctx?: Record<string, unknown>) => void;
538
+ captureMessage: (msg: string, level?: "fatal" | "error" | "warning" | "info") => void;
539
+ setUser: (user: {
540
+ id?: string;
541
+ email?: string;
542
+ }) => void;
543
+ setTag: (key: string, value: string) => void;
544
+ addBreadcrumb: (type: string, message: string, level?: string, data?: Record<string, unknown>) => void;
545
+ };
546
+ /**
547
+ * HOC: drops a navigation breadcrumb when a component mounts. Useful for
548
+ * marking screen boundaries without a router.
549
+ */
550
+ declare function withAllStakProfiler<P extends object>(Component: React.ComponentType<P>, name?: string): React.FC<P>;
551
+
552
+ export { AllStak, AllStakClient, type AllStakConfig, AllStakErrorBoundary, type AllStakErrorBoundaryProps, type Breadcrumb, INGEST_HOST, type ReplayOptions, ReplayRecorder, SDK_NAME, SDK_VERSION, Scope, instrumentBrowserNavigation, instrumentConsole, instrumentFetch, instrumentNextRouter, instrumentReactRouter, useAllStak, withAllStakProfiler };