@duckbug/js 0.1.3 → 1.0.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 (61) hide show
  1. package/README.md +348 -73
  2. package/dist/cjs/DuckBug/DuckBugHelper.cjs +136 -0
  3. package/dist/cjs/DuckBug/DuckBugProvider.cjs +82 -13
  4. package/dist/cjs/DuckBug/DuckBugService.cjs +158 -17
  5. package/dist/cjs/DuckBug/Pond.cjs +44 -0
  6. package/dist/cjs/DuckBug/ensureEventId.cjs +47 -0
  7. package/dist/cjs/DuckBug/finalizeIngestEvent.cjs +54 -0
  8. package/dist/cjs/DuckBug/index.cjs +18 -2
  9. package/dist/cjs/DuckBug/parseDuckBugDsn.cjs +82 -0
  10. package/dist/cjs/DuckBug/sanitizeIngestPayload.cjs +67 -0
  11. package/dist/cjs/DuckBug/stripIngestSections.cjs +43 -0
  12. package/dist/cjs/DuckBug/transportTypes.cjs +18 -0
  13. package/dist/cjs/SDK/DuckSDK.cjs +129 -12
  14. package/dist/cjs/SDK/index.cjs +5 -2
  15. package/dist/cjs/contract/index.cjs +18 -0
  16. package/dist/cjs/contract/ingestEvents.cjs +18 -0
  17. package/dist/cjs/index.cjs +24 -6
  18. package/dist/cjs/integrations/node.cjs +54 -0
  19. package/dist/cjs/sdkIdentity.cjs +47 -0
  20. package/dist/esm/DuckBug/DuckBugHelper.js +99 -0
  21. package/dist/esm/DuckBug/DuckBugProvider.js +82 -13
  22. package/dist/esm/DuckBug/DuckBugService.js +156 -15
  23. package/dist/esm/DuckBug/Pond.js +10 -0
  24. package/dist/esm/DuckBug/ensureEventId.js +13 -0
  25. package/dist/esm/DuckBug/finalizeIngestEvent.js +20 -0
  26. package/dist/esm/DuckBug/index.js +5 -1
  27. package/dist/esm/DuckBug/parseDuckBugDsn.js +36 -0
  28. package/dist/esm/DuckBug/sanitizeIngestPayload.js +33 -0
  29. package/dist/esm/DuckBug/stripIngestSections.js +9 -0
  30. package/dist/esm/DuckBug/transportTypes.js +0 -0
  31. package/dist/esm/SDK/DuckSDK.js +125 -11
  32. package/dist/esm/SDK/index.js +2 -2
  33. package/dist/esm/contract/index.js +0 -0
  34. package/dist/esm/contract/ingestEvents.js +0 -0
  35. package/dist/esm/index.js +2 -0
  36. package/dist/esm/integrations/node.js +20 -0
  37. package/dist/esm/sdkIdentity.js +7 -0
  38. package/dist/types/DuckBug/DuckBugConfig.d.ts +28 -0
  39. package/dist/types/DuckBug/DuckBugHelper.d.ts +22 -0
  40. package/dist/types/DuckBug/DuckBugProvider.d.ts +12 -1
  41. package/dist/types/DuckBug/DuckBugService.d.ts +30 -8
  42. package/dist/types/DuckBug/Log.d.ts +1 -7
  43. package/dist/types/DuckBug/Pond.d.ts +9 -0
  44. package/dist/types/DuckBug/ensureEventId.d.ts +4 -0
  45. package/dist/types/DuckBug/finalizeIngestEvent.d.ts +11 -0
  46. package/dist/types/DuckBug/index.d.ts +7 -1
  47. package/dist/types/DuckBug/parseDuckBugDsn.d.ts +17 -0
  48. package/dist/types/DuckBug/sanitizeIngestPayload.d.ts +4 -0
  49. package/dist/types/DuckBug/stripIngestSections.d.ts +4 -0
  50. package/dist/types/DuckBug/transportTypes.d.ts +7 -0
  51. package/dist/types/SDK/DuckSDK.d.ts +30 -3
  52. package/dist/types/SDK/Provider.d.ts +11 -3
  53. package/dist/types/SDK/index.d.ts +3 -2
  54. package/dist/types/contract/index.d.ts +1 -0
  55. package/dist/types/contract/ingestEvents.d.ts +58 -0
  56. package/dist/types/index.d.ts +2 -0
  57. package/dist/types/integrations/node.d.ts +12 -0
  58. package/dist/types/sdkIdentity.d.ts +7 -0
  59. package/package.json +23 -7
  60. package/schemas/error-event.schema.json +147 -0
  61. package/schemas/log-event.schema.json +126 -0
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Branded context-enrichment surface (duckbug-sdk-spec).
3
+ * Use {@link Pond.ripple} to capture extra sensitive field names for client-side scrubbing.
4
+ */
5
+ export declare const Pond: {
6
+ ripple(extraSensitiveKeys?: string[]): {
7
+ extraSensitiveKeys: string[];
8
+ };
9
+ };
@@ -0,0 +1,4 @@
1
+ /** Assigns a stable UUID when missing (idempotency / retries). */
2
+ export declare function ensureEventId<E extends {
3
+ eventId?: string;
4
+ }>(event: E): E;
@@ -0,0 +1,11 @@
1
+ import type { DuckBugErrorEvent, DuckBugLogEvent } from "../contract";
2
+ import { type StrippableIngestSection } from "./stripIngestSections";
3
+ export type FinalizeIngestOptions = {
4
+ extraSensitiveKeys?: string[];
5
+ stripSections?: StrippableIngestSection[];
6
+ };
7
+ /**
8
+ * default sdk → strip → sanitize → eventId (duckbug-sdk-spec pipeline before beforeSend).
9
+ */
10
+ export declare function finalizeIngestEvent(event: DuckBugLogEvent, options?: FinalizeIngestOptions): DuckBugLogEvent;
11
+ export declare function finalizeIngestEvent(event: DuckBugErrorEvent, options?: FinalizeIngestOptions): DuckBugErrorEvent;
@@ -1,2 +1,8 @@
1
- export type { DuckBugConfig } from "./DuckBugConfig";
1
+ export type { BeforeSendIngestArg, BeforeSendIngestResult, DuckBugConfig, DuckBugTransportConfig, } from "./DuckBugConfig";
2
2
  export { DuckBugProvider } from "./DuckBugProvider";
