Skip to content

Commit

Permalink
feat(self-hosted): Disable setup button for sessions for errors only …
Browse files Browse the repository at this point in the history
…self hosted (#72827)

Release health sessions is a feature only available with the metrics
backend. This will not be available for a stripped down version of
self-hosted, since it requires infrastructure that will be removed.
<img width="538" alt="Screenshot 2024-06-14 at 3 36 56 PM"
src="https://github.com/getsentry/sentry/assets/25517925/8e2a729c-c636-4d2b-9d32-bd5e59cd27f1">
<img width="860" alt="Screenshot 2024-06-14 at 3 37 02 PM"
src="https://github.com/getsentry/sentry/assets/25517925/4db35cf6-248e-4c64-9718-223918a071e7">
  • Loading branch information
hubertdeng123 committed Jun 21, 2024
1 parent 3819177 commit 758a9df
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import ButtonBar from 'sentry/components/buttonBar';
import FeatureTourModal from 'sentry/components/modals/featureTourModal';
import {releaseHealth} from 'sentry/data/platformCategories';
import {t} from 'sentry/locale';
import ConfigStore from 'sentry/stores/configStore';
import type {Organization} from 'sentry/types/organization';
import type {PlatformKey} from 'sentry/types/project';
import {trackAnalytics} from 'sentry/utils/analytics';
Expand Down Expand Up @@ -37,7 +38,12 @@ function MissingReleasesButtons({organization, health, projectId, platform}: Pro
});
}

const setupDisabled = health && platform && !releaseHealth.includes(platform);
const isSelfHostedErrorsOnly = ConfigStore.get('isSelfHostedErrorsOnly');
const setupDisabled =
(health && platform && !releaseHealth.includes(platform)) || isSelfHostedErrorsOnly;
const setupDisabledTooltip = isSelfHostedErrorsOnly
? t('Release health is not available for errors only self-hosted.')
: t('Release Health is not yet supported on this platform.');

return (
<ButtonBar gap={1}>
Expand All @@ -47,11 +53,7 @@ function MissingReleasesButtons({organization, health, projectId, platform}: Pro
external
href={health ? DOCS_HEALTH_URL : DOCS_URL}
disabled={setupDisabled}
title={
setupDisabled
? t('Release Health is not yet supported on this platform.')
: undefined
}
title={setupDisabled ? setupDisabledTooltip : undefined}
>
{t('Start Setup')}
</Button>
Expand Down

0 comments on commit 758a9df

Please sign in to comment.