Public declaration syntax from forge-ts/packages/forge-core/src/telemetry.ts Original source SHA-256: 730d3f938c8e5d8d2a23c3ea536d3eccde6913c1c30fed24b2a955b77327b976 Function bodies and constant values are omitted. This is not the complete implementation. Source line 19 export const SpanStatus /* type inferred in source */; Source line 29 export type SpanStatusType = (typeof SpanStatus)[keyof typeof SpanStatus]; Source line 32 export type SpanAttribute = string | number | boolean; Source line 47 export class ForgeSpan { readonly name: string; readonly startTime: Timestamp; endTime: Timestamp | null; readonly attributes: Map; status: SpanStatusType; statusMessage: string | null; parentId: string | null; readonly spanId: string; constructor(name: string); setAttribute(key: string, value: SpanAttribute): void; end(): void; endWithError(message: string): void; withParent(parentId: string): this; } Source line 128 export class ForgeEvent { readonly name: string; readonly timestamp: Timestamp; readonly attributes: Map; constructor(name: string); setAttribute(key: string, value: SpanAttribute): void; } Source line 171 export interface TelemetryEmitter { /** Emits a completed span. */ emitSpan(span: ForgeSpan): void; /** Emits an event. */ emitEvent(event: ForgeEvent): void; } Source line 183 export class NoopEmitter implements TelemetryEmitter { emitSpan(_span: ForgeSpan): void; emitEvent(_event: ForgeEvent): void; } Source line 204 export class RecordingEmitter implements TelemetryEmitter { readonly spans: ForgeSpan[]; readonly events: ForgeEvent[]; emitSpan(span: ForgeSpan): void; emitEvent(event: ForgeEvent): void; }