3
+ export { ensureEventId } from "./ensureEventId";
4
+ export type { FinalizeIngestOptions } from "./finalizeIngestEvent";
5
+ export { finalizeIngestEvent } from "./finalizeIngestEvent";
6
+ export { Pond } from "./Pond";
7
+ export { type StrippableIngestSection, stripIngestSections, } from "./stripIngestSections";
8
+ export type { TransportFailureInfo } from "./transportTypes";
@@ -0,0 +1,17 @@
1
+ export type ParsedIngestDsn = {
2
+ origin: string;
3
+ /** `/ingest` or `/api/ingest` (path only, no trailing slash). */
4
+ ingestPathPrefix: string;
5
+ projectId: string;
6
+ key: string;
7
+ };
8
+ /**
9
+ * Parses a DuckBug ingest DSN: `{origin}/ingest/{projectId}:{publicKey}` or
10
+ * `{origin}/api/ingest/{projectId}:{publicKey}`.
11
+ * @see duckbug-sdk-spec docs/03-privacy-and-delivery.md
12
+ */
13
+ export declare function parseDuckBugIngestDsn(dsn: string): ParsedIngestDsn;
14
+ export declare function ingestLogsUrl(parsed: ParsedIngestDsn): string;
15
+ export declare function ingestErrorsUrl(parsed: ParsedIngestDsn): string;
16
+ export declare function ingestLogsBatchUrl(parsed: ParsedIngestDsn): string;
17
+ export declare function ingestErrorsBatchUrl(parsed: ParsedIngestDsn): string;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Deep-clones ingest-ready JSON and masks known sensitive keys (SDK-side best-effort).
3
+ */
4
+ export declare function sanitizeIngestPayload<T>(payload: T, extraSensitiveKeys?: string[]): T;
@@ -0,0 +1,4 @@
1
+ import type { DuckBugErrorEvent, DuckBugLogEvent } from "../contract";
2
+ /** Top-level ingest fields that may be omitted before send (duckbug-sdk-spec privacy). */
3
+ export type StrippableIngestSection = "ip" | "url" | "method" | "headers" | "queryParams" | "bodyParams" | "cookies" | "session" | "files" | "env";
4
+ export declare function stripIngestSections<E extends DuckBugLogEvent | DuckBugErrorEvent>(event: E, sections: StrippableIngestSection[] | undefined): E;
@@ -0,0 +1,7 @@
1
+ export type TransportFailureInfo = {
2
+ kind: "log" | "error";
3
+ itemCount: number;
4
+ attempts: number;
5
+ error: unknown;
6
+ message: string;
7
+ };
@@ -1,12 +1,39 @@
1
- import type { LogProviderConfig, Provider } from ".";
1
+ import type { IngestSharedMetadata } from "../contract";
2
+ import type { BeforeSendIngestArg, BeforeSendIngestResult } from "../DuckBug/DuckBugConfig";
3
+ import type { StrippableIngestSection } from "../DuckBug/stripIngestSections";
4
+ import type { LogProviderConfig } from "./LogProviderConfig";
5
+ import type { Provider } from "./Provider";
6
+ export type DuckSDKOptions = {
7
+ beforeSend?: (arg: BeforeSendIngestArg) => BeforeSendIngestResult | Promise<BeforeSendIngestResult>;
8
+ extraSensitiveKeys?: string[];
9
+ stripSections?: StrippableIngestSection[];
10
+ };
2
11
  export declare class DuckSDK {
3
12
  private providers;
4
- constructor(providers: Array<Provider>, logProviderConfig?: LogProviderConfig);
13
+ private scope;
14
+ private readonly beforeSendHook?;
15
+ private readonly extraSensitiveKeys?;
16
+ private readonly stripSections?;
17
+ constructor(providers: Array<Provider>, logProviderConfig?: LogProviderConfig, options?: DuckSDKOptions);
18
+ /** Merge default scope metadata into every captured event. */
19
+ setScope(scope: Partial<IngestSharedMetadata>): void;
20
+ /**
21
+ * Wait until queued ingest work finishes for providers that expose `flush`
22
+ * (e.g. {@link DuckBugProvider}).
23
+ */
24
+ flush(): Promise<void>;
5
25
  log(tag: string, payload?: object): void;
6
26
  error(tag: string, payload?: object): void;
7
27
  debug(tag: string, payload?: object): void;
8
28
  warn(tag: string, payload?: object): void;
9
29
  fatal(tag: string, payload?: object): void;
10
30
  quack(tag: string, error: Error): void;
11
- private sendReportToPlugins;
31
+ private normalizeBeforeSendLog;
32
+ private normalizeBeforeSendError;
33
+ private emitLog;
34
+ private mergeScope;
35
+ }
36
+ /** Branded facade per duckbug-sdk-spec naming doctrine. */
37
+ export declare class Duck extends DuckSDK {
38
+ captureException(error: Error, tag?: string): void;
12
39
  }
