index.tsx 599 B

1234567891011121314151617181920212223
  1. import {Project} from 'sentry/types';
  2. import useOrganization from 'sentry/utils/useOrganization';
  3. import ServerSideSampling from '../server-side-sampling';
  4. import {DynamicSampling} from './dynamicSampling';
  5. type Props = {
  6. project: Project;
  7. };
  8. export default function DynamicSamplingContainer({project}: Props) {
  9. const organization = useOrganization();
  10. if (
  11. organization.features.includes('server-side-sampling') &&
  12. organization.features.includes('dynamic-sampling')
  13. ) {
  14. return <DynamicSampling project={project} />;
  15. }
  16. return <ServerSideSampling project={project} />;
  17. }