landing.tsx 3.7 KB

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