landing.tsx 3.7 KB

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