Skip to content

Commit c6104ea

Browse files
feat: Add PlayStation getting started doc
1 parent 17e897b commit c6104ea

File tree

3 files changed

+189
-0
lines changed

3 files changed

+189
-0
lines changed

static/app/components/onboarding/gettingStartedDoc/contentBlocks/defaultRenderers.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ function AlertBlock({
2828
showIcon,
2929
system,
3030
trailingItems,
31+
icon,
3132
}: Extract<ContentBlock, {type: 'alert'}>) {
3233
return (
3334
<div css={baseBlockStyles}>
@@ -36,6 +37,7 @@ function AlertBlock({
3637
showIcon={showIcon}
3738
system={system}
3839
trailingItems={trailingItems}
40+
icon={icon}
3941
>
4042
{text}
4143
</Alert>
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
import {Button} from 'sentry/components/core/button';
2+
import {ExternalLink} from 'sentry/components/core/link';
3+
import List from 'sentry/components/list';
4+
import ListItem from 'sentry/components/list/listItem';
5+
import {
6+
type Docs,
7+
type OnboardingConfig,
8+
StepType,
9+
} from 'sentry/components/onboarding/gettingStartedDoc/types';
10+
import {IconLock} from 'sentry/icons/iconLock';
11+
import {t, tct} from 'sentry/locale';
12+
13+
const onboarding: OnboardingConfig = {
14+
install: () => [
15+
{
16+
type: StepType.INSTALL,
17+
content: [
18+
{
19+
type: 'text',
20+
text: tct(
21+
'Our [sentryPlayStationLink:Sentry PlayStation SDK] extends the core [sentryNativeLink:sentry-native] library with PlayStation-specific implementations and is designed to work across standalone engines, Unreal Engine, and Unity.',
22+
{
23+
code: <code />,
24+
sentryPlayStationLink: (
25+
<ExternalLink href="https://github.com/getsentry/sentry-playstation" />
26+
),
27+
sentryNativeLink: (
28+
<ExternalLink href="https://github.com/getsentry/sentry-native" />
29+
),
30+
}
31+
),
32+
},
33+
{
34+
type: 'alert',
35+
alertType: 'warning',
36+
icon: <IconLock size="sm" locked />,
37+
text: tct(
38+
'[strong:Access Restricted]. The PlayStation SDK is distributed through a private repository under NDA.',
39+
{
40+
strong: <strong />,
41+
}
42+
),
43+
showIcon: true,
44+
trailingItems: (
45+
<Button size="sm" priority="primary">
46+
{t('Request Access')}
47+
</Button>
48+
),
49+
},
50+
{
51+
type: 'text',
52+
text: t(
53+
'Once you have access, the private repository contains complete instructions for building and integrating the SDK with your engine of choice.'
54+
),
55+
},
56+
],
57+
},
58+
],
59+
configure: params => [
60+
{
61+
type: StepType.CONFIGURE,
62+
content: [
63+
{
64+
type: 'text',
65+
text: t(
66+
'The SDK supports multiple integration paths depending on your engine:'
67+
),
68+
},
69+
{
70+
type: 'custom',
71+
content: (
72+
<List symbol="bullet">
73+
<ListItem>
74+
{tct(
75+
'[strong:Standalone] - engine agostic, pure sentry-native to be used, for example, on proprietary game engines',
76+
{strong: <strong />}
77+
)}
78+
</ListItem>
79+
<ListItem>
80+
{tct(
81+
'[strong:Unreal Engine] - as the extension to [sentryUnrealLink:sentry-unreal] on ps5',
82+
{
83+
strong: <strong />,
84+
sentryUnrealLink: (
85+
<ExternalLink href="https://github.com/getsentry/sentry-unreal" />
86+
),
87+
}
88+
)}
89+
</ListItem>
90+
<ListItem>
91+
{tct(
92+
'[strong:Unity] - as the extension to [sentryUnityLink:sentry-unity] on ps5',
93+
{
94+
strong: <strong />,
95+
sentryUnityLink: (
96+
<ExternalLink href="https://github.com/getsentry/sentry-unity" />
97+
),
98+
}
99+
)}
100+
</ListItem>
101+
</List>
102+
),
103+
},
104+
{
105+
type: 'text',
106+
text: t(
107+
'Please follow the PlayStation-specific integration instructions for your engine in the private repository.'
108+
),
109+
},
110+
{
111+
type: 'text',
112+
text: t(
113+
"Here's a minimal example of initializing the SDK in a standalone setup:"
114+
),
115+
},
116+
{
117+
type: 'code',
118+
language: 'c',
119+
code: `
120+
#include <sentry.h>
121+
122+
int main(void) {
123+
sentry_options_t *options = sentry_options_new();
124+
sentry_options_set_dsn(options, "${params.dsn.public}");
125+
// This is also the default-path. For further information and recommendations:
126+
// https://docs.sentry.io/platforms/native/configuration/options/#database-path
127+
sentry_options_set_database_path(options, ".sentry-native");
128+
sentry_options_set_release(options, "my-project-name@2.3.12");
129+
sentry_options_set_debug(options, 1);
130+
sentry_init(options);
131+
132+
/* ... */
133+
134+
// make sure everything flushes
135+
sentry_close();
136+
}`,
137+
},
138+
],
139+
},
140+
],
141+
verify: () => [
142+
{
143+
type: StepType.VERIFY,
144+
content: [
145+
{
146+
type: 'text',
147+
text: t(
148+
'Once integrated, verify that your Sentry integration is working correctly by sending a test event:'
149+
),
150+
},
151+
{
152+
type: 'code',
153+
language: 'c',
154+
code: `
155+
sentry_capture_event(sentry_value_new_message_event(
156+
/* level */ SENTRY_LEVEL_INFO,
157+
/* logger */ "custom",
158+
/* message */ "It works!"
159+
));`,
160+
},
161+
{
162+
type: 'text',
163+
text: tct(
164+
"Alternatively, if you're using [code:Unreal] or [code:Unity], refer to the engine-specific PlayStation instructions in the [privateRepositoryLink:private repository] for details on how to trigger and verify events",
165+
{
166+
code: <code />,
167+
privateRepositoryLink: (
168+
<ExternalLink href="https://github.com/getsentry/sentry-playstation" />
169+
),
170+
}
171+
),
172+
},
173+
],
174+
},
175+
],
176+
};
177+
178+
const docs: Docs = {
179+
onboarding,
180+
};
181+
182+
export default docs;

static/app/utils/gettingStartedDocs/getPlatformPath.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import type {PlatformIntegration} from 'sentry/types/project';
22

33
export function getPlatformPath(platform: PlatformIntegration) {
4+
// handle console platforms (xbox, playstation, nintendo-switch, etc.)
5+
if (platform.type === 'console') {
6+
return `console/${platform.id}`;
7+
}
8+
49
// some platforms use a naming convention that combines 'language' and 'id' with a hyphen in between. For example, 'react-native'.
510
if (platform.id === platform.language) {
611
return `${platform.language}/${platform.language}`;

0 commit comments

Comments
 (0)