MCPcopy Create free account
hub / github.com/Noumena-Network/code / logEventTo1P

Function logEventTo1P

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

Source from the content-addressed store, hash-verified

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