godot.tsx 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import ExternalLink from 'sentry/components/links/externalLink';
  2. import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/step';
  3. import type {
  4. Docs,
  5. OnboardingConfig,
  6. } from 'sentry/components/onboarding/gettingStartedDoc/types';
  7. import {tct} from 'sentry/locale';
  8. const getVerifySnippet = () => `
  9. extends Node
  10. func _ready():
  11. SentrySDK.add_breadcrumb("Just about to welcome the World.", "Note")
  12. SentrySDK.capture_message("Hello, World!")
  13. `;
  14. const onboarding: OnboardingConfig = {
  15. install: () => [
  16. {
  17. type: StepType.INSTALL,
  18. description: tct(
  19. "To get started, download the latest release of sentry Godot GDExtension from [releasesLink: GitHub Releases page] and place the Sentry SDK addon in [code: addons/sentry] in your project's directory.",
  20. {
  21. releasesLink: (
  22. <ExternalLink href="https://github.com/getsentry/sentry-godot/releases" />
  23. ),
  24. code: <code />,
  25. }
  26. ),
  27. },
  28. ],
  29. configure: params => [
  30. {
  31. type: StepType.CONFIGURE,
  32. description: (
  33. <p>
  34. {tct(
  35. 'Sentry can be configured via Project Settings or with a [link: Configuration Script]. To access project settings in Godot Engine, navigate to [code:Project > Project Settings > Sentry] section, and enter the DSN for the [code:Dsn] option.',
  36. {
  37. code: <code />,
  38. link: (
  39. <ExternalLink href="https://docs.sentry.io/platforms/godot/configuration/options/" />
  40. ),
  41. }
  42. )}
  43. </p>
  44. ),
  45. configurations: [{language: 'url', code: params.dsn.public}],
  46. },
  47. ],
  48. verify: () => [
  49. {
  50. type: StepType.VERIFY,
  51. description: tct(
  52. 'Once the SDK is configured with the DSN you can add a [code:Node] to your test scene and attach a script with the following content',
  53. {
  54. code: <code />,
  55. }
  56. ),
  57. configurations: [{language: 'gdscript', code: getVerifySnippet()}],
  58. additionalInfo: tct(
  59. 'Check the [godotSDKDocumentationLink:Godot SDK Documentation] for more details.',
  60. {
  61. godotSDKDocumentationLink: (
  62. <ExternalLink href="https://docs.sentry.io/platforms/godot/" />
  63. ),
  64. }
  65. ),
  66. },
  67. ],
  68. };
  69. const docs: Docs = {onboarding};
  70. export default docs;