landing.tsx 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 {useModuleBreadcrumbs} from 'sentry/views/performance/utils/useModuleBreadcrumbs';
  29. export function LLMMonitoringPage() {
  30. const organization = useOrganization();
  31. const crumbs = useModuleBreadcrumbs('ai');
  32. return (
  33. <Layout.Page>
  34. <NoProjectMessage organization={organization}>
  35. <Layout.Header>
  36. <Layout.HeaderContent>
  37. <Breadcrumbs crumbs={crumbs} />
  38. <Layout.Title>
  39. {MODULE_TITLE}
  40. <PageHeadingQuestionTooltip
  41. title={t('View analytics and information about your AI pipelines')}
  42. docsUrl={MODULE_DOC_LINK}
  43. />
  44. <FeatureBadge type={RELEASE_LEVEL} />
  45. </Layout.Title>
  46. </Layout.HeaderContent>
  47. </Layout.Header>
  48. <Layout.Body>
  49. <Layout.Main fullWidth>
  50. <ModuleLayout.Layout>
  51. <ModuleLayout.Full>
  52. <PageFilterBar condensed>
  53. <ProjectPageFilter />
  54. <EnvironmentPageFilter />
  55. <DatePageFilter />
  56. </PageFilterBar>
  57. </ModuleLayout.Full>
  58. <ModulesOnboarding
  59. moduleQueryFilter={new MutableSearch('span.op:ai.pipeline*')}
  60. onboardingContent={
  61. <OnboardingContent
  62. title={t('Get actionable insights about your LLMs')}
  63. description={t('Send your first AI pipeline to see data here.')}
  64. link={MODULE_DOC_LINK}
  65. />
  66. }
  67. referrer="api.ai-pipelines.view"
  68. >
  69. <ModuleLayout.Third>
  70. <TotalTokensUsedChart />
  71. </ModuleLayout.Third>
  72. <ModuleLayout.Third>
  73. <NumberOfPipelinesChart />
  74. </ModuleLayout.Third>
  75. <ModuleLayout.Third>
  76. <PipelineDurationChart />
  77. </ModuleLayout.Third>
  78. <ModuleLayout.Full>
  79. <PipelinesTable />
  80. </ModuleLayout.Full>
  81. </ModulesOnboarding>
  82. </ModuleLayout.Layout>
  83. </Layout.Main>
  84. </Layout.Body>
  85. </NoProjectMessage>
  86. </Layout.Page>
  87. );
  88. }
  89. function PageWithProviders() {
  90. return (
  91. <ModulePageProviders moduleName="ai" features="ai-analytics">
  92. <LLMMonitoringPage />
  93. </ModulePageProviders>
  94. );
  95. }
  96. export default PageWithProviders;