MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / emitTelemetry

Method emitTelemetry

packages/acp-adapter/src/session.ts:1361–1372  ·  view source on GitHub ↗

* Fire-and-forget telemetry emitter that guards a missing or * throwing `track` sink. Mirrors the Phase 11.2 pattern in * `server.ts:trackSessionStarted` — telemetry must never crash a * reverse-RPC handler.

(event: string, properties?: Record<string, unknown>)

Source from the content-addressed store, hash-verified

1359 * reverse-RPC handler.
1360 */
1361 private emitTelemetry(event: string, properties?: Record<string, unknown>): void {
1362 if (typeof this.track !== 'function') return;
1363 try {
1364 this.track(event, properties);
1365 } catch (err) {
1366 log.warn('acp: telemetry track failed', {
1367 sessionId: this.id,
1368 event,
1369 error: err instanceof Error ? err.message : String(err),
1370 });
1371 }
1372 }
1373}
1374
1375/**

Callers 3

promptMethod · 0.95
handleApprovalMethod · 0.95
handleQuestionMethod · 0.95

Calls 2

trackMethod · 0.65
warnMethod · 0.65

Tested by

no test coverage detected