Skip to content

Commit d75e273

Browse files
committed
feat: Export LocalTrace
1 parent 322cccd commit d75e273

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

.changeset/full-cars-lick.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"braintrust": minor
3+
---
4+
5+
feat: Export `LocalTrace`

js/smoke/shared/src/suites/import-verification.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export interface BraintrustModule {
6363
traced?: unknown;
6464
traceable?: unknown;
6565
wrapTraced?: unknown;
66+
LocalTrace?: unknown;
6667
updateSpan?: unknown;
6768
withCurrent?: unknown;
6869

@@ -266,6 +267,13 @@ export const testTracingExports = register(
266267
assertDefined(module.wrapTraced, "wrapTraced must exist");
267268
assertType(module.wrapTraced, "function", "wrapTraced must be a function");
268269

270+
assertDefined(module.LocalTrace, "LocalTrace must exist");
271+
assertType(
272+
module.LocalTrace,
273+
"function",
274+
"LocalTrace must be a function/class",
275+
);
276+
269277
assertDefined(module.updateSpan, "updateSpan must exist");
270278
assertType(module.updateSpan, "function", "updateSpan must be a function");
271279

@@ -276,7 +284,7 @@ export const testTracingExports = register(
276284
"withCurrent must be a function",
277285
);
278286

279-
return "Tracing exports verified (5 exports)";
287+
return "Tracing exports verified (6 exports)";
280288
},
281289
);
282290

js/src/exports.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ export {
261261
} from "./prompt-schemas";
262262

263263
export type { Trace, SpanData, GetThreadOptions } from "./trace";
264-
export { SpanFetcher, CachedSpanFetcher } from "./trace";
264+
export { SpanFetcher, CachedSpanFetcher, LocalTrace } from "./trace";
265265

266266
export type {
267267
ParentExperimentIds,

0 commit comments

Comments
 (0)