The best way to control Claude Code, Codex and more from any computer or phone

main
ts 30 lines 846 Bytes
Raw
1 // Alchemy modifications are licensed under Apache-2.0.
2 // This file includes third-party code; see /THIRD_PARTY_LICENSES.md.
3 import type { JaegerTracing, Span } from "./types.ts";
4
5 export function mockJaegerBindingSpan(): Span {
6 return {
7 addLogs: () => {},
8 setTags: () => {},
9 end: () => {},
10 isRecording: true,
11 };
12 }
13
14 export function mockJaegerBinding(): JaegerTracing {
15 return {
16 enterSpan: (_, span, ...args) => span(mockJaegerBindingSpan(), ...args),
17 getSpanContext: () => ({
18 traceId: "test-trace",
19 spanId: "test-span",
20 parentSpanId: "test-parent-span",
21 traceFlags: 0,
22 }),
23 runWithSpanContext: (_, callback, ...args) => callback(...args),
24
25 traceId: "test-trace",
26 spanId: "test-span",
27 parentSpanId: "test-parent-span",
28 cfTraceIdHeader: "test-trace:test-span:0",
29 };
30 }