: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
import { usesRawSessionIdentifiers } from '~/ingestion/pipelines/sessionreplay/ml-mirror/session-identifier-format'
import { CleartextKeyStore } from '~/ingestion/pipelines/sessionreplay/shared/keystore/cleartext-keystore'
import { SessionKey } from '~/ingestion/pipelines/sessionreplay/shared/types'
export class LegacyMlKeyStore extends CleartextKeyStore {
public override getKey(sessionId: string, teamId: number): Promise<SessionKey> {
if (usesRawSessionIdentifiers(sessionId)) {
throw new Error('ML v2 ingestion requires key manager configuration')
}
return super.getKey(sessionId, teamId)
}
public override generateKey(sessionId: string, teamId: number): Promise<SessionKey> {
return this.getKey(sessionId, teamId)
}
}