@@ -1,8 +1,16 @@
1
- import type { LogLevel } from "./LogLevel";
1
+ import type { DuckBugErrorEvent, DuckBugLogEvent } from "../contract";
2
+ /** When set by {@link DuckSDK}, the event already passed finalize + beforeSend in core. */
3
+ export type SendEventMeta = {
4
+ skipPrivacyPipeline?: boolean;
5
+ };
6
+ /**
7
+ * Pluggable destination for canonical DuckBug ingest events.
8
+ * Console-style methods exist for {@link LogProvider} hooks only.
9
+ */
2
10
  export interface Provider {
11
+ sendLog(event: DuckBugLogEvent, meta?: SendEventMeta): void | Promise<void>;
12
+ sendError(event: DuckBugErrorEvent, meta?: SendEventMeta): void | Promise<void>;
3
13
  log(...args: unknown[]): void;
4
14
  warn(...args: unknown[]): void;
5
15
  error(...args: unknown[]): void;
6
- report(tag: string, level: LogLevel, payload?: object): void;
7
- quack(tag: string, error: Error): void;
8
16
  }
@@ -1,5 +1,6 @@
1
- export type { Provider } from "../SDK/Provider";
2
- export { DuckSDK } from "./DuckSDK";
1
+ export type { Provider, SendEventMeta } from "../SDK/Provider";
2
+ export type { DuckSDKOptions } from "./DuckSDK";
3
+ export { Duck, DuckSDK } from "./DuckSDK";
3
4
  export type { LogLevel } from "./LogLevel";
