@refactorlabs/recount 0.5.5
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/LICENSE +21 -0
- package/README.md +74 -0
- package/dist/chunk-XKR3GXTH.js +33 -0
- package/dist/chunk-XKR3GXTH.js.map +1 -0
- package/dist/index.cjs +980 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +440 -0
- package/dist/index.d.ts +440 -0
- package/dist/index.js +950 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/anthropic.cjs +137 -0
- package/dist/integrations/anthropic.cjs.map +1 -0
- package/dist/integrations/anthropic.d.cts +8 -0
- package/dist/integrations/anthropic.d.ts +8 -0
- package/dist/integrations/anthropic.js +120 -0
- package/dist/integrations/anthropic.js.map +1 -0
- package/dist/integrations/mongodb.cjs +282 -0
- package/dist/integrations/mongodb.cjs.map +1 -0
- package/dist/integrations/mongodb.d.cts +8 -0
- package/dist/integrations/mongodb.d.ts +8 -0
- package/dist/integrations/mongodb.js +265 -0
- package/dist/integrations/mongodb.js.map +1 -0
- package/dist/integrations/openai.cjs +142 -0
- package/dist/integrations/openai.cjs.map +1 -0
- package/dist/integrations/openai.d.cts +8 -0
- package/dist/integrations/openai.d.ts +8 -0
- package/dist/integrations/openai.js +125 -0
- package/dist/integrations/openai.js.map +1 -0
- package/llms.md +437 -0
- package/package.json +117 -0
- package/recount-instrument/SKILL.md +196 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
type JsonObject = Record<string, unknown> | unknown[];
|
|
2
|
+
type Metadata = Record<string, string | number | boolean | null>;
|
|
3
|
+
type TableHighlight = 'danger' | 'warn' | 'success' | 'info' | 'muted';
|
|
4
|
+
type TableColumn = string | {
|
|
5
|
+
label: string;
|
|
6
|
+
span?: number;
|
|
7
|
+
highlight?: TableHighlight;
|
|
8
|
+
};
|
|
9
|
+
type TableCellSpan = {
|
|
10
|
+
readonly __cellSpan: true;
|
|
11
|
+
readonly span: number;
|
|
12
|
+
readonly value: unknown;
|
|
13
|
+
};
|
|
14
|
+
type TableSummaryStat = {
|
|
15
|
+
text: string;
|
|
16
|
+
highlight?: TableHighlight;
|
|
17
|
+
};
|
|
18
|
+
type TableSection = {
|
|
19
|
+
title?: string;
|
|
20
|
+
rows: unknown[][];
|
|
21
|
+
rowHighlights?: (TableHighlight | null)[];
|
|
22
|
+
cellHighlights?: (TableHighlight | null)[][];
|
|
23
|
+
summary?: TableSummaryStat[];
|
|
24
|
+
};
|
|
25
|
+
type TableData = {
|
|
26
|
+
title?: string;
|
|
27
|
+
columns: TableColumn[];
|
|
28
|
+
/** Flat rows - required when `sections` is not provided. */
|
|
29
|
+
rows?: unknown[][];
|
|
30
|
+
rowHighlights?: (TableHighlight | null)[];
|
|
31
|
+
cellHighlights?: (TableHighlight | null)[][];
|
|
32
|
+
summary?: TableSummaryStat[];
|
|
33
|
+
/** Named sections sharing the same columns. Mutually exclusive with `rows`. */
|
|
34
|
+
sections?: [TableSection, ...TableSection[]];
|
|
35
|
+
};
|
|
36
|
+
/** TableData with flat rows guaranteed present. Returned by build(), tableFromObject(), tableFromRecords(). */
|
|
37
|
+
type TableDataFlat = TableData & {
|
|
38
|
+
rows: unknown[][];
|
|
39
|
+
};
|
|
40
|
+
type ChartType = 'line' | 'bar' | 'pie' | 'scatter';
|
|
41
|
+
type ChartSeries = {
|
|
42
|
+
name?: string;
|
|
43
|
+
data: number[];
|
|
44
|
+
};
|
|
45
|
+
type ChartReferenceLine = {
|
|
46
|
+
value: number;
|
|
47
|
+
label?: string;
|
|
48
|
+
};
|
|
49
|
+
type ChartData = {
|
|
50
|
+
title?: string;
|
|
51
|
+
type: ChartType;
|
|
52
|
+
labels: string[];
|
|
53
|
+
series: ChartSeries[];
|
|
54
|
+
referenceLines?: ChartReferenceLine[];
|
|
55
|
+
};
|
|
56
|
+
type RetentionPeriod = '1d' | '7d' | '30d' | '90d' | '1y';
|
|
57
|
+
type SpanType = 'message' | 'json' | 'table' | 'http' | 'chart' | 'llm' | 'image' | 'db' | 'group';
|
|
58
|
+
type MessageSpanLevel = 'info' | 'warn' | 'error';
|
|
59
|
+
type MessageSpanOptions = {
|
|
60
|
+
description?: string;
|
|
61
|
+
level?: MessageSpanLevel;
|
|
62
|
+
alerts?: SpanAlert[];
|
|
63
|
+
public?: boolean;
|
|
64
|
+
};
|
|
65
|
+
type DbSpanMetadata = {
|
|
66
|
+
collection?: string;
|
|
67
|
+
table?: string;
|
|
68
|
+
queryType?: 'sql' | 'nosql';
|
|
69
|
+
};
|
|
70
|
+
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
71
|
+
type HttpContentType = 'json' | 'form' | 'text' | null;
|
|
72
|
+
type HttpRequestInput = {
|
|
73
|
+
method: HttpMethod;
|
|
74
|
+
url: string;
|
|
75
|
+
headers?: Record<string, string | {
|
|
76
|
+
__redacted: true;
|
|
77
|
+
}>;
|
|
78
|
+
content_type?: HttpContentType;
|
|
79
|
+
body?: JsonObject | string | null;
|
|
80
|
+
};
|
|
81
|
+
type HttpResponseOutput = {
|
|
82
|
+
status: number;
|
|
83
|
+
headers?: Record<string, string | {
|
|
84
|
+
__redacted: true;
|
|
85
|
+
}>;
|
|
86
|
+
content_type?: HttpContentType;
|
|
87
|
+
body?: JsonObject | string | null;
|
|
88
|
+
};
|
|
89
|
+
type LlmMessage = {
|
|
90
|
+
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
91
|
+
content: string;
|
|
92
|
+
};
|
|
93
|
+
type LlmSpanInput = {
|
|
94
|
+
prompt?: string;
|
|
95
|
+
messages?: LlmMessage[];
|
|
96
|
+
system?: string;
|
|
97
|
+
provider?: string;
|
|
98
|
+
model?: string;
|
|
99
|
+
};
|
|
100
|
+
type LlmSpanOutput = {
|
|
101
|
+
response?: string | JsonObject;
|
|
102
|
+
inputTokens?: number;
|
|
103
|
+
outputTokens?: number;
|
|
104
|
+
stopReason?: string;
|
|
105
|
+
};
|
|
106
|
+
type ImageSpanData = {
|
|
107
|
+
url: string;
|
|
108
|
+
label?: string;
|
|
109
|
+
};
|
|
110
|
+
type SpanAlertCheck = {
|
|
111
|
+
target?: string;
|
|
112
|
+
value: number;
|
|
113
|
+
};
|
|
114
|
+
type SpanAlert = {
|
|
115
|
+
label?: string;
|
|
116
|
+
level: 'warn' | 'error';
|
|
117
|
+
/** At least one of gt or lt must be provided */
|
|
118
|
+
gt?: number;
|
|
119
|
+
lt?: number;
|
|
120
|
+
checks: [SpanAlertCheck, ...SpanAlertCheck[]];
|
|
121
|
+
};
|
|
122
|
+
type SpanBase = {
|
|
123
|
+
name: string;
|
|
124
|
+
description?: string;
|
|
125
|
+
alerts?: SpanAlert[];
|
|
126
|
+
durationMs?: number;
|
|
127
|
+
order: number;
|
|
128
|
+
parentOrder?: number;
|
|
129
|
+
public?: boolean;
|
|
130
|
+
};
|
|
131
|
+
type Span = (SpanBase & {
|
|
132
|
+
type: 'http';
|
|
133
|
+
input?: HttpRequestInput;
|
|
134
|
+
output?: HttpResponseOutput;
|
|
135
|
+
}) | (SpanBase & {
|
|
136
|
+
type: 'table';
|
|
137
|
+
input?: TableData;
|
|
138
|
+
output?: TableData;
|
|
139
|
+
}) | (SpanBase & {
|
|
140
|
+
type: 'chart';
|
|
141
|
+
input?: ChartData;
|
|
142
|
+
output?: ChartData;
|
|
143
|
+
}) | (SpanBase & {
|
|
144
|
+
type: 'llm';
|
|
145
|
+
input?: LlmSpanInput;
|
|
146
|
+
output?: LlmSpanOutput;
|
|
147
|
+
}) | (SpanBase & {
|
|
148
|
+
type: 'image';
|
|
149
|
+
input?: ImageSpanData;
|
|
150
|
+
output?: ImageSpanData;
|
|
151
|
+
}) | (SpanBase & {
|
|
152
|
+
type: 'db';
|
|
153
|
+
input?: Record<string, unknown>;
|
|
154
|
+
output?: Record<string, unknown>;
|
|
155
|
+
metadata?: DbSpanMetadata;
|
|
156
|
+
}) | (SpanBase & {
|
|
157
|
+
type: 'message';
|
|
158
|
+
text?: string;
|
|
159
|
+
level: MessageSpanLevel;
|
|
160
|
+
}) | (SpanBase & {
|
|
161
|
+
type: 'json';
|
|
162
|
+
input?: JsonObject;
|
|
163
|
+
output?: JsonObject;
|
|
164
|
+
}) | (Omit<SpanBase, 'public'> & {
|
|
165
|
+
type: 'group';
|
|
166
|
+
});
|
|
167
|
+
type SpanBaseOptions = {
|
|
168
|
+
description?: string;
|
|
169
|
+
alerts?: SpanAlert[];
|
|
170
|
+
durationMs?: number;
|
|
171
|
+
public?: boolean;
|
|
172
|
+
redact?: string[];
|
|
173
|
+
};
|
|
174
|
+
type TableSpanOptions = SpanBaseOptions & {
|
|
175
|
+
input?: TableData;
|
|
176
|
+
output?: TableData;
|
|
177
|
+
};
|
|
178
|
+
type ChartSpanOptions = SpanBaseOptions & {
|
|
179
|
+
input?: ChartData;
|
|
180
|
+
output?: ChartData;
|
|
181
|
+
};
|
|
182
|
+
type HttpSpanOptions = SpanBaseOptions & {
|
|
183
|
+
input?: HttpRequestInput;
|
|
184
|
+
output?: HttpResponseOutput;
|
|
185
|
+
};
|
|
186
|
+
type LlmSpanOptions = SpanBaseOptions & {
|
|
187
|
+
input?: LlmSpanInput;
|
|
188
|
+
output?: LlmSpanOutput;
|
|
189
|
+
};
|
|
190
|
+
type ImageSpanOptions = SpanBaseOptions & {
|
|
191
|
+
input?: ImageSpanData;
|
|
192
|
+
output?: ImageSpanData;
|
|
193
|
+
};
|
|
194
|
+
type DbParamValue = string | number | boolean | null | {
|
|
195
|
+
__redacted: true;
|
|
196
|
+
};
|
|
197
|
+
type DbSpanOptions = SpanBaseOptions & {
|
|
198
|
+
metadata?: DbSpanMetadata;
|
|
199
|
+
input?: {
|
|
200
|
+
query?: string;
|
|
201
|
+
params?: DbParamValue[];
|
|
202
|
+
[key: string]: unknown;
|
|
203
|
+
};
|
|
204
|
+
output?: Record<string, unknown>;
|
|
205
|
+
redactParams?: DbParamValue[];
|
|
206
|
+
};
|
|
207
|
+
type JsonSpanOptions = SpanBaseOptions & {
|
|
208
|
+
input?: JsonObject;
|
|
209
|
+
output?: JsonObject;
|
|
210
|
+
};
|
|
211
|
+
type GroupSpanOptions = {
|
|
212
|
+
description?: string;
|
|
213
|
+
limit?: number;
|
|
214
|
+
sample?: number;
|
|
215
|
+
sampleThreshold?: number;
|
|
216
|
+
};
|
|
217
|
+
type SpanOptions = {
|
|
218
|
+
description?: string;
|
|
219
|
+
input?: JsonObject;
|
|
220
|
+
output?: JsonObject;
|
|
221
|
+
alerts?: SpanAlert[];
|
|
222
|
+
durationMs?: number;
|
|
223
|
+
redact?: string[];
|
|
224
|
+
redactParams?: unknown[];
|
|
225
|
+
public?: boolean;
|
|
226
|
+
text?: string;
|
|
227
|
+
level?: MessageSpanLevel;
|
|
228
|
+
};
|
|
229
|
+
type IngestPayload = {
|
|
230
|
+
name: string;
|
|
231
|
+
input?: JsonObject;
|
|
232
|
+
environment?: string;
|
|
233
|
+
metadata?: Metadata;
|
|
234
|
+
durationMs?: number;
|
|
235
|
+
retentionPeriod?: RetentionPeriod;
|
|
236
|
+
spans: Span[];
|
|
237
|
+
};
|
|
238
|
+
type TraceOptions = {
|
|
239
|
+
input?: JsonObject;
|
|
240
|
+
environment?: string;
|
|
241
|
+
metadata?: Metadata;
|
|
242
|
+
retentionPeriod?: RetentionPeriod;
|
|
243
|
+
};
|
|
244
|
+
type RecountOptions = {
|
|
245
|
+
apiKey?: string;
|
|
246
|
+
apiUrl?: string;
|
|
247
|
+
environment?: string;
|
|
248
|
+
debug?: boolean;
|
|
249
|
+
};
|
|
250
|
+
type IngestResult = {
|
|
251
|
+
traceId: string;
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
declare class SpanGroup {
|
|
255
|
+
#private;
|
|
256
|
+
span(type: 'table', name: string, options?: TableSpanOptions): this;
|
|
257
|
+
span(type: 'chart', name: string, options?: ChartSpanOptions): this;
|
|
258
|
+
span(type: 'http', name: string, options?: HttpSpanOptions): this;
|
|
259
|
+
span(type: 'llm', name: string, options?: LlmSpanOptions): this;
|
|
260
|
+
span(type: 'image', name: string, options?: ImageSpanOptions): this;
|
|
261
|
+
span(type: 'db', name: string, options?: DbSpanOptions): this;
|
|
262
|
+
span(type: 'json', name: string, options?: JsonSpanOptions): this;
|
|
263
|
+
span(type: 'message', name: string, options?: MessageSpanOptions & {
|
|
264
|
+
text?: string;
|
|
265
|
+
}): this;
|
|
266
|
+
span(type: Exclude<SpanType, 'group'>, name: string, options?: SpanOptions): this;
|
|
267
|
+
addMessage(name: string, text?: string, opts?: MessageSpanOptions): this;
|
|
268
|
+
_flush(push: (type: string, name: string, opts?: SpanOptions) => void, options?: Pick<GroupSpanOptions, 'limit' | 'sample' | 'sampleThreshold'>): void;
|
|
269
|
+
}
|
|
270
|
+
declare class Trace {
|
|
271
|
+
#private;
|
|
272
|
+
constructor(client: Recount, name: string, options?: TraceOptions, disabled?: boolean, log?: (msg: string) => void);
|
|
273
|
+
span(type: 'table', name: string, options?: TableSpanOptions): this;
|
|
274
|
+
span(type: 'chart', name: string, options?: ChartSpanOptions): this;
|
|
275
|
+
span(type: 'http', name: string, options?: HttpSpanOptions): this;
|
|
276
|
+
span(type: 'llm', name: string, options?: LlmSpanOptions): this;
|
|
277
|
+
span(type: 'image', name: string, options?: ImageSpanOptions): this;
|
|
278
|
+
span(type: 'db', name: string, options?: DbSpanOptions): this;
|
|
279
|
+
span(type: 'json', name: string, options?: JsonSpanOptions): this;
|
|
280
|
+
span(type: 'message', name: string, options?: MessageSpanOptions & {
|
|
281
|
+
text?: string;
|
|
282
|
+
}): this;
|
|
283
|
+
span(type: Exclude<SpanType, 'group'>, name: string, options?: SpanOptions): this;
|
|
284
|
+
group(name: string, builder: (g: SpanGroup) => void, options?: GroupSpanOptions): this;
|
|
285
|
+
addMessage(name: string, text?: string, opts?: MessageSpanOptions): this;
|
|
286
|
+
addMetadata(data: Metadata): this;
|
|
287
|
+
setEnvironment(environment: string): this;
|
|
288
|
+
fetch<T = unknown>(name: string, url: string | URL, init?: RequestInit, options?: {
|
|
289
|
+
redact?: string[];
|
|
290
|
+
}): Promise<T | null>;
|
|
291
|
+
end(): Promise<IngestResult>;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
declare class RecountError extends Error {
|
|
295
|
+
readonly status: number;
|
|
296
|
+
constructor(status: number, message: string);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
declare class Recount {
|
|
300
|
+
#private;
|
|
301
|
+
constructor(options?: RecountOptions);
|
|
302
|
+
startTrace(name: string, options?: TraceOptions): Trace;
|
|
303
|
+
ingest(payload: IngestPayload): Promise<IngestResult>;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
declare function spanCell(value: unknown, span: number): TableCellSpan;
|
|
307
|
+
declare class TableBuilder {
|
|
308
|
+
private _title?;
|
|
309
|
+
private _source?;
|
|
310
|
+
private _rawKeys;
|
|
311
|
+
private _rawRows;
|
|
312
|
+
private _labels;
|
|
313
|
+
private _valueTransforms;
|
|
314
|
+
private _pick?;
|
|
315
|
+
private _round?;
|
|
316
|
+
private _columnSpans;
|
|
317
|
+
private _columnHighlights;
|
|
318
|
+
private _rowHighlightFn?;
|
|
319
|
+
private _cellHighlightFns;
|
|
320
|
+
private _extraRows;
|
|
321
|
+
private _summary?;
|
|
322
|
+
private _redactFields;
|
|
323
|
+
constructor(title?: string);
|
|
324
|
+
redact(fields: string[]): this;
|
|
325
|
+
private _shouldRedact;
|
|
326
|
+
fromObject(data: Record<string, unknown>): this;
|
|
327
|
+
fromRecords<T extends Record<string, unknown>>(data: T[]): this;
|
|
328
|
+
pick(...keys: string[]): this;
|
|
329
|
+
label(map: Record<string, string>): this;
|
|
330
|
+
round(decimals: number): this;
|
|
331
|
+
transformValues(map: Record<string, (v: unknown) => unknown>): this;
|
|
332
|
+
spanColumn(key: string, span: number): this;
|
|
333
|
+
highlightColumn(key: string, highlight: TableHighlight): this;
|
|
334
|
+
highlightRows(fn: (row: Record<string, unknown>) => TableHighlight | null): this;
|
|
335
|
+
highlightCells(key: string, fn: (value: unknown) => TableHighlight | null): this;
|
|
336
|
+
appendRow(cells: unknown[], highlight?: TableHighlight): this;
|
|
337
|
+
summary(stats: TableSummaryStat[]): this;
|
|
338
|
+
build(): TableData & {
|
|
339
|
+
rows: unknown[][];
|
|
340
|
+
};
|
|
341
|
+
buildSection(): TableSection;
|
|
342
|
+
private _build;
|
|
343
|
+
private _resolveLabel;
|
|
344
|
+
private _resolveColumn;
|
|
345
|
+
private _mergeRowHighlights;
|
|
346
|
+
private _buildRowHighlights;
|
|
347
|
+
private _buildFromObject;
|
|
348
|
+
private _buildFromRecords;
|
|
349
|
+
}
|
|
350
|
+
declare function table(title?: string): TableBuilder;
|
|
351
|
+
declare function tableFromObject({ title, data }: {
|
|
352
|
+
title?: string;
|
|
353
|
+
data: Record<string, unknown>;
|
|
354
|
+
}): TableData & {
|
|
355
|
+
rows: unknown[][];
|
|
356
|
+
};
|
|
357
|
+
declare function tableFromRecords<T extends Record<string, unknown>>({ title, data }: {
|
|
358
|
+
title?: string;
|
|
359
|
+
data: T[];
|
|
360
|
+
}): TableData & {
|
|
361
|
+
rows: unknown[][];
|
|
362
|
+
};
|
|
363
|
+
declare function tableSections({ title, columns, sections }: {
|
|
364
|
+
title?: string;
|
|
365
|
+
columns?: TableColumn[];
|
|
366
|
+
sections: [TableSection | TableBuilder, ...(TableSection | TableBuilder)[]];
|
|
367
|
+
}): TableData & {
|
|
368
|
+
sections: [TableSection, ...TableSection[]];
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
declare class ChartBuilder {
|
|
372
|
+
private _title?;
|
|
373
|
+
private _type;
|
|
374
|
+
private _labels;
|
|
375
|
+
private _series;
|
|
376
|
+
private _referenceLines;
|
|
377
|
+
constructor(type: ChartType, title?: string);
|
|
378
|
+
labels(labels: string[]): this;
|
|
379
|
+
series(name: string, data: number[]): this;
|
|
380
|
+
series(data: number[]): this;
|
|
381
|
+
fromRecords<T extends Record<string, unknown>>(data: T[], labelKey: keyof T, seriesKeys: (keyof T)[]): this;
|
|
382
|
+
referenceLine(value: number, label?: string): this;
|
|
383
|
+
build(): ChartData;
|
|
384
|
+
private _build;
|
|
385
|
+
}
|
|
386
|
+
declare function chart(type: ChartType, title?: string): ChartBuilder;
|
|
387
|
+
declare function chartFromRecords<T extends Record<string, unknown>>({ type, title, data, labelKey, seriesKeys }: {
|
|
388
|
+
type: ChartType;
|
|
389
|
+
title?: string;
|
|
390
|
+
data: T[];
|
|
391
|
+
labelKey: keyof T;
|
|
392
|
+
seriesKeys: (keyof T)[];
|
|
393
|
+
}): ChartData;
|
|
394
|
+
|
|
395
|
+
declare function init(options?: RecountOptions): void;
|
|
396
|
+
declare function startTrace<T>(name: string, fn: () => Promise<T>): Promise<T>;
|
|
397
|
+
declare function startTrace<T>(name: string, options: TraceOptions, fn: () => Promise<T>): Promise<T>;
|
|
398
|
+
declare function addSpan(type: 'table', name: string, opts?: TableSpanOptions): void;
|
|
399
|
+
declare function addSpan(type: 'chart', name: string, opts?: ChartSpanOptions): void;
|
|
400
|
+
declare function addSpan(type: 'http', name: string, opts?: HttpSpanOptions): void;
|
|
401
|
+
declare function addSpan(type: 'llm', name: string, opts?: LlmSpanOptions): void;
|
|
402
|
+
declare function addSpan(type: 'image', name: string, opts?: ImageSpanOptions): void;
|
|
403
|
+
declare function addSpan(type: 'db', name: string, opts?: DbSpanOptions): void;
|
|
404
|
+
declare function addSpan(type: 'json', name: string, opts?: JsonSpanOptions): void;
|
|
405
|
+
declare function addSpan(type: 'message', name: string, opts?: MessageSpanOptions & {
|
|
406
|
+
text?: string;
|
|
407
|
+
}): void;
|
|
408
|
+
declare function addSpan<T>(type: Exclude<SpanType, 'group'>, name: string, fn: () => Promise<T>): Promise<T>;
|
|
409
|
+
declare function addSpan<T>(type: Exclude<SpanType, 'group'>, name: string, opts: SpanOptions, fn: () => Promise<T>): Promise<T>;
|
|
410
|
+
declare function addGroup(name: string, builder: (g: SpanGroup) => void, options?: GroupSpanOptions): void;
|
|
411
|
+
declare function addMessage(name: string, text: string, opts?: MessageSpanOptions): void;
|
|
412
|
+
declare function named<T>(name: string, fn: () => Promise<T>): Promise<T>;
|
|
413
|
+
declare function addMetadata(data: Metadata): void;
|
|
414
|
+
declare function fetch<T = unknown>(name: string, url: string | URL, init?: RequestInit, options?: {
|
|
415
|
+
redact?: string[];
|
|
416
|
+
}): Promise<T | null>;
|
|
417
|
+
declare const recount: {
|
|
418
|
+
init: typeof init;
|
|
419
|
+
Recount: typeof Recount;
|
|
420
|
+
RecountError: typeof RecountError;
|
|
421
|
+
startTrace: typeof startTrace;
|
|
422
|
+
named: typeof named;
|
|
423
|
+
addSpan: typeof addSpan;
|
|
424
|
+
addGroup: typeof addGroup;
|
|
425
|
+
addMessage: typeof addMessage;
|
|
426
|
+
addMetadata: typeof addMetadata;
|
|
427
|
+
fetch: typeof fetch;
|
|
428
|
+
table: typeof table;
|
|
429
|
+
tableFromObject: typeof tableFromObject;
|
|
430
|
+
tableFromRecords: typeof tableFromRecords;
|
|
431
|
+
tableSections: typeof tableSections;
|
|
432
|
+
spanCell: typeof spanCell;
|
|
433
|
+
chart: typeof chart;
|
|
434
|
+
chartFromRecords: typeof chartFromRecords;
|
|
435
|
+
REDACTED: {
|
|
436
|
+
readonly __redacted: true;
|
|
437
|
+
};
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
export { type ChartData, type ChartReferenceLine, type ChartSeries, type ChartSpanOptions, type ChartType, type DbParamValue, type DbSpanMetadata, type DbSpanOptions, type GroupSpanOptions, type HttpContentType, type HttpMethod, type HttpRequestInput, type HttpResponseOutput, type HttpSpanOptions, type ImageSpanData, type ImageSpanOptions, type IngestPayload, type IngestResult, type JsonObject, type JsonSpanOptions, type LlmMessage, type LlmSpanInput, type LlmSpanOptions, type LlmSpanOutput, type MessageSpanLevel, type MessageSpanOptions, type Metadata, Recount, RecountError, type RecountOptions, type RetentionPeriod, type Span, type SpanAlert, type SpanAlertCheck, type SpanBaseOptions, SpanGroup, type SpanOptions, type SpanType, type TableCellSpan, type TableColumn, type TableData, type TableDataFlat, type TableHighlight, type TableSection, type TableSpanOptions, type TableSummaryStat, type TraceOptions, recount as default };
|