landing.tsx 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. import FeatureBadge from 'sentry/components/badge/featureBadge';
  2. import {Breadcrumbs} from 'sentry/components/breadcrumbs';
  3. import * as Layout from 'sentry/components/layouts/thirds';
  4. import NoProjectMessage from 'sentry/components/noProjectMessage';
  5. import {DatePageFilter} from 'sentry/components/organizations/datePageFilter';
  6. import {EnvironmentPageFilter} from 'sentry/components/organizations/environmentPageFilter';
  7. import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
  8. import {ProjectPageFilter} from 'sentry/components/organizations/projectPageFilter';
  9. import {PageHeadingQuestionTooltip} from 'sentry/components/pageHeadingQuestionTooltip';
  10. import {t} from 'sentry/locale';
  11. import {MutableSearch} from 'sentry/utils/tokenizeSearch';
  12. import useOrganization from 'sentry/utils/useOrganization';
  13. import {
  14. NumberOfPipelinesChart,
  15. PipelineDurationChart,
  16. TotalTokensUsedChart,
  17. } from 'sentry/views/llmMonitoring/llmMonitoringCharts';
  18. import {PipelinesTable} from 'sentry/views/llmMonitoring/pipelinesTable';
  19. import {
  20. MODULE_DOC_LINK,
  21. MODULE_TITLE,
  22. RELEASE_LEVEL,
  23. } from 'sentry/views/llmMonitoring/settings';
  24. import * as ModuleLayout from 'sentry/views/performance/moduleLayout';
  25. import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders';
  26. import {ModulesOnboarding} from 'sentry/views/performance/onboarding/modulesOnboarding';
  27. import {OnboardingContent} from 'sentry/views/performance/onboarding/onboardingContent';
  28. import {useHasDataTrackAnalytics} from 'sentry/views/performance/utils/analytics/useHasDataTrackAnalytics';
  29. import {useModuleBreadcrumbs} from 'sentry/views/performance/utils/useModuleBreadcrumbs';
  30. export function LLMMonitoringPage() {
  31. const organization = useOrganization();
  32. const crumbs = useModuleBreadcrumbs('ai');
  33. useHasDataTrackAnalytics(
  34. new MutableSearch('span.category:"ai"'),
  35. 'api.performance.ai.llm-monitoring-landing',
  36. 'insight.page_loads.ai'
  37. );
  38. return (
  39. <Layout.Page>
  40. <NoProjectMessage organization={organization}>
  41. <Layout.Header>
  42. <Layout.HeaderContent>
  43. <Breadcrumbs crumbs={crumbs} />
  44. <Layout.Title>
  45. {MODULE_TITLE}
  46. <PageHeadingQuestionTooltip
  47. title={t('View analytics and information about your AI pipelines')}
  48. docsUrl={MODULE_DOC_LINK}
  49. />
  50. <FeatureBadge type={RELEASE_LEVEL} />
  51. </Layout.Title>
  52. </Layout.HeaderContent>
  53. </Layout.Header>
  54. <Layout.Body>
  55. <Layout.Main fullWidth>
  56. <ModuleLayout.Layout>
  57. <ModuleLayout.Full>
  58. <PageFilterBar condensed>
  59. <ProjectPageFilter />
  60. <EnvironmentPageFilter />
  61. <DatePageFilter />
  62. </PageFilterBar>
  63. </ModuleLayout.Full>
  64. <ModulesOnboarding
  65. moduleQueryFilter={new MutableSearch('span.op:ai.pipeline*')}
  66. onboardingContent={
  67. <OnboardingContent
  68. title={t('Get actionable insights about your LLMs')}
  69. description={t('Send your first AI pipeline to see data here.')}
  70. link={MODULE_DOC_LINK}
  71. />
  72. }
  73. referrer="api.ai-pipelines.view"
  74. >
  75. <ModuleLayout.Third>
  76. <TotalTokensUsedChart />
  77. </ModuleLayout.Third>
  78. <ModuleLayout.Third>
  79. <NumberOfPipelinesChart />
  80. </ModuleLayout.Third>
  81. <ModuleLayout.Third>
  82. <PipelineDurationChart />
  83. </ModuleLayout.Third>
  84. <ModuleLayout.Full>
  85. <PipelinesTable />
  86. </ModuleLayout.Full>
  87. </ModulesOnboarding>
  88. </ModuleLayout.Layout>
  89. </Layout.Main>
  90. </Layout.Body>
  91. </NoProjectMessage>
  92. </Layout.Page>
  93. );
  94. }
  95. function PageWithProviders() {
  96. return (
  97. <ModulePageProviders moduleName="ai" features="insights-addon-modules">
  98. <LLMMonitoringPage />
  99. </ModulePageProviders>
  100. );
  101. }
  102. export default PageWithProviders;