-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(onboarding) add profiling to onboarding docs (#75275)
Add document header onboarding step and enable profiling onboarding for js projects
- Loading branch information
Showing
9 changed files
with
93 additions
and
48 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
static/app/components/onboarding/gettingStartedDoc/utils/profilingOnboarding.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import {Fragment} from 'react'; | ||
|
||
import { | ||
type StepProps, | ||
TabbedCodeSnippet, | ||
} from 'sentry/components/onboarding/gettingStartedDoc/step'; | ||
import {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> | ||
), | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters