|
@@ -6,6 +6,13 @@ import {ModuleProps} from 'sentry/components/onboarding/gettingStartedDoc/sdkDoc
|
|
|
import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/step';
|
|
|
import {t, tct} from 'sentry/locale';
|
|
|
|
|
|
+interface StepProps {
|
|
|
+ dsn: string;
|
|
|
+ organizationSlug?: string;
|
|
|
+ projectSlug?: string;
|
|
|
+ sourcePackageRegistries?: ModuleProps['sourcePackageRegistries'];
|
|
|
+}
|
|
|
+
|
|
|
// Configuration Start
|
|
|
const introduction = (
|
|
|
<p>
|
|
@@ -22,9 +29,9 @@ const introduction = (
|
|
|
export const steps = ({
|
|
|
dsn,
|
|
|
sourcePackageRegistries,
|
|
|
-}: Partial<
|
|
|
- Pick<ModuleProps, 'dsn' | 'sourcePackageRegistries'>
|
|
|
-> = {}): LayoutProps['steps'] => [
|
|
|
+ projectSlug,
|
|
|
+ organizationSlug,
|
|
|
+}: StepProps): LayoutProps['steps'] => [
|
|
|
{
|
|
|
type: StepType.INSTALL,
|
|
|
description: t('Install the SDK via Gradle, Maven, or SBT:'),
|
|
@@ -86,8 +93,8 @@ sentry {
|
|
|
// code as part of your stack traces in Sentry.
|
|
|
includeSourceContext = true
|
|
|
|
|
|
- org = "___ORG_SLUG___"
|
|
|
- projectName = "___PROJECT_SLUG___"
|
|
|
+ org = "${organizationSlug}"
|
|
|
+ projectName = "${projectSlug}"
|
|
|
authToken = "your-sentry-auth-token"
|
|
|
}
|
|
|
`,
|
|
@@ -143,9 +150,9 @@ sentry {
|
|
|
<!-- minimum required version is 2.17.3 -->
|
|
|
<sentryCliExecutablePath>/path/to/sentry-cli</sentryCliExecutablePath>
|
|
|
|
|
|
- <org>___ORG_SLUG___</org>
|
|
|
+ <org>${organizationSlug}</org>
|
|
|
|
|
|
- <project>___PROJECT_SLUG___</project>
|
|
|
+ <project>${projectSlug}</project>
|
|
|
|
|
|
<!-- in case you're self hosting, provide the URL here -->
|
|
|
<!--<url>http://localhost:8000/</url>-->
|
|
@@ -306,11 +313,18 @@ transaction.finish();
|
|
|
export function GettingStartedWithJava({
|
|
|
dsn,
|
|
|
sourcePackageRegistries,
|
|
|
+ projectSlug,
|
|
|
+ organization,
|
|
|
...props
|
|
|
}: ModuleProps) {
|
|
|
return (
|
|
|
<Layout
|
|
|
- steps={steps({dsn, sourcePackageRegistries})}
|
|
|
+ steps={steps({
|
|
|
+ dsn,
|
|
|
+ sourcePackageRegistries,
|
|
|
+ projectSlug: projectSlug ?? '___PROJECT_SLUG___',
|
|
|
+ organizationSlug: organization?.slug ?? '___ORG_SLUG___',
|
|
|
+ })}
|
|
|
introduction={introduction}
|
|
|
{...props}
|
|
|
/>
|