Skip to content

Commit d8a3a7c

Browse files
Fix CI build and ingestion typing
1 parent 3202c0a commit d8a3a7c

4 files changed

Lines changed: 11 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,6 @@ jobs:
3737

3838
- name: Run tests
3939
run: pnpm test
40+
41+
- name: Run build
42+
run: pnpm build

apps/cli/src/commands/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
print,
1919
stringFlag,
2020
} from "../cli-support.js";
21-
import { devSdkEnvironment } from "../dev-env.js";
21+
import { devSdkEnvironment, type EnvVar } from "../dev-env.js";
2222

2323
export async function handleEnvironmentCommand(
2424
action: string | undefined,

packages/core/src/otel.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ type ObservationEventType = Exclude<
2020
IngestionEvent["type"],
2121
typeof eventTypes.TRACE_CREATE | typeof eventTypes.SCORE_CREATE
2222
>;
23+
type TraceCreateBody = Extract<
24+
IngestionEvent,
25+
{ type: typeof eventTypes.TRACE_CREATE }
26+
>["body"];
2327

2428
export async function otelBodyToEvents(params: {
2529
body: unknown;
@@ -276,7 +280,7 @@ function createTraceEvent(params: {
276280
isRootSpan,
277281
hasTraceUpdates,
278282
} = params;
279-
let body: Record<string, unknown> = {
283+
let body: TraceCreateBody = {
280284
id: traceId,
281285
timestamp,
282286
environment: stringValue(attributes["langfuse.environment"]) ?? "default",

packages/ingest/src/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ export type IngestionSink = {
3232
projectId: string;
3333
prefix: string;
3434
events: IngestionEvent[];
35-
}) => Promise<void>;
35+
}) => Promise<unknown>;
3636
writeOtelResourceSpans: (params: {
3737
projectId: string;
3838
prefix: string;
3939
resourceSpans: unknown[];
40-
}) => Promise<void>;
40+
}) => Promise<unknown>;
4141
};
4242

4343
export function buildServer(options: BuildServerOptions = {}): FastifyInstance {

0 commit comments

Comments
 (0)