: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 { urls } from 'scenes/urls'
import { DataModelingNode } from '~/types'
type NodeDetailTab = Parameters<typeof urls.nodeDetail>[1]
/** Where clicking a lineage node takes you: a metric to its catalog page, anything else to its node. */
export function lineageNodeUrl(node: Pick<DataModelingNode, 'id' | 'name' | 'type'>, tab?: NodeDetailTab): string {
if (node.type === 'metric') {
return urls.dataCatalogMetric(node.name)
}
return urls.nodeDetail(node.id, tab)
}