Skip to content

Commit 7ab69c4

Browse files
feat: Add Xbox getting started doc (#96300)
1 parent a0f080a commit 7ab69c4

File tree

1 file changed

+142
-0
lines changed
  • static/app/gettingStartedDocs/console

1 file changed

+142
-0
lines changed
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
import {Button} from 'sentry/components/core/button';
2+
import {ExternalLink} from 'sentry/components/core/link';
3+
import {
4+
type Docs,
5+
type OnboardingConfig,
6+
StepType,
7+
} from 'sentry/components/onboarding/gettingStartedDoc/types';
8+
import {IconLock} from 'sentry/icons/iconLock';
9+
import {t, tct} from 'sentry/locale';
10+
11+
const onboarding: OnboardingConfig = {
12+
install: () => [
13+
{
14+
type: StepType.INSTALL,
15+
content: [
16+
{
17+
type: 'text',
18+
text: tct(
19+
'Our [sentryXboxLink:Sentry Xbox SDK] extends the core [sentryNativeLink:sentry-native] library with Xbox-specific implementations for standalone engines and proprietary game engines.',
20+
{
21+
code: <code />,
22+
sentryXboxLink: (
23+
<ExternalLink href="https://github.com/getsentry/sentry-xbox" />
24+
),
25+
sentryNativeLink: (
26+
<ExternalLink href="https://github.com/getsentry/sentry-native" />
27+
),
28+
}
29+
),
30+
},
31+
{
32+
type: 'alert',
33+
alertType: 'warning',
34+
icon: <IconLock size="sm" locked />,
35+
text: tct(
36+
'[strong:Access Restricted]. The Xbox SDK is distributed through a [privateRepositoryLink:private repository] under NDA.',
37+
{
38+
strong: <strong />,
39+
privateRepositoryLink: (
40+
<ExternalLink href="https://github.com/getsentry/sentry-xbox" />
41+
),
42+
}
43+
),
44+
showIcon: true,
45+
trailingItems: (
46+
<Button
47+
size="sm"
48+
priority="primary"
49+
onClick={() => {
50+
// TODO: Add modal
51+
}}
52+
>
53+
{t('Request Access')}
54+
</Button>
55+
),
56+
},
57+
{
58+
type: 'text',
59+
text: t(
60+
'Once the access is granted, you can proceed with the SDK integration.'
61+
),
62+
},
63+
],
64+
},
65+
],
66+
configure: params => [
67+
{
68+
type: StepType.CONFIGURE,
69+
content: [
70+
{
71+
type: 'text',
72+
text: tct(
73+
'The [privateRepositoryLink:private repository] contains complete setup instructions. Here is a basic example of how to initialize the SDK:',
74+
{
75+
privateRepositoryLink: (
76+
<ExternalLink href="https://github.com/getsentry/sentry-xbox" />
77+
),
78+
}
79+
),
80+
},
81+
{
82+
type: 'code',
83+
language: 'c',
84+
code: `
85+
#include <sentry.h>
86+
87+
int main(void) {
88+
sentry_options_t *options = sentry_options_new();
89+
sentry_options_set_dsn(options, "${params.dsn.public}");
90+
91+
// This is also the default path. For further info:
92+
// https://docs.sentry.io/platforms/native/configuration/options/#database-path
93+
sentry_options_set_database_path(options, ".sentry-native");
94+
sentry_options_set_release(options, "my-xbox-game@1.0.0");
95+
sentry_options_set_debug(options, 1);
96+
sentry_init(options);
97+
98+
/* Your game or app code here */
99+
100+
// Ensure all events are flushed before exit
101+
sentry_close();
102+
}`,
103+
},
104+
],
105+
},
106+
],
107+
verify: () => [
108+
{
109+
type: StepType.VERIFY,
110+
content: [
111+
{
112+
type: 'text',
113+
text: t(
114+
'Once integrated, verify that your Sentry integration is working correctly by sending a test event:'
115+
),
116+
},
117+
{
118+
type: 'code',
119+
language: 'c',
120+
code: `
121+
sentry_capture_event(sentry_value_new_message_event(
122+
/* level */ SENTRY_LEVEL_INFO,
123+
/* logger */ "custom",
124+
/* message */ "It works!"
125+
));`,
126+
},
127+
{
128+
type: 'text',
129+
text: t(
130+
'After sending this test event, you should see it appear in your Sentry dashboard, confirming that the Xbox integration is working correctly.'
131+
),
132+
},
133+
],
134+
},
135+
],
136+
};
137+
138+
const docs: Docs = {
139+
onboarding,
140+
};
141+
142+
export default docs;

0 commit comments

Comments
 (0)