-
-
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.
Merge branch 'master' into ogi/feat/on-demand-alerts-chart-fe
- Loading branch information
Showing
3 changed files
with
107 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import {render, screen} from 'sentry-test/reactTestingLibrary'; | ||
|
||
import {StepTitle} from 'sentry/components/onboarding/gettingStartedDoc/step'; | ||
|
||
import {GettingStartedWithMinidump, steps} from './minidump'; | ||
|
||
describe('GettingStartedWithMinidump', function () { | ||
it('renders doc correctly', function () { | ||
const {container} = render(<GettingStartedWithMinidump dsn="test-dsn" />); | ||
|
||
// Steps | ||
for (const step of steps()) { | ||
expect( | ||
screen.getByRole('heading', {name: step.title ?? StepTitle[step.type]}) | ||
).toBeInTheDocument(); | ||
} | ||
|
||
expect(container).toSnapshot(); | ||
}); | ||
}); |
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,83 @@ | ||
import {Fragment} from 'react'; | ||
|
||
import ExternalLink from 'sentry/components/links/externalLink'; | ||
import List from 'sentry/components/list'; | ||
import ListItem from 'sentry/components/list/listItem'; | ||
import {Layout, LayoutProps} from 'sentry/components/onboarding/gettingStartedDoc/layout'; | ||
import {ModuleProps} from 'sentry/components/onboarding/gettingStartedDoc/sdkDocumentation'; | ||
import {t, tct} from 'sentry/locale'; | ||
|
||
// Configuration Start | ||
export const steps = ({ | ||
dsn, | ||
}: { | ||
dsn?: string; | ||
} = {}): LayoutProps['steps'] => [ | ||
{ | ||
title: t('Creating and Uploading Minidumps'), | ||
description: ( | ||
<Fragment> | ||
{t( | ||
'Depending on your operating system and programming language, there are various alternatives to create minidumps and upload them to Sentry. See the following resources for libraries that support generating minidump crash reports:' | ||
)} | ||
<List symbol="bullet"> | ||
<ListItem> | ||
<ExternalLink href="https://docs.sentry.io/platforms/native/"> | ||
Native SDK | ||
</ExternalLink> | ||
</ListItem> | ||
<ListItem> | ||
<ExternalLink href="https://docs.sentry.io/platforms/native/guides/breakpad/"> | ||
Google Breakpad | ||
</ExternalLink> | ||
</ListItem> | ||
<ListItem> | ||
<ExternalLink href="https://docs.sentry.io/platforms/native/guides/crashpad/"> | ||
Google Crashpad | ||
</ExternalLink> | ||
</ListItem> | ||
</List> | ||
</Fragment> | ||
), | ||
configurations: [ | ||
{ | ||
description: ( | ||
<p> | ||
{tct( | ||
'If you have already integrated a library that generates minidumps and would just like to upload them to Sentry, you need to configure the [italic:Minidump Endpoint URL], which can be found at [italic:Project Settings > Client Keys (DSN)]. This endpoint expects a [code:POST] request with the minidump in the [code:upload_file_minidump] field:', | ||
{ | ||
code: <code />, | ||
italic: <i />, | ||
} | ||
)} | ||
</p> | ||
), | ||
language: 'bash', | ||
code: ` | ||
curl -X POST \ | ||
'${dsn}' \ | ||
-F upload_file_minidump=@mini.dmp | ||
`, | ||
}, | ||
], | ||
additionalInfo: ( | ||
<p> | ||
{tct( | ||
'To send additional information, add more form fields to this request. For a full description of fields accepted by Sentry, see [passingAdditionalDataLink:Passing Additional Data].', | ||
{ | ||
passingAdditionalDataLink: ( | ||
<ExternalLink href="https://docs.sentry.io/platforms/native/guides/minidumps/" /> | ||
), | ||
} | ||
)} | ||
</p> | ||
), | ||
}, | ||
]; | ||
// Configuration End | ||
|
||
export function GettingStartedWithMinidump({dsn, ...props}: ModuleProps) { | ||
return <Layout steps={steps({dsn})} {...props} />; | ||
} | ||
|
||
export default GettingStartedWithMinidump; |