: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 { urls } from 'scenes/urls'
import type { TraceAiEvent } from '../../aiEventSpans'
export interface TraceAiEventsCapNoticeProps {
aiEvents: TraceAiEvent[]
hasMore: boolean
limit: number
}
export function TraceAiEventsCapNotice({ aiEvents, hasMore, limit }: TraceAiEventsCapNoticeProps): JSX.Element | null {
if (!hasMore || aiEvents.length === 0) {
return null
}
return (
<LemonBanner
type="info"
className="mb-2"
action={{
children: 'View all in AI observability',
to: urls.aiObservabilityTrace(aiEvents[0].ai_trace_id),
targetBlank: true,
'data-attr': 'tracing-ai-events-view-all',
}}
>
This trace has more than {limit} AI events. The waterfall shows the first {limit}.
</LemonBanner>
)
}