Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/full-cars-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"braintrust": minor
---

feat: Export `LocalTrace`
10 changes: 9 additions & 1 deletion js/smoke/shared/src/suites/import-verification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export interface BraintrustModule {
traced?: unknown;
traceable?: unknown;
wrapTraced?: unknown;
LocalTrace?: unknown;
updateSpan?: unknown;
withCurrent?: unknown;

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

assertDefined(module.LocalTrace, "LocalTrace must exist");
assertType(
module.LocalTrace,
"function",
"LocalTrace must be a function/class",
);

assertDefined(module.updateSpan, "updateSpan must exist");
assertType(module.updateSpan, "function", "updateSpan must be a function");

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

return "Tracing exports verified (5 exports)";
return "Tracing exports verified (6 exports)";
},
);

Expand Down
2 changes: 1 addition & 1 deletion js/src/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export {
} from "./prompt-schemas";

export type { Trace, SpanData, GetThreadOptions } from "./trace";
export { SpanFetcher, CachedSpanFetcher } from "./trace";
export { SpanFetcher, CachedSpanFetcher, LocalTrace } from "./trace";

export type {
ParentExperimentIds,
Expand Down
Loading