MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getSamplingKey

Function getSamplingKey

common/src/util/analytics-sampling.ts:129–141  ·  view source on GitHub ↗
(params: {
  event: AnalyticsEvent
  distinctId?: string
  properties?: AnalyticsProperties
})

Source from the content-addressed store, hash-verified

127}
128
129function getSamplingKey(params: {
130 event: AnalyticsEvent
131 distinctId?: string
132 properties?: AnalyticsProperties
133}): string {
134 return (
135 params.distinctId ??
136 getPropertyUserId(params.properties) ??
137 getStringProperty(params.properties, 'clientSessionId') ??
138 getStringProperty(params.properties, 'userInputId') ??
139 params.event
140 )
141}
142
143export function shouldTrackAnalyticsEvent(params: {
144 event: AnalyticsEvent

Callers 1

Calls 2

getPropertyUserIdFunction · 0.85
getStringPropertyFunction · 0.85

Tested by

no test coverage detected