feat(stage-shared): add types for IO tracing
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
export * from './env-vars'
|
export * from './env-vars'
|
||||||
export * from './environment'
|
export * from './environment'
|
||||||
export * from './export-csv'
|
export * from './export-csv'
|
||||||
|
export * from './perf/io-trace'
|
||||||
export * from './perf/tracer'
|
export * from './perf/tracer'
|
||||||
export * from './url'
|
export * from './url'
|
||||||
export * from './window'
|
export * from './window'
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
export const IOSubsystems = {
|
||||||
|
ASR: 'asr',
|
||||||
|
LLM: 'llm',
|
||||||
|
TTSChunking: 'tts-chunking',
|
||||||
|
TTSSynthesis: 'tts-synthesis',
|
||||||
|
Playback: 'playback',
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type IOSubsystem = (typeof IOSubsystems)[keyof typeof IOSubsystems]
|
||||||
|
|
||||||
|
export interface IOSpan {
|
||||||
|
id: string
|
||||||
|
traceId: string
|
||||||
|
parentSpanId?: string
|
||||||
|
startTs: number
|
||||||
|
endTs?: number
|
||||||
|
|
||||||
|
ttsCorrelationId?: string
|
||||||
|
subsystem: IOSubsystem
|
||||||
|
name: string
|
||||||
|
meta: Record<string, any>
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IOTurn {
|
||||||
|
id: string
|
||||||
|
startTs: number
|
||||||
|
endTs?: number
|
||||||
|
inputText?: string
|
||||||
|
outputText?: string
|
||||||
|
spans: IOSpan[]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user