4
5
  export { logLevel } from "./LogLevel";
5
6
  export { LogProvider } from "./LogProvider";
@@ -0,0 +1 @@
1
+ export type { DuckBugErrorEvent, DuckBugLogEvent, IngestJsonValue, IngestSharedMetadata, IngestStringMap, } from "./ingestEvents";
@@ -0,0 +1,58 @@
1
+ import type { LogLevel } from "../SDK/LogLevel";
2
+ /** JSON values allowed by DuckBug ingest schemas for open fields. */
3
+ export type IngestJsonValue = string | number | boolean | null | {
4
+ [key: string]: IngestJsonValue;
5
+ } | IngestJsonValue[];
6
+ /** Request-related maps after privacy filtering (schema: object with arbitrary keys). */
7
+ export type IngestStringMap = Record<string, unknown>;
8
+ /** Shared optional fields from docs/02-error-log-contract.md */
9
+ export type IngestSharedMetadata = {
10
+ eventId?: string;
11
+ fingerprint?: string;
12
+ dTags?: string[];
13
+ context?: IngestJsonValue;
14
+ ip?: string;
15
+ url?: string;
16
+ method?: string;
17
+ headers?: IngestStringMap;
18
+ queryParams?: IngestStringMap;
19
+ bodyParams?: IngestStringMap;
20
+ cookies?: IngestStringMap;
21
+ /** Session map; duckbug.io ingest currently rejects top-level `session` (400). Prefer `context` / `extra`. */
22
+ session?: IngestStringMap;
23
+ files?: IngestStringMap;
24
+ env?: IngestStringMap;
25
+ platform?: string;
26
+ release?: string;
27
+ environment?: string;
28
+ dist?: string;
29
+ serverName?: string;
30
+ service?: string;
31
+ requestId?: string;
32
+ transaction?: string;
33
+ traceId?: string;
34
+ spanId?: string;
35
+ sdk?: IngestJsonValue;
36
+ user?: IngestJsonValue;
37
+ runtime?: IngestJsonValue;
38
+ breadcrumbs?: IngestJsonValue;
39
+ extra?: IngestJsonValue;
40
+ };
41
+ /** Canonical DuckBug error event (wire contract). */
42
+ export type DuckBugErrorEvent = IngestSharedMetadata & {
43
+ time: number;
44
+ message: string;
45
+ stacktrace: IngestJsonValue;
46
+ file: string;
47
+ line: number;
48
+ exception?: IngestJsonValue;
49
+ stacktraceAsString?: string;
50
+ handled?: boolean;
51
+ mechanism?: string;
52
+ };
53
+ /** Canonical DuckBug log event (wire contract). */
54
+ export type DuckBugLogEvent = IngestSharedMetadata & {
55
+ time: number;
56
+ level: LogLevel;
57
+ message: string;
58
+ };
@@ -1,2 +1,4 @@
1
+ export * from "./contract";
1
2
  export * from "./DuckBug";
3
+ export * from "./integrations/node";
2
4
  export * from "./SDK";
@@ -0,0 +1,12 @@
1
+ import type { DuckSDK } from "../SDK/DuckSDK";
2
+ export type NodeGlobalErrorIntegrationOptions = {
3
+ duck: DuckSDK;
4
+ /** Tag passed to `quack` for unhandled errors. Default `"unhandledRejection"` / `"uncaughtException"`. */
5
+ rejectionTag?: string;
6
+ exceptionTag?: string;
7
+ };
8
+ /**
9
+ * Registers one-shot handlers for `unhandledRejection` and `uncaughtException`.
10
+ * Core stays framework-free; opt in via this helper.
11
+ */
12
+ export declare function registerNodeGlobalErrorHandlers(options: NodeGlobalErrorIntegrationOptions): () => void;
@@ -0,0 +1,7 @@
1
+ /** Keep in sync with package.json version when releasing. */
2
+ export declare const SDK_NAME: "@duckbug/js";
3
+ export declare const SDK_VERSION: "0.1.3";
4
+ export declare const SDK_IDENTITY: {
5
+ readonly name: "@duckbug/js";
6
+ readonly version: "0.1.3";
7
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duckbug/js",
3
- "version": "0.1.3",
3
+ "version": "1.0.0",
4
4
  "type": "module",
5
5
  "main": "./dist/cjs/index.cjs",
6
6
  "module": "./dist/esm/index.js",
@@ -19,23 +19,39 @@
19
19
  },
20
20
  "files": [
21
21
  "dist",
22
+ "schemas",
22
23
  "README.md"
23
24
  ],
24
25
  "scripts": {
25
26
  "build": "rslib build",
26
- "lint": "yarn biome ci",
27
+ "check": "bun run lint && bun run typecheck && bun test",
28
+ "lint": "bunx biome ci",
27
29
  "prepare": "husky",
28
- "test": "vitest run",
29
- "publish": "yarn build && npm publish"
30
+ "test": "bun test",
31
+ "typecheck": "tsc --noEmit -p tsconfig.json",
32
+ "test:live-ingest": "DUCKBUG_EXPECT_LIVE_INGEST=1 bun test --env-file=.env ./tests/duckbugLiveIngestEnv.ingest.ts",
33
+ "semantic-release": "semantic-release",
34
+ "commitlint": "commitlint --edit"
30
35
  },
31
36
  "devDependencies": {
32
37
  "@biomejs/biome": "2.1.1",
38
+ "@commitlint/cli": "^20.3.1",
39
+ "@commitlint/config-conventional": "^20.3.1",
33
40
  "@rslib/core": "0.10.6",
41
+ "@semantic-release/changelog": "^6.0.3",
42
+ "@semantic-release/commit-analyzer": "^13.0.1",
43
+ "@semantic-release/git": "^10.0.1",
44
+ "@semantic-release/github": "^9.2.6",
45
+ "@semantic-release/npm": "^12.0.1",
46
+ "@semantic-release/release-notes-generator": "^14.1.0",
47
+ "@types/bun": "latest",
48
+ "ajv": "^8.17.1",
49
+ "ajv-formats": "^3.0.1",
34
50
  "husky": "9.1.7",
35
51
  "pinst": "3.0.0",
52
+ "semantic-release": "^24.0.0",
36
53
  "ts-node": "10.9.2",
37
- "typescript": "5.8.3",
38
- "vitest": "^3.2.4"
54
+ "typescript": "5.8.3"
39
55
  },
40
- "packageManager": "yarn@3.8.7"
56
+ "packageManager": "bun@latest"
41
57
  }
@@ -0,0 +1,147 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://duckbug.io/schemas/error-event.schema.json",
4
+ "title": "DuckBug Error Event",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["time", "message", "stacktrace", "file", "line"],
8
+ "properties": {
9
+ "eventId": {
10
+ "type": "string",
11
+ "format": "uuid"
12
+ },
13
+ "fingerprint": {
14
+ "type": "string",
15
+ "minLength": 1
16
+ },
17
+ "time": {
18
+ "type": "integer",
19
+ "minimum": 0
20
+ },
21
+ "message": {
22
+ "type": "string",
23
+ "minLength": 1
24
+ },
25
+ "exception": {
26
+ "description": "Any structured JSON representation of the exception.",
27
+ "type": ["object", "array", "string", "number", "boolean", "null"]
28
+ },
29
+ "stacktrace": {
30
+ "description": "Any structured JSON representation of frames.",
31
+ "type": ["object", "array", "string", "number", "boolean", "null"]
32
+ },
33
+ "stacktraceAsString": {
34
+ "type": "string"
35
+ },
36
+ "file": {
37
+ "type": "string",
38
+ "minLength": 1
39
+ },
40
+ "line": {
41
+ "type": "integer",
42
+ "minimum": 0
43
+ },
44
+ "dTags": {
45
+ "type": "array",
46
+ "items": {
47
+ "type": "string"
48
+ }
49
+ },
50
+ "context": {
51
+ "description": "Any JSON value.",
52
+ "type": ["object", "array", "string", "number", "boolean", "null"]
53
+ },
54
+ "ip": {
55
+ "type": "string"
56
+ },
57
+ "url": {
58
+ "type": "string"
59
+ },
60
+ "method": {
61
+ "type": "string"
62
+ },
63
+ "headers": {
64
+ "$ref": "#/$defs/map"
65
+ },
66
+ "queryParams": {
67
+ "$ref": "#/$defs/map"
68
+ },
69
+ "bodyParams": {
70
+ "$ref": "#/$defs/map"
71
+ },
72
+ "cookies": {
73
+ "$ref": "#/$defs/map"
74
+ },
75
+ "session": {
76
+ "$ref": "#/$defs/map"
77
+ },
78
+ "files": {
79
+ "$ref": "#/$defs/map"
80
+ },
81
+ "env": {
82
+ "$ref": "#/$defs/map"
83
+ },
84
+ "platform": {
85
+ "type": "string"
86
+ },
87
+ "release": {
88
+ "type": "string"
89
+ },
90
+ "environment": {
91
+ "type": "string"
92
+ },
93
+ "dist": {
94
+ "type": "string"
95
+ },
96
+ "serverName": {
97
+ "type": "string"
98
+ },
99
+ "service": {
100
+ "type": "string"
101
+ },
102
+ "requestId": {
103
+ "type": "string"
104
+ },
105
+ "transaction": {
106
+ "type": "string"
107
+ },
108
+ "traceId": {
109
+ "type": "string"
110
+ },
111
+ "spanId": {
112
+ "type": "string"
113
+ },
114
+ "handled": {
115
+ "type": "boolean"
116
+ },
117
+ "mechanism": {
118
+ "type": "string"
119
+ },
120
+ "sdk": {
121
+ "description": "Any JSON value.",
122
+ "type": ["object", "array", "string", "number", "boolean", "null"]
123
+ },
124
+ "user": {
125
+ "description": "Any JSON value.",
126
+ "type": ["object", "array", "string", "number", "boolean", "null"]
127
+ },
128
+ "runtime": {
129
+ "description": "Any JSON value.",
130
+ "type": ["object", "array", "string", "number", "boolean", "null"]
131
+ },
132
+ "breadcrumbs": {
133
+ "description": "Any JSON value.",
134
+ "type": ["object", "array", "string", "number", "boolean", "null"]
135
+ },
136
+ "extra": {
137
+ "description": "Any JSON value.",
138
+ "type": ["object", "array", "string", "number", "boolean", "null"]
139
+ }
140
+ },
141
+ "$defs": {
142
+ "map": {
143
+ "type": "object",
144
+ "additionalProperties": true
145
+ }
146
+ }
147
+ }
@@ -0,0 +1,126 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://duckbug.io/schemas/log-event.schema.json",
4
+ "title": "DuckBug Log Event",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["time", "level", "message"],
8
+ "properties": {
9
+ "eventId": {
10
+ "type": "string",
11
+ "format": "uuid"
12
+ },
13
+ "fingerprint": {
14
+ "type": "string",
15
+ "minLength": 1
16
+ },
17
+ "time": {
18
+ "type": "integer",
19
+ "minimum": 0
20
+ },
21
+ "level": {
22
+ "type": "string",
23
+ "enum": ["DEBUG", "INFO", "WARN", "ERROR", "FATAL"]
24
+ },
25
+ "message": {
26
+ "type": "string",
27
+ "minLength": 1
28
+ },
29
+ "dTags": {
30
+ "type": "array",
31
+ "items": {
32
+ "type": "string"
33
+ }
34
+ },
35
+ "context": {
36
+ "description": "Any JSON value.",
37
+ "type": ["object", "array", "string", "number", "boolean", "null"]
38
+ },
39
+ "ip": {
40
+ "type": "string"
41
+ },
42
+ "url": {
43
+ "type": "string"
44
+ },
45
+ "method": {
46
+ "type": "string"
47
+ },
48
+ "headers": {
49
+ "$ref": "#/$defs/map"
50
+ },
51
+ "queryParams": {
52
+ "$ref": "#/$defs/map"
53
+ },
54
+ "bodyParams": {
55
+ "$ref": "#/$defs/map"
56
+ },
57
+ "cookies": {
58
+ "$ref": "#/$defs/map"
59
+ },
60
+ "session": {
61
+ "$ref": "#/$defs/map"
62
+ },
63
+ "files": {
64
+ "$ref": "#/$defs/map"
65
+ },
66
+ "env": {
67
+ "$ref": "#/$defs/map"
68
+ },
69
+ "platform": {
70
+ "type": "string"
71
+ },
72
+ "release": {
73
+ "type": "string"
74
+ },
75
+ "environment": {
76
+ "type": "string"
77
+ },
78
+ "dist": {
79
+ "type": "string"
80
+ },
81
+ "serverName": {
82
+ "type": "string"
83
+ },
84
+ "service": {
85
+ "type": "string"
86
+ },
87
+ "requestId": {
88
+ "type": "string"
89
+ },
90
+ "transaction": {
91
+ "type": "string"
92
+ },
93
+ "traceId": {
94
+ "type": "string"
95
+ },
96
+ "spanId": {
97
+ "type": "string"
98
+ },
99
+ "sdk": {
100
+ "description": "Any JSON value.",
101
+ "type": ["object", "array", "string", "number", "boolean", "null"]
102
+ },
103
+ "user": {
104
+ "description": "Any JSON value.",
105
+ "type": ["object", "array", "string", "number", "boolean", "null"]
106
+ },
107
+ "runtime": {
108
+ "description": "Any JSON value.",
109
+ "type": ["object", "array", "string", "number", "boolean", "null"]
110
+ },
111
+ "breadcrumbs": {
112
+ "description": "Any JSON value.",
113
+ "type": ["object", "array", "string", "number", "boolean", "null"]
114
+ },
115
+ "extra": {
116
+ "description": "Any JSON value.",
117
+ "type": ["object", "array", "string", "number", "boolean", "null"]
118
+ }
119
+ },
120
+ "$defs": {
121
+ "map": {
122
+ "type": "object",
123
+ "additionalProperties": true
124
+ }
125
+ }
126
+ }