mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-10-30 14:49:14 +00:00
39 lines
1.0 KiB
TypeScript
39 lines
1.0 KiB
TypeScript
import Feature from 'sentry/components/acl/feature';
|
|
import FeatureDisabled from 'sentry/components/acl/featureDisabled';
|
|
import {useReplayContext} from 'sentry/components/replays/replayContext';
|
|
import {t} from 'sentry/locale';
|
|
import useOrganization from 'sentry/utils/useOrganization';
|
|
import Trace from 'sentry/views/replays/detail/trace/trace';
|
|
|
|
const features = ['organizations:performance-view'];
|
|
|
|
function PerfDisabled() {
|
|
return (
|
|
<FeatureDisabled
|
|
featureName={t('Performance Monitoring')}
|
|
features={features}
|
|
hideHelpToggle
|
|
message={t('Requires performance monitoring.')}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function TraceFeature() {
|
|
const organization = useOrganization();
|
|
const {replay} = useReplayContext();
|
|
const replayRecord = replay?.getReplay();
|
|
|
|
return (
|
|
<Feature
|
|
features={features}
|
|
hookName={undefined}
|
|
organization={organization}
|
|
renderDisabled={PerfDisabled}
|
|
>
|
|
<Trace replayRecord={replayRecord} />
|
|
</Feature>
|
|
);
|
|
}
|
|
|
|
export default TraceFeature;
|