convex-tracer 0.1.1 → 0.1.2
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/client/_generated/_ignore.d.ts +1 -0
- package/dist/client/_generated/_ignore.d.ts.map +1 -0
- package/dist/client/_generated/_ignore.js +3 -0
- package/dist/client/_generated/_ignore.js.map +1 -0
- package/dist/client/helpers.d.ts +31 -0
- package/dist/client/helpers.js +186 -0
- package/dist/client/helpers.js.map +1 -0
- package/dist/client/tracer-api/index.d.ts +27 -0
- package/dist/client/tracer-api/index.js +177 -0
- package/dist/client/tracer-api/index.js.map +1 -0
- package/dist/client/tracer-api/types.d.ts +143 -0
- package/dist/client/tracer-api/types.js +2 -0
- package/dist/client/tracer-api/types.js.map +1 -0
- package/dist/client/types.d.ts +168 -0
- package/dist/client/types.js +2 -0
- package/dist/client/types.js.map +1 -0
- package/dist/component/_generated/api.d.ts +36 -0
- package/dist/component/_generated/api.js +31 -0
- package/dist/component/_generated/api.js.map +1 -0
- package/dist/component/_generated/dataModel.d.ts +46 -0
- package/dist/component/_generated/dataModel.js +11 -0
- package/dist/component/_generated/dataModel.js.map +1 -0
- package/dist/component/_generated/server.d.ts +121 -0
- package/dist/component/_generated/server.js +78 -0
- package/dist/component/_generated/server.js.map +1 -0
- package/dist/component/convex.config.d.ts +3 -0
- package/dist/component/convex.config.d.ts.map +1 -0
- package/dist/component/convex.config.js +3 -0
- package/dist/component/convex.config.js.map +1 -0
- package/dist/component/lib.d.ts +29 -29
- package/dist/component/schema.d.ts +17 -17
- package/dist/component/types.d.ts +93 -93
- package/dist/react/index.d.ts +6 -0
- package/dist/react/index.js +11 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/types.d.ts +8 -0
- package/dist/react/types.js +2 -0
- package/dist/react/types.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { type Infer } from "convex/values";
|
|
2
2
|
export declare const vTrace: import("convex/values").VObject<{
|
|
3
|
-
preserve?: boolean | undefined;
|
|
4
3
|
metadata?: Record<string, any> | undefined;
|
|
5
|
-
functionName?: string | undefined;
|
|
6
4
|
userId?: string | undefined;
|
|
7
|
-
|
|
5
|
+
functionName?: string | undefined;
|
|
6
|
+
preserve?: boolean | undefined;
|
|
7
|
+
status: "error" | "success" | "pending";
|
|
8
8
|
sampleRate: number;
|
|
9
9
|
updatedAt: number;
|
|
10
10
|
_creationTime: number;
|
|
11
11
|
_id: string;
|
|
12
12
|
}, {
|
|
13
|
-
status: import("convex/values").VUnion<"
|
|
13
|
+
status: import("convex/values").VUnion<"error" | "success" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"success", "required">, import("convex/values").VLiteral<"error", "required">], "required", never>;
|
|
14
14
|
sampleRate: import("convex/values").VFloat64<number, "required">;
|
|
15
15
|
preserve: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
16
16
|
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
@@ -19,16 +19,16 @@ export declare const vTrace: import("convex/values").VObject<{
|
|
|
19
19
|
userId: import("convex/values").VString<string | undefined, "optional">;
|
|
20
20
|
_id: import("convex/values").VString<string, "required">;
|
|
21
21
|
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
22
|
-
}, "required", "status" | "
|
|
22
|
+
}, "required", "status" | "metadata" | "sampleRate" | "userId" | "functionName" | "preserve" | "updatedAt" | `metadata.${string}` | "_creationTime" | "_id">;
|
|
23
23
|
export declare const vPaginatedTraces: import("convex/values").VObject<{
|
|
24
24
|
splitCursor?: string | null;
|
|
25
25
|
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
|
|
26
26
|
page: {
|
|
27
|
-
preserve?: boolean | undefined;
|
|
28
27
|
metadata?: Record<string, any> | undefined;
|
|
29
|
-
functionName?: string | undefined;
|
|
30
28
|
userId?: string | undefined;
|
|
31
|
-
|
|
29
|
+
functionName?: string | undefined;
|
|
30
|
+
preserve?: boolean | undefined;
|
|
31
|
+
status: "error" | "success" | "pending";
|
|
32
32
|
sampleRate: number;
|
|
33
33
|
updatedAt: number;
|
|
34
34
|
_creationTime: number;
|
|
@@ -38,27 +38,27 @@ export declare const vPaginatedTraces: import("convex/values").VObject<{
|
|
|
38
38
|
isDone: boolean;
|
|
39
39
|
}, {
|
|
40
40
|
page: import("convex/values").VArray<{
|
|
41
|
-
preserve?: boolean | undefined;
|
|
42
41
|
metadata?: Record<string, any> | undefined;
|
|
43
|
-
functionName?: string | undefined;
|
|
44
42
|
userId?: string | undefined;
|
|
45
|
-
|
|
43
|
+
functionName?: string | undefined;
|
|
44
|
+
preserve?: boolean | undefined;
|
|
45
|
+
status: "error" | "success" | "pending";
|
|
46
46
|
sampleRate: number;
|
|
47
47
|
updatedAt: number;
|
|
48
48
|
_creationTime: number;
|
|
49
49
|
_id: string;
|
|
50
50
|
}[], import("convex/values").VObject<{
|
|
51
|
-
preserve?: boolean | undefined;
|
|
52
51
|
metadata?: Record<string, any> | undefined;
|
|
53
|
-
functionName?: string | undefined;
|
|
54
52
|
userId?: string | undefined;
|
|
55
|
-
|
|
53
|
+
functionName?: string | undefined;
|
|
54
|
+
preserve?: boolean | undefined;
|
|
55
|
+
status: "error" | "success" | "pending";
|
|
56
56
|
sampleRate: number;
|
|
57
57
|
updatedAt: number;
|
|
58
58
|
_creationTime: number;
|
|
59
59
|
_id: string;
|
|
60
60
|
}, {
|
|
61
|
-
status: import("convex/values").VUnion<"
|
|
61
|
+
status: import("convex/values").VUnion<"error" | "success" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"success", "required">, import("convex/values").VLiteral<"error", "required">], "required", never>;
|
|
62
62
|
sampleRate: import("convex/values").VFloat64<number, "required">;
|
|
63
63
|
preserve: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
64
64
|
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
@@ -67,7 +67,7 @@ export declare const vPaginatedTraces: import("convex/values").VObject<{
|
|
|
67
67
|
userId: import("convex/values").VString<string | undefined, "optional">;
|
|
68
68
|
_id: import("convex/values").VString<string, "required">;
|
|
69
69
|
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
70
|
-
}, "required", "status" | "
|
|
70
|
+
}, "required", "status" | "metadata" | "sampleRate" | "userId" | "functionName" | "preserve" | "updatedAt" | `metadata.${string}` | "_creationTime" | "_id">, "required">;
|
|
71
71
|
continueCursor: import("convex/values").VString<string, "required">;
|
|
72
72
|
isDone: import("convex/values").VBoolean<boolean, "required">;
|
|
73
73
|
splitCursor: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
|
|
@@ -75,162 +75,162 @@ export declare const vPaginatedTraces: import("convex/values").VObject<{
|
|
|
75
75
|
}, "required", "page" | "continueCursor" | "isDone" | "splitCursor" | "pageStatus">;
|
|
76
76
|
export declare const vSpan: import("convex/values").VObject<{
|
|
77
77
|
error?: string | undefined;
|
|
78
|
-
|
|
78
|
+
duration?: number | undefined;
|
|
79
|
+
endTime?: number | undefined;
|
|
80
|
+
result?: any;
|
|
81
|
+
status: "error" | "success" | "pending";
|
|
79
82
|
metadata?: Record<string, any> | undefined;
|
|
80
|
-
functionName?: string | undefined;
|
|
81
83
|
source: "frontend" | "backend";
|
|
84
|
+
functionName?: string | undefined;
|
|
82
85
|
spanName: string;
|
|
83
86
|
startTime: number;
|
|
84
|
-
endTime?: number | undefined;
|
|
85
|
-
duration?: number | undefined;
|
|
86
87
|
args?: any;
|
|
87
|
-
result?: any;
|
|
88
88
|
parentSpanId?: string | undefined;
|
|
89
|
-
_creationTime: number;
|
|
90
89
|
traceId: string;
|
|
90
|
+
_creationTime: number;
|
|
91
91
|
_id: string;
|
|
92
92
|
}, {
|
|
93
93
|
error: import("convex/values").VString<string | undefined, "optional">;
|
|
94
|
-
|
|
94
|
+
duration: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
95
|
+
endTime: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
96
|
+
result: import("convex/values").VAny<any, "optional", string>;
|
|
97
|
+
status: import("convex/values").VUnion<"error" | "success" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"success", "required">, import("convex/values").VLiteral<"error", "required">], "required", never>;
|
|
95
98
|
metadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
|
|
96
|
-
functionName: import("convex/values").VString<string | undefined, "optional">;
|
|
97
99
|
source: import("convex/values").VUnion<"frontend" | "backend", [import("convex/values").VLiteral<"frontend", "required">, import("convex/values").VLiteral<"backend", "required">], "required", never>;
|
|
100
|
+
functionName: import("convex/values").VString<string | undefined, "optional">;
|
|
98
101
|
spanName: import("convex/values").VString<string, "required">;
|
|
99
102
|
startTime: import("convex/values").VFloat64<number, "required">;
|
|
100
|
-
endTime: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
101
|
-
duration: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
102
103
|
args: import("convex/values").VAny<any, "optional", string>;
|
|
103
|
-
result: import("convex/values").VAny<any, "optional", string>;
|
|
104
104
|
_id: import("convex/values").VString<string, "required">;
|
|
105
105
|
traceId: import("convex/values").VString<string, "required">;
|
|
106
106
|
parentSpanId: import("convex/values").VString<string | undefined, "optional">;
|
|
107
107
|
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
108
|
-
}, "required", "error" | "
|
|
108
|
+
}, "required", "error" | "traceId" | "duration" | "endTime" | "result" | "status" | "metadata" | "source" | "functionName" | `metadata.${string}` | "_creationTime" | "parentSpanId" | "spanName" | "startTime" | "args" | `result.${string}` | `args.${string}` | "_id">;
|
|
109
109
|
export declare const vLog: import("convex/values").VObject<{
|
|
110
110
|
metadata?: Record<string, any> | undefined;
|
|
111
|
-
severity: "
|
|
111
|
+
severity: "info" | "warn" | "error";
|
|
112
112
|
timestamp: number;
|
|
113
113
|
message: string;
|
|
114
|
-
_creationTime: number;
|
|
115
114
|
spanId: string;
|
|
115
|
+
_creationTime: number;
|
|
116
116
|
_id: string;
|
|
117
117
|
}, {
|
|
118
118
|
metadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
|
|
119
|
-
severity: import("convex/values").VUnion<"
|
|
119
|
+
severity: import("convex/values").VUnion<"info" | "warn" | "error", [import("convex/values").VLiteral<"info", "required">, import("convex/values").VLiteral<"warn", "required">, import("convex/values").VLiteral<"error", "required">], "required", never>;
|
|
120
120
|
timestamp: import("convex/values").VFloat64<number, "required">;
|
|
121
121
|
message: import("convex/values").VString<string, "required">;
|
|
122
122
|
_id: import("convex/values").VString<string, "required">;
|
|
123
123
|
spanId: import("convex/values").VString<string, "required">;
|
|
124
124
|
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
125
|
-
}, "required", "metadata" | `metadata.${string}` | "_creationTime" | "severity" | "
|
|
125
|
+
}, "required", "spanId" | "metadata" | `metadata.${string}` | "_creationTime" | "severity" | "timestamp" | "message" | "_id">;
|
|
126
126
|
export declare const vSpanWithLogs: import("convex/values").VObject<{
|
|
127
127
|
error?: string | undefined;
|
|
128
|
-
|
|
128
|
+
duration?: number | undefined;
|
|
129
|
+
endTime?: number | undefined;
|
|
130
|
+
result?: any;
|
|
131
|
+
status: "error" | "success" | "pending";
|
|
129
132
|
metadata?: Record<string, any> | undefined;
|
|
130
|
-
functionName?: string | undefined;
|
|
131
133
|
source: "frontend" | "backend";
|
|
134
|
+
functionName?: string | undefined;
|
|
132
135
|
spanName: string;
|
|
133
136
|
startTime: number;
|
|
134
|
-
endTime?: number | undefined;
|
|
135
|
-
duration?: number | undefined;
|
|
136
137
|
args?: any;
|
|
137
|
-
result?: any;
|
|
138
138
|
parentSpanId?: string | undefined;
|
|
139
|
-
_creationTime: number;
|
|
140
139
|
traceId: string;
|
|
140
|
+
_creationTime: number;
|
|
141
141
|
_id: string;
|
|
142
142
|
logs?: {
|
|
143
143
|
metadata?: Record<string, any> | undefined;
|
|
144
|
-
severity: "
|
|
144
|
+
severity: "info" | "warn" | "error";
|
|
145
145
|
timestamp: number;
|
|
146
146
|
message: string;
|
|
147
|
-
_creationTime: number;
|
|
148
147
|
spanId: string;
|
|
148
|
+
_creationTime: number;
|
|
149
149
|
_id: string;
|
|
150
150
|
}[] | undefined;
|
|
151
151
|
children?: any[] | undefined;
|
|
152
152
|
}, {
|
|
153
153
|
error: import("convex/values").VString<string | undefined, "optional">;
|
|
154
|
-
|
|
154
|
+
duration: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
155
|
+
endTime: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
156
|
+
result: import("convex/values").VAny<any, "optional", string>;
|
|
157
|
+
status: import("convex/values").VUnion<"error" | "success" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"success", "required">, import("convex/values").VLiteral<"error", "required">], "required", never>;
|
|
155
158
|
metadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
|
|
156
|
-
functionName: import("convex/values").VString<string | undefined, "optional">;
|
|
157
159
|
source: import("convex/values").VUnion<"frontend" | "backend", [import("convex/values").VLiteral<"frontend", "required">, import("convex/values").VLiteral<"backend", "required">], "required", never>;
|
|
160
|
+
functionName: import("convex/values").VString<string | undefined, "optional">;
|
|
158
161
|
spanName: import("convex/values").VString<string, "required">;
|
|
159
162
|
startTime: import("convex/values").VFloat64<number, "required">;
|
|
160
|
-
endTime: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
161
|
-
duration: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
162
163
|
args: import("convex/values").VAny<any, "optional", string>;
|
|
163
|
-
result: import("convex/values").VAny<any, "optional", string>;
|
|
164
164
|
_id: import("convex/values").VString<string, "required">;
|
|
165
165
|
traceId: import("convex/values").VString<string, "required">;
|
|
166
166
|
parentSpanId: import("convex/values").VString<string | undefined, "optional">;
|
|
167
167
|
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
168
168
|
logs: import("convex/values").VArray<{
|
|
169
169
|
metadata?: Record<string, any> | undefined;
|
|
170
|
-
severity: "
|
|
170
|
+
severity: "info" | "warn" | "error";
|
|
171
171
|
timestamp: number;
|
|
172
172
|
message: string;
|
|
173
|
-
_creationTime: number;
|
|
174
173
|
spanId: string;
|
|
174
|
+
_creationTime: number;
|
|
175
175
|
_id: string;
|
|
176
176
|
}[] | undefined, import("convex/values").VObject<{
|
|
177
177
|
metadata?: Record<string, any> | undefined;
|
|
178
|
-
severity: "
|
|
178
|
+
severity: "info" | "warn" | "error";
|
|
179
179
|
timestamp: number;
|
|
180
180
|
message: string;
|
|
181
|
-
_creationTime: number;
|
|
182
181
|
spanId: string;
|
|
182
|
+
_creationTime: number;
|
|
183
183
|
_id: string;
|
|
184
184
|
}, {
|
|
185
185
|
metadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
|
|
186
|
-
severity: import("convex/values").VUnion<"
|
|
186
|
+
severity: import("convex/values").VUnion<"info" | "warn" | "error", [import("convex/values").VLiteral<"info", "required">, import("convex/values").VLiteral<"warn", "required">, import("convex/values").VLiteral<"error", "required">], "required", never>;
|
|
187
187
|
timestamp: import("convex/values").VFloat64<number, "required">;
|
|
188
188
|
message: import("convex/values").VString<string, "required">;
|
|
189
189
|
_id: import("convex/values").VString<string, "required">;
|
|
190
190
|
spanId: import("convex/values").VString<string, "required">;
|
|
191
191
|
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
192
|
-
}, "required", "metadata" | `metadata.${string}` | "_creationTime" | "severity" | "
|
|
192
|
+
}, "required", "spanId" | "metadata" | `metadata.${string}` | "_creationTime" | "severity" | "timestamp" | "message" | "_id">, "optional">;
|
|
193
193
|
children: import("convex/values").VArray<any[] | undefined, import("convex/values").VAny<any, "required", string>, "optional">;
|
|
194
|
-
}, "required", "error" | "
|
|
194
|
+
}, "required", "error" | "traceId" | "duration" | "endTime" | "result" | "status" | "metadata" | "source" | "functionName" | `metadata.${string}` | "_creationTime" | "parentSpanId" | "spanName" | "startTime" | "args" | `result.${string}` | `args.${string}` | "logs" | "_id" | "children">;
|
|
195
195
|
export declare const vCompleteTrace: import("convex/values").VObject<{
|
|
196
|
-
preserve?: boolean | undefined;
|
|
197
196
|
metadata?: Record<string, any> | undefined;
|
|
198
|
-
functionName?: string | undefined;
|
|
199
197
|
userId?: string | undefined;
|
|
200
|
-
|
|
198
|
+
functionName?: string | undefined;
|
|
199
|
+
preserve?: boolean | undefined;
|
|
200
|
+
status: "error" | "success" | "pending";
|
|
201
201
|
sampleRate: number;
|
|
202
202
|
updatedAt: number;
|
|
203
203
|
_creationTime: number;
|
|
204
204
|
_id: string;
|
|
205
205
|
spans: {
|
|
206
206
|
error?: string | undefined;
|
|
207
|
-
|
|
207
|
+
duration?: number | undefined;
|
|
208
|
+
endTime?: number | undefined;
|
|
209
|
+
result?: any;
|
|
210
|
+
status: "error" | "success" | "pending";
|
|
208
211
|
metadata?: Record<string, any> | undefined;
|
|
209
|
-
functionName?: string | undefined;
|
|
210
212
|
source: "frontend" | "backend";
|
|
213
|
+
functionName?: string | undefined;
|
|
211
214
|
spanName: string;
|
|
212
215
|
startTime: number;
|
|
213
|
-
endTime?: number | undefined;
|
|
214
|
-
duration?: number | undefined;
|
|
215
216
|
args?: any;
|
|
216
|
-
result?: any;
|
|
217
217
|
parentSpanId?: string | undefined;
|
|
218
|
-
_creationTime: number;
|
|
219
218
|
traceId: string;
|
|
219
|
+
_creationTime: number;
|
|
220
220
|
_id: string;
|
|
221
221
|
logs?: {
|
|
222
222
|
metadata?: Record<string, any> | undefined;
|
|
223
|
-
severity: "
|
|
223
|
+
severity: "info" | "warn" | "error";
|
|
224
224
|
timestamp: number;
|
|
225
225
|
message: string;
|
|
226
|
-
_creationTime: number;
|
|
227
226
|
spanId: string;
|
|
227
|
+
_creationTime: number;
|
|
228
228
|
_id: string;
|
|
229
229
|
}[] | undefined;
|
|
230
230
|
children?: any[] | undefined;
|
|
231
231
|
}[];
|
|
232
232
|
}, {
|
|
233
|
-
status: import("convex/values").VUnion<"
|
|
233
|
+
status: import("convex/values").VUnion<"error" | "success" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"success", "required">, import("convex/values").VLiteral<"error", "required">], "required", never>;
|
|
234
234
|
sampleRate: import("convex/values").VFloat64<number, "required">;
|
|
235
235
|
preserve: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
236
236
|
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
@@ -241,100 +241,100 @@ export declare const vCompleteTrace: import("convex/values").VObject<{
|
|
|
241
241
|
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
242
242
|
spans: import("convex/values").VArray<{
|
|
243
243
|
error?: string | undefined;
|
|
244
|
-
|
|
244
|
+
duration?: number | undefined;
|
|
245
|
+
endTime?: number | undefined;
|
|
246
|
+
result?: any;
|
|
247
|
+
status: "error" | "success" | "pending";
|
|
245
248
|
metadata?: Record<string, any> | undefined;
|
|
246
|
-
functionName?: string | undefined;
|
|
247
249
|
source: "frontend" | "backend";
|
|
250
|
+
functionName?: string | undefined;
|
|
248
251
|
spanName: string;
|
|
249
252
|
startTime: number;
|
|
250
|
-
endTime?: number | undefined;
|
|
251
|
-
duration?: number | undefined;
|
|
252
253
|
args?: any;
|
|
253
|
-
result?: any;
|
|
254
254
|
parentSpanId?: string | undefined;
|
|
255
|
-
_creationTime: number;
|
|
256
255
|
traceId: string;
|
|
256
|
+
_creationTime: number;
|
|
257
257
|
_id: string;
|
|
258
258
|
logs?: {
|
|
259
259
|
metadata?: Record<string, any> | undefined;
|
|
260
|
-
severity: "
|
|
260
|
+
severity: "info" | "warn" | "error";
|
|
261
261
|
timestamp: number;
|
|
262
262
|
message: string;
|
|
263
|
-
_creationTime: number;
|
|
264
263
|
spanId: string;
|
|
264
|
+
_creationTime: number;
|
|
265
265
|
_id: string;
|
|
266
266
|
}[] | undefined;
|
|
267
267
|
children?: any[] | undefined;
|
|
268
268
|
}[], import("convex/values").VObject<{
|
|
269
269
|
error?: string | undefined;
|
|
270
|
-
|
|
270
|
+
duration?: number | undefined;
|
|
271
|
+
endTime?: number | undefined;
|
|
272
|
+
result?: any;
|
|
273
|
+
status: "error" | "success" | "pending";
|
|
271
274
|
metadata?: Record<string, any> | undefined;
|
|
272
|
-
functionName?: string | undefined;
|
|
273
275
|
source: "frontend" | "backend";
|
|
276
|
+
functionName?: string | undefined;
|
|
274
277
|
spanName: string;
|
|
275
278
|
startTime: number;
|
|
276
|
-
endTime?: number | undefined;
|
|
277
|
-
duration?: number | undefined;
|
|
278
279
|
args?: any;
|
|
279
|
-
result?: any;
|
|
280
280
|
parentSpanId?: string | undefined;
|
|
281
|
-
_creationTime: number;
|
|
282
281
|
traceId: string;
|
|
282
|
+
_creationTime: number;
|
|
283
283
|
_id: string;
|
|
284
284
|
logs?: {
|
|
285
285
|
metadata?: Record<string, any> | undefined;
|
|
286
|
-
severity: "
|
|
286
|
+
severity: "info" | "warn" | "error";
|
|
287
287
|
timestamp: number;
|
|
288
288
|
message: string;
|
|
289
|
-
_creationTime: number;
|
|
290
289
|
spanId: string;
|
|
290
|
+
_creationTime: number;
|
|
291
291
|
_id: string;
|
|
292
292
|
}[] | undefined;
|
|
293
293
|
children?: any[] | undefined;
|
|
294
294
|
}, {
|
|
295
295
|
error: import("convex/values").VString<string | undefined, "optional">;
|
|
296
|
-
|
|
296
|
+
duration: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
297
|
+
endTime: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
298
|
+
result: import("convex/values").VAny<any, "optional", string>;
|
|
299
|
+
status: import("convex/values").VUnion<"error" | "success" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"success", "required">, import("convex/values").VLiteral<"error", "required">], "required", never>;
|
|
297
300
|
metadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
|
|
298
|
-
functionName: import("convex/values").VString<string | undefined, "optional">;
|
|
299
301
|
source: import("convex/values").VUnion<"frontend" | "backend", [import("convex/values").VLiteral<"frontend", "required">, import("convex/values").VLiteral<"backend", "required">], "required", never>;
|
|
302
|
+
functionName: import("convex/values").VString<string | undefined, "optional">;
|
|
300
303
|
spanName: import("convex/values").VString<string, "required">;
|
|
301
304
|
startTime: import("convex/values").VFloat64<number, "required">;
|
|
302
|
-
endTime: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
303
|
-
duration: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
304
305
|
args: import("convex/values").VAny<any, "optional", string>;
|
|
305
|
-
result: import("convex/values").VAny<any, "optional", string>;
|
|
306
306
|
_id: import("convex/values").VString<string, "required">;
|
|
307
307
|
traceId: import("convex/values").VString<string, "required">;
|
|
308
308
|
parentSpanId: import("convex/values").VString<string | undefined, "optional">;
|
|
309
309
|
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
310
310
|
logs: import("convex/values").VArray<{
|
|
311
311
|
metadata?: Record<string, any> | undefined;
|
|
312
|
-
severity: "
|
|
312
|
+
severity: "info" | "warn" | "error";
|
|
313
313
|
timestamp: number;
|
|
314
314
|
message: string;
|
|
315
|
-
_creationTime: number;
|
|
316
315
|
spanId: string;
|
|
316
|
+
_creationTime: number;
|
|
317
317
|
_id: string;
|
|
318
318
|
}[] | undefined, import("convex/values").VObject<{
|
|
319
319
|
metadata?: Record<string, any> | undefined;
|
|
320
|
-
severity: "
|
|
320
|
+
severity: "info" | "warn" | "error";
|
|
321
321
|
timestamp: number;
|
|
322
322
|
message: string;
|
|
323
|
-
_creationTime: number;
|
|
324
323
|
spanId: string;
|
|
324
|
+
_creationTime: number;
|
|
325
325
|
_id: string;
|
|
326
326
|
}, {
|
|
327
327
|
metadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
|
|
328
|
-
severity: import("convex/values").VUnion<"
|
|
328
|
+
severity: import("convex/values").VUnion<"info" | "warn" | "error", [import("convex/values").VLiteral<"info", "required">, import("convex/values").VLiteral<"warn", "required">, import("convex/values").VLiteral<"error", "required">], "required", never>;
|
|
329
329
|
timestamp: import("convex/values").VFloat64<number, "required">;
|
|
330
330
|
message: import("convex/values").VString<string, "required">;
|
|
331
331
|
_id: import("convex/values").VString<string, "required">;
|
|
332
332
|
spanId: import("convex/values").VString<string, "required">;
|
|
333
333
|
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
334
|
-
}, "required", "metadata" | `metadata.${string}` | "_creationTime" | "severity" | "
|
|
334
|
+
}, "required", "spanId" | "metadata" | `metadata.${string}` | "_creationTime" | "severity" | "timestamp" | "message" | "_id">, "optional">;
|
|
335
335
|
children: import("convex/values").VArray<any[] | undefined, import("convex/values").VAny<any, "required", string>, "optional">;
|
|
336
|
-
}, "required", "error" | "
|
|
337
|
-
}, "required", "status" | "
|
|
336
|
+
}, "required", "error" | "traceId" | "duration" | "endTime" | "result" | "status" | "metadata" | "source" | "functionName" | `metadata.${string}` | "_creationTime" | "parentSpanId" | "spanName" | "startTime" | "args" | `result.${string}` | `args.${string}` | "logs" | "_id" | "children">, "required">;
|
|
337
|
+
}, "required", "status" | "metadata" | "sampleRate" | "userId" | "functionName" | "preserve" | "updatedAt" | `metadata.${string}` | "_creationTime" | "spans" | "_id">;
|
|
338
338
|
export type Trace = Infer<typeof vTrace>;
|
|
339
339
|
export type Span = Infer<typeof vSpan>;
|
|
340
340
|
export type Log = Infer<typeof vLog>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { FunctionReference, FunctionReturnType } from "convex/server";
|
|
2
|
+
import type { EmptyObject, OptionalTracedArgs } from "./types";
|
|
3
|
+
export declare function useTracedQuery<TQuery extends FunctionReference<"mutation">>(fnRef: TQuery): OptionalTracedArgs<TQuery> extends [args?: EmptyObject] ? (args?: EmptyObject) => Promise<FunctionReturnType<TQuery>> : OptionalTracedArgs<TQuery> extends [args: infer Args] ? (args: Args) => Promise<FunctionReturnType<TQuery>> : never;
|
|
4
|
+
export declare function useTracedMutation<TMutation extends FunctionReference<"mutation">>(fnRef: TMutation): OptionalTracedArgs<TMutation> extends [args?: EmptyObject] ? (args?: EmptyObject) => Promise<FunctionReturnType<TMutation>> : OptionalTracedArgs<TMutation> extends [args: infer Args] ? (args: Args) => Promise<FunctionReturnType<TMutation>> : never;
|
|
5
|
+
export declare function useTracedAction<TAction extends FunctionReference<"action">>(fnRef: TAction): OptionalTracedArgs<TAction> extends [args?: EmptyObject] ? (args?: EmptyObject) => Promise<FunctionReturnType<TAction>> : OptionalTracedArgs<TAction> extends [args: infer Args] ? (args: Args) => Promise<FunctionReturnType<TAction>> : never;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useAction, useMutation } from "convex/react";
|
|
2
|
+
export function useTracedQuery(fnRef) {
|
|
3
|
+
return useMutation(fnRef);
|
|
4
|
+
}
|
|
5
|
+
export function useTracedMutation(fnRef) {
|
|
6
|
+
return useMutation(fnRef);
|
|
7
|
+
}
|
|
8
|
+
export function useTracedAction(fnRef) {
|
|
9
|
+
return useAction(fnRef);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKtD,MAAM,UAAU,cAAc,CAC5B,KAAa;IAMb,OAAO,WAAW,CAAC,KAAK,CAAQ,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,iBAAiB,CAG/B,KAAgB;IAMhB,OAAO,WAAW,CAAC,KAAK,CAAQ,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,KAAc;IAMd,OAAO,SAAS,CAAC,KAAK,CAAQ,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AnyFunctionReference } from "../client/types";
|
|
2
|
+
export type EmptyObject = Record<string, never>;
|
|
3
|
+
export type OmitTraceContext<T> = T extends {
|
|
4
|
+
__traceContext?: any;
|
|
5
|
+
} ? Omit<T, "__traceContext"> : T;
|
|
6
|
+
export type ArgsWithoutTrace<Args> = Args extends Record<string, any> ? OmitTraceContext<Args> : Args;
|
|
7
|
+
export type OptionalTracedArgs<FuncRef extends AnyFunctionReference> = keyof OmitTraceContext<FuncRef["_args"]> extends never ? [args?: EmptyObject] : [args: OmitTraceContext<FuncRef["_args"]>];
|
|
8
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/react/types.ts"],"names":[],"mappings":""}
|