Skip to content

Commit

Permalink
Merge branch 'master' into ogi/feat/on-demand-alerts-chart-fe
Browse files Browse the repository at this point in the history
  • Loading branch information
obostjancic authored Jul 17, 2023
2 parents f167c5f + 56c072f commit 17d68f7
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const migratedDocs = [
'php-laravel',
'go',
'rust',
'minidump',
'native',
'native-qt',
];
Expand Down Expand Up @@ -59,7 +60,9 @@ export function SdkDocumentation({

const platformPath =
platform?.type === 'framework'
? platform?.id === 'native-qt'
? platform.language === 'minidump'
? `minidump/minidump`
: platform?.id === 'native-qt'
? `native/native-qt`
: platform?.id.replace(`${platform.language}-`, `${platform.language}/`)
: `${platform?.language}/${platform?.id}`;
Expand Down
20 changes: 20 additions & 0 deletions static/app/gettingStartedDocs/minidump/minidump.spec.tsx
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();
});
});
83 changes: 83 additions & 0 deletions static/app/gettingStartedDocs/minidump/minidump.tsx
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;

0 comments on commit 17d68f7

Please sign in to comment.