: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 { LemonBanner } from '@posthog/lemon-ui'
import { Link } from 'lib/lemon-ui/Link'
import { LogsViewer } from '../logs/LogsViewer'
import { renderHogFunctionMessage } from '../logs/renderHogFunctionMessage'
// Transformations run in the ingestion pipeline, not on a cyclotron worker, so they never write to
// `hog_invocation_results`. The standard invocations table would always be empty for them. They do
// write log lines to `log_entries` (source `hog_function`, keyed by function id), so surface those
// here grouped per run, and point at Metrics for success and failure counts.
export function TransformationInvocations({
id,
onViewMetrics,
}: {
id: string
onViewMetrics: () => void
}): JSX.Element {
return (
<div className="flex flex-col gap-2">
<LemonBanner type="info">
Transformations don't store individual runs like destinations do. Each row below is one run and the log
lines it wrote. For success and failure counts, open the <Link onClick={onViewMetrics}>Metrics</Link>{' '}
tab.
</LemonBanner>
<LogsViewer
sourceType="hog_function"
sourceId={id}
renderMessage={(message) => renderHogFunctionMessage(message)}
/>
</div>
)
}