( config: Config, event: LoopDetectedEvent, )
| 302 | } |
| 303 | |
| 304 | export function logLoopDetected( |
| 305 | config: Config, |
| 306 | event: LoopDetectedEvent, |
| 307 | ): void { |
| 308 | ClearcutLogger.getInstance(config)?.logLoopDetectedEvent(event); |
| 309 | if (!isTelemetrySdkInitialized()) return; |
| 310 | |
| 311 | const attributes: LogAttributes = { |
| 312 | ...getCommonAttributes(config), |
| 313 | ...event, |
| 314 | }; |
| 315 | |
| 316 | const logger = logs.getLogger(SERVICE_NAME); |
| 317 | const logRecord: LogRecord = { |
| 318 | body: `Loop detected. Type: ${event.loop_type}.`, |
| 319 | attributes, |
| 320 | }; |
| 321 | logger.emit(logRecord); |
| 322 | } |
| 323 | |
| 324 | export function logNextSpeakerCheck( |
| 325 | config: Config, |
no test coverage detected