@glasstrace/sdk 0.2.1 → 0.2.3
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/adapters/drizzle.cjs +729 -3
- package/dist/adapters/drizzle.cjs.map +1 -1
- package/dist/adapters/drizzle.js +4 -1
- package/dist/adapters/drizzle.js.map +1 -1
- package/dist/chunk-DQ25VOKK.js +1250 -0
- package/dist/chunk-DQ25VOKK.js.map +1 -0
- package/dist/chunk-WZXVS2EO.js +9 -0
- package/dist/chunk-WZXVS2EO.js.map +1 -0
- package/dist/cli/init.cjs +8 -8
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.js +8 -8
- package/dist/cli/init.js.map +1 -1
- package/dist/esm-POMEQPKL.js +62 -0
- package/dist/esm-POMEQPKL.js.map +1 -0
- package/dist/getMachineId-bsd-TC3JSTY5.js +29 -0
- package/dist/getMachineId-bsd-TC3JSTY5.js.map +1 -0
- package/dist/getMachineId-darwin-2SUKQCE6.js +29 -0
- package/dist/getMachineId-darwin-2SUKQCE6.js.map +1 -0
- package/dist/getMachineId-linux-PNAFHLXH.js +23 -0
- package/dist/getMachineId-linux-PNAFHLXH.js.map +1 -0
- package/dist/getMachineId-unsupported-L2MNYW3W.js +14 -0
- package/dist/getMachineId-unsupported-L2MNYW3W.js.map +1 -0
- package/dist/getMachineId-win-D6D42WOQ.js +31 -0
- package/dist/getMachineId-win-D6D42WOQ.js.map +1 -0
- package/dist/index.cjs +7580 -3456
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -4
- package/dist/index.d.ts +12 -4
- package/dist/index.js +2746 -224
- package/dist/index.js.map +1 -1
- package/package.json +3 -7
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as z from './v4/classic/external.cjs';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { ReadableSpan } from './export/ReadableSpan';
|
|
3
|
+
import { Span } from './Span';
|
|
4
|
+
import { SpanProcessor } from './SpanProcessor';
|
|
5
|
+
import { SpanExporter } from './export/SpanExporter';
|
|
6
|
+
import { ExportResult } from './ExportResult';
|
|
5
7
|
|
|
6
8
|
/** Anonymous API key: `gt_anon_` + 48 hex chars. */
|
|
7
9
|
declare const AnonApiKeySchema: z.core.$ZodBranded<z.ZodString, "AnonApiKey", "out">;
|
|
@@ -298,7 +300,7 @@ declare function getActiveConfig(): CaptureConfig;
|
|
|
298
300
|
declare class GlasstraceSpanProcessor implements SpanProcessor {
|
|
299
301
|
private readonly wrappedProcessor;
|
|
300
302
|
constructor(wrappedProcessor: SpanProcessor, _sessionManager?: SessionManager, _apiKey?: string | (() => string), _getConfig?: () => CaptureConfig, _environment?: string);
|
|
301
|
-
onStart(span: Span, parentContext:
|
|
303
|
+
onStart(span: Span, parentContext: Parameters<SpanProcessor["onStart"]>[1]): void;
|
|
302
304
|
onEnd(readableSpan: ReadableSpan): void;
|
|
303
305
|
shutdown(): Promise<void>;
|
|
304
306
|
forceFlush(): Promise<void>;
|
|
@@ -452,6 +454,12 @@ declare function computeBuildHash(maps?: SourceMapEntry[]): Promise<string>;
|
|
|
452
454
|
*/
|
|
453
455
|
declare function uploadSourceMaps(apiKey: string, endpoint: string, buildHash: string, maps: SourceMapEntry[]): Promise<SourceMapUploadResponse>;
|
|
454
456
|
|
|
457
|
+
/**
|
|
458
|
+
* Manual error capture API.
|
|
459
|
+
*
|
|
460
|
+
* Provides a simple function for developers to manually record errors
|
|
461
|
+
* as span events, independent of the `consoleErrors` config flag.
|
|
462
|
+
*/
|
|
455
463
|
/**
|
|
456
464
|
* Records an error as a span event on the currently active OTel span.
|
|
457
465
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as z from './v4/classic/external.cjs';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { ReadableSpan } from './export/ReadableSpan';
|
|
3
|
+
import { Span } from './Span';
|
|
4
|
+
import { SpanProcessor } from './SpanProcessor';
|
|
5
|
+
import { SpanExporter } from './export/SpanExporter';
|
|
6
|
+
import { ExportResult } from './ExportResult';
|
|
5
7
|
|
|
6
8
|
/** Anonymous API key: `gt_anon_` + 48 hex chars. */
|
|
7
9
|
declare const AnonApiKeySchema: z.core.$ZodBranded<z.ZodString, "AnonApiKey", "out">;
|
|
@@ -298,7 +300,7 @@ declare function getActiveConfig(): CaptureConfig;
|
|
|
298
300
|
declare class GlasstraceSpanProcessor implements SpanProcessor {
|
|
299
301
|
private readonly wrappedProcessor;
|
|
300
302
|
constructor(wrappedProcessor: SpanProcessor, _sessionManager?: SessionManager, _apiKey?: string | (() => string), _getConfig?: () => CaptureConfig, _environment?: string);
|
|
301
|
-
onStart(span: Span, parentContext:
|
|
303
|
+
onStart(span: Span, parentContext: Parameters<SpanProcessor["onStart"]>[1]): void;
|
|
302
304
|
onEnd(readableSpan: ReadableSpan): void;
|
|
303
305
|
shutdown(): Promise<void>;
|
|
304
306
|
forceFlush(): Promise<void>;
|
|
@@ -452,6 +454,12 @@ declare function computeBuildHash(maps?: SourceMapEntry[]): Promise<string>;
|
|
|
452
454
|
*/
|
|
453
455
|
declare function uploadSourceMaps(apiKey: string, endpoint: string, buildHash: string, maps: SourceMapEntry[]): Promise<SourceMapUploadResponse>;
|
|
454
456
|
|
|
457
|
+
/**
|
|
458
|
+
* Manual error capture API.
|
|
459
|
+
*
|
|
460
|
+
* Provides a simple function for developers to manually record errors
|
|
461
|
+
* as span events, independent of the `consoleErrors` config flag.
|
|
462
|
+
*/
|
|
455
463
|
/**
|
|
456
464
|
* Records an error as a span event on the currently active OTel span.
|
|
457
465
|
*
|