MCPcopy Create free account
hub / github.com/anus-dev/ANUS / logLoopDetected

Function logLoopDetected

packages/core/src/telemetry/loggers.ts:304–322  ·  view source on GitHub ↗
(
  config: Config,
  event: LoopDetectedEvent,
)

Source from the content-addressed store, hash-verified

302}
303
304export 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
324export function logNextSpeakerCheck(
325 config: Config,

Callers 3

checkToolCallLoopMethod · 0.85
checkForLoopWithLLMMethod · 0.85

Calls 4

logLoopDetectedEventMethod · 0.80
getCommonAttributesFunction · 0.70
getInstanceMethod · 0.45

Tested by

no test coverage detected