: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 { combineUrl } from 'kea-router'
import { FEATURE_FLAGS } from 'lib/constants'
import { urls } from 'scenes/urls'
import { ProductItemCategory, ProductKey } from '~/queries/schema/schema-general'
import { FileSystemIconColor, ProductManifest } from '~/types'
import type { TracingSceneTab } from './frontend/tracingSceneLogic'
export const manifest: ProductManifest = {
name: 'Tracing',
scenes: {
Tracing: {
name: 'Tracing',
import: () => import('./frontend/TracingScene'),
projectBased: true,
layout: 'app-container',
activityScope: 'Tracing',
description: 'Monitor and analyze distributed traces to understand service performance and debug issues.',
iconType: 'tracing',
docsHref: 'https://posthog.com/docs/distributed-tracing',
},
TracingOperation: {
name: 'Operation',
import: () => import('./frontend/TracingOperationScene'),
projectBased: true,
layout: 'app-container',
activityScope: 'Tracing',
description: 'Latency distribution and sample traces for a single operation.',
iconType: 'tracing',
},
TracingRetentionNew: {
name: 'New retention rule',
import: () => import('./frontend/scenes/TracingRetentionNewScene/TracingRetentionNewScene'),
projectBased: true,
layout: 'app-container',
activityScope: 'Tracing',
iconType: 'tracing',
},
TracingRetentionDetail: {
name: 'Retention rule',
import: () => import('./frontend/scenes/TracingRetentionDetailScene/TracingRetentionDetailScene'),
projectBased: true,
layout: 'app-container',
activityScope: 'Tracing',
iconType: 'tracing',
},
},
routes: {
'/tracing': ['Tracing', 'tracing'],
'/tracing/operation': ['TracingOperation', 'tracingOperation'],
'/tracing/retention-rules/new': ['TracingRetentionNew', 'tracingRetentionNew'],
'/tracing/retention-rules/:id': ['TracingRetentionDetail', 'tracingRetentionDetail'],
},
redirects: {},
urls: {
tracing: (tab?: TracingSceneTab): string => (tab ? `/tracing?tab=${tab}` : '/tracing'),
// Query params rather than path segments: span names ("GET /api/stats") contain slashes
// and arbitrary characters that break path routing.
tracingOperation: (
serviceName: string,
spanName: string,
dateRange?: { date_from?: string | null; date_to?: string | null }
): string =>
combineUrl('/tracing/operation', {
service: serviceName,
name: spanName,
...(dateRange ? { dateRange: JSON.stringify(dateRange) } : {}),
}).url,
tracingRetentionNew: (): string => '/tracing/retention-rules/new',
tracingRetentionDetail: (id: string): string => `/tracing/retention-rules/${id}`,
},
fileSystemTypes: {},
treeItemsNew: [],
treeItemsProducts: [
{
path: 'Tracing',
intents: [ProductKey.TRACING],
category: ProductItemCategory.MONITORING,
iconType: 'tracing',
iconColor: [
'var(--color-product-tracing-light)',
'var(--color-product-tracing-dark)',
] as FileSystemIconColor,
href: urls.tracing(),
searchKeywords: ['traces', 'distributed tracing', 'apm', 'spans', 'latency'],
searchTabs: [{ name: 'SQL', href: urls.tracing('sql'), flag: FEATURE_FLAGS.TRACING_SCENE_TABS }],
flag: FEATURE_FLAGS.TRACING,
sceneKey: 'Tracing',
},
],
}