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

Function applyServerPrefix

packages/telemetry/src/transport.ts:243–249  ·  view source on GitHub ↗
(event: EnrichedTelemetryEvent)

Source from the content-addressed store, hash-verified

241}
242
243export function applyServerPrefix(event: EnrichedTelemetryEvent): EnrichedTelemetryEvent {
244 const name: unknown = event.event;
245 if (typeof name !== 'string' || name.length === 0 || name.startsWith(SERVER_EVENT_PREFIX)) {
246 return event;
247 }
248 return { ...event, event: SERVER_EVENT_PREFIX + name };
249}
250
251export function flattenEvent(event: EnrichedTelemetryEvent): Record<string, TelemetryPrimitive> {
252 const out: Record<string, TelemetryPrimitive> = {};

Callers 2

telemetry.test.tsFile · 0.90
buildPayloadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected