MCPcopy Index your code
hub / github.com/codeaashu/claude-code / logEventTo1P

Function logEventTo1P

src/services/analytics/firstPartyEventLogger.ts:216–230  ·  view source on GitHub ↗
(
  eventName: string,
  metadata: Record<string, number | boolean | undefined> = {},
)

Source from the content-addressed store, hash-verified

214 * @param metadata - Additional metadata for the event (intentionally no strings, to avoid accidentally logging code/filepaths)
215 */
216export function logEventTo1P(
217 eventName: string,
218 metadata: Record<string, number | boolean | undefined> = {},
219): void {
220 if (!is1PEventLoggingEnabled()) {
221 return
222 }
223
224 if (!firstPartyEventLogger || isSinkKilled('firstParty')) {
225 return
226 }
227
228 // Fire and forget - don't block on metadata enrichment
229 void logEventTo1PAsync(firstPartyEventLogger, eventName, metadata)
230}
231
232/**
233 * GrowthBook experiment event data for logging

Callers 2

FeedbackFunction · 0.85
logEventImplFunction · 0.85

Calls 3

is1PEventLoggingEnabledFunction · 0.85
isSinkKilledFunction · 0.85
logEventTo1PAsyncFunction · 0.85

Tested by

no test coverage detected