Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: use new onboarding component #75345

Merged
merged 10 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import type React from 'react';
import {Fragment} from 'react';

import {
type StepProps,
TabbedCodeSnippet,
} from 'sentry/components/onboarding/gettingStartedDoc/step';
import type {DocsParams} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {t, tct} from 'sentry/locale';

export function getProfilingDocumentHeaderConfigurationStep(): StepProps {
return {
title: 'Add Document-Policy: js-profiling header',
description: (
<Fragment>
<p>
{tct(
`For the JavaScript browser profiler to start, the document response header needs
to include a Document-Policy header key with the js-profiling value. How you do
this will depend on how your assets are served.

If you're using a server like Express, you'll be able to use the response.set function to set the header value.
`,
{}
)}
</p>
<TabbedCodeSnippet
tabs={[
{
code: `response.set('Document-Policy', 'js-profiling')`,
language: 'javascript',
value: 'javascript',
label: 'Express',
},
]}
/>
</Fragment>
),
};
}

export function MaybeBrowserProfilingBetaWarning(
props: DocsParams<any>
): React.ReactElement | null {
if (!props.isProfilingSelected) {
return null;
}

return (
<p>
{tct(
`Browser profiling is currently in Beta as we wait for the JS Self Profiling spec to gain wider support. You can read the detailed explanation [explainer].`,
{
explainer: (
<a href="https://docs.sentry.io/platforms/javascript/profiling/">
{t('here')}
</a>
),
}
)}
</p>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ export function useLoadGettingStarted({
);

const projectKeys = useProjectKeys({orgSlug, projSlug});

const platformPath = getPlatformPath(platform);

useEffect(() => {
async function getGettingStartedDoc() {
if (
!platformPath ||
(productType === 'replay' && !replayPlatforms.includes(platform.id)) ||
(productType === 'feedback' && !feedbackOnboardingPlatforms.includes(platform.id))
) {
Expand Down
118 changes: 0 additions & 118 deletions static/app/components/profiling/ProfilingOnboarding/util.ts

This file was deleted.

Loading
Loading