Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

958 B
Raw Blame
import { groupUpdateVersionMismatchCounter } from '~/common/utils/db/metrics'
import { logger } from '~/common/utils/logger'
import { GroupTypeIndex, TeamId } from '~/types'

export function logVersionMismatch(
    teamId: TeamId,
    groupTypeIndex: GroupTypeIndex,
    groupKey: string,
    versionDisparity: number
): void {
    logger.warn('👥', 'Group update version mismatch', {
        team_id: teamId,
        group_type_index: groupTypeIndex,
        group_key: groupKey,
        version_disparity: versionDisparity,
    })
    groupUpdateVersionMismatchCounter.labels({ type: 'version_mismatch' }).inc()
}

export function logMissingRow(teamId: TeamId, groupTypeIndex: GroupTypeIndex, groupKey: string): void {
    logger.warn('👥', 'Group update row missing', {
        team_id: teamId,
        group_type_index: groupTypeIndex,
        group_key: groupKey,
    })
    groupUpdateVersionMismatchCounter.labels({ type: 'row_missing' }).inc()
}