Skip to content

Commit f82fc06

Browse files
authored
feat(onboarding-docs): Updated Onboarding Docs for Maven Plugin (#58818)
Updates Onboarding Docs for Kotlin/Java to use sentry-maven-plugin.
1 parent 2c57b8a commit f82fc06

File tree

8 files changed

+557
-638
lines changed

8 files changed

+557
-638
lines changed

static/app/gettingStartedDocs/java/java.tsx

Lines changed: 33 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -143,75 +143,63 @@ sentry {
143143
...(packageManager === PackageManager.MAVEN
144144
? [
145145
{
146+
language: 'xml',
147+
partialLoading: sourcePackageRegistries?.isLoading,
146148
description: (
147149
<p>
148-
{tct('Add the Sentry SDK to your [code:pom.xml] file:', {
149-
code: <code />,
150-
})}
150+
{tct(
151+
'The [link:Sentry Maven Plugin] automatically installs the Sentry SDK as well as available integrations for your dependencies. Add the following to your [code:pom.xml] file:',
152+
{
153+
code: <code />,
154+
link: (
155+
<ExternalLink href="https://github.com/getsentry/sentry-maven-plugin" />
156+
),
157+
}
158+
)}
151159
</p>
152160
),
153-
configurations: [
154-
{
155-
language: 'xml',
156-
partialLoading: sourcePackageRegistries?.isLoading,
157-
code: `
158-
<dependency>
159-
<groupId>io.sentry</groupId>
160-
<artifactId>sentry</artifactId>
161-
<version>${
162-
sourcePackageRegistries?.isLoading
163-
? t('\u2026loading')
164-
: sourcePackageRegistries?.data?.['sentry.java']?.version ?? '6.27.0'
165-
}</version>
166-
</dependency>
167-
`,
168-
},
169-
{
170-
language: 'xml',
171-
partialLoading: sourcePackageRegistries?.isLoading,
172-
description: t(
173-
'To upload your source code to Sentry so it can be shown in stack traces, use our Maven plugin.'
174-
),
175-
code: `
176-
<build>
161+
code: `<build>
177162
<plugins>
178163
<plugin>
179164
<groupId>io.sentry</groupId>
180165
<artifactId>sentry-maven-plugin</artifactId>
181166
<version>${
182167
sourcePackageRegistries?.isLoading
183168
? t('\u2026loading')
184-
: sourcePackageRegistries?.data?.['sentry.java.mavenplugin']?.version ?? '0.0.4'
169+
: sourcePackageRegistries?.data?.['sentry.java.maven-plugin']?.version ??
170+
'0.0.4'
185171
}</version>
172+
<extensions>true</extensions>
186173
<configuration>
187-
<!-- for showing output of sentry-cli -->
188-
<debugSentryCli>true</debugSentryCli>
174+
<!-- for showing output of sentry-cli -->
175+
<debugSentryCli>true</debugSentryCli>
189176
190-
<org>${organizationSlug}</org>
177+
<org>${organizationSlug}</org>
191178
192-
<project>${projectSlug}</project>
179+
<project>${projectSlug}</project>
193180
194-
<!-- in case you're self hosting, provide the URL here -->
195-
<!--<url>http://localhost:8000/</url>-->
181+
<!-- in case you're self hosting, provide the URL here -->
182+
<!--<url>http://localhost:8000/</url>-->
196183
197-
<!-- provide your auth token via SENTRY_AUTH_TOKEN environment variable -->
198-
<authToken>\${env.SENTRY_AUTH_TOKEN}</authToken>
184+
<!-- provide your auth token via SENTRY_AUTH_TOKEN environment variable -->
185+
<authToken>\${env.SENTRY_AUTH_TOKEN}</authToken>
199186
</configuration>
200187
<executions>
201188
<execution>
202-
<phase>generate-resources</phase>
203-
<goals>
204-
<goal>uploadSourceBundle</goal>
205-
</goals>
189+
<goals>
190+
<!--
191+
Generates a JVM (Java, Kotlin, etc.) source bundle and uploads your source code to Sentry.
192+
This enables source context, allowing you to see your source
193+
code as part of your stack traces in Sentry.
194+
-->
195+
<goal>uploadSourceBundle</goal>
196+
</goals>
206197
</execution>
207198
</executions>
208199
</plugin>
209200
</plugins>
210-
...
211-
</build>
212-
`,
213-
},
214-
],
201+
...
202+
</build>`,
215203
},
216204
]
217205
: []),

static/app/gettingStartedDocs/java/log4j2.tsx

Lines changed: 43 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -136,67 +136,77 @@ sentry {
136136
{
137137
language: 'xml',
138138
partialLoading: sourcePackageRegistries?.isLoading,
139-
description: t("Add the Sentry SDK to your project's dependencies"),
140-
code: `
141-
<dependency>
142-
<groupId>io.sentry</groupId>
143-
<artifactId>sentry-log4j2</artifactId>
144-
<version>${
145-
sourcePackageRegistries?.isLoading
146-
? t('\u2026loading')
147-
: sourcePackageRegistries?.data?.['sentry.java.log4j2']?.version ?? '6.27.0'
148-
}</version>
149-
</dependency>
150-
`,
151-
},
152-
{
153-
language: 'xml',
154-
partialLoading: sourcePackageRegistries?.isLoading,
155-
description: t(
156-
'To upload your source code to Sentry so it can be shown in stack traces, use our Maven plugin.'
139+
description: (
140+
<p>
141+
{tct(
142+
'The [link:Sentry Maven Plugin] automatically installs the Sentry SDK as well as available integrations for your dependencies. Add the following to your [code:pom.xml] file:',
143+
{
144+
code: <code />,
145+
link: (
146+
<ExternalLink href="https://github.com/getsentry/sentry-maven-plugin" />
147+
),
148+
}
149+
)}
150+
</p>
157151
),
158-
code: `
159-
<build>
152+
code: `<build>
160153
<plugins>
161154
<plugin>
162155
<groupId>io.sentry</groupId>
163156
<artifactId>sentry-maven-plugin</artifactId>
164157
<version>${
165158
sourcePackageRegistries?.isLoading
166159
? t('\u2026loading')
167-
: sourcePackageRegistries?.data?.['sentry.java.mavenplugin']?.version ?? '0.0.4'
160+
: sourcePackageRegistries?.data?.['sentry.java.maven-plugin']?.version ??
161+
'0.0.4'
168162
}</version>
163+
<extensions>true</extensions>
169164
<configuration>
170-
<!-- for showing output of sentry-cli -->
171-
<debugSentryCli>true</debugSentryCli>
165+
<!-- for showing output of sentry-cli -->
166+
<debugSentryCli>true</debugSentryCli>
172167

173-
<org>${organizationSlug}</org>
168+
<org>${organizationSlug}</org>
174169

175-
<project>${projectSlug}</project>
170+
<project>${projectSlug}</project>
176171

177-
<!-- in case you're self hosting, provide the URL here -->
178-
<!--<url>http://localhost:8000/</url>-->
172+
<!-- in case you're self hosting, provide the URL here -->
173+
<!--<url>http://localhost:8000/</url>-->
179174

180-
<!-- provide your auth token via SENTRY_AUTH_TOKEN environment variable -->
181-
<authToken>\${env.SENTRY_AUTH_TOKEN}</authToken>
175+
<!-- provide your auth token via SENTRY_AUTH_TOKEN environment variable -->
176+
<authToken>\${env.SENTRY_AUTH_TOKEN}</authToken>
182177
</configuration>
183178
<executions>
184179
<execution>
185-
<phase>generate-resources</phase>
186180
<goals>
187-
<goal>uploadSourceBundle</goal>
181+
<!--
182+
Generates a JVM (Java, Kotlin, etc.) source bundle and uploads your source code to Sentry.
183+
This enables source context, allowing you to see your source
184+
code as part of your stack traces in Sentry.
185+
-->
186+
<goal>uploadSourceBundle</goal>
188187
</goals>
189188
</execution>
190189
</executions>
191190
</plugin>
192191
</plugins>
193192
...
194-
</build>
195-
`,
193+
</build>`,
196194
},
197195
]
198196
: []),
199197
],
198+
additionalInfo: (
199+
<p>
200+
{tct(
201+
'If you prefer to manually upload your source code to Sentry, please refer to [link:Manually Uploading Source Context].',
202+
{
203+
link: (
204+
<ExternalLink href="https://docs.sentry.io/platforms/java/source-context/#manually-uploading-source-context" />
205+
),
206+
}
207+
)}
208+
</p>
209+
),
200210
},
201211
{
202212
type: StepType.CONFIGURE,

static/app/gettingStartedDocs/java/logback.tsx

Lines changed: 43 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -134,67 +134,77 @@ sentry {
134134
{
135135
language: 'xml',
136136
partialLoading: sourcePackageRegistries?.isLoading,
137-
description: t("Add the Sentry SDK to your project's dependencies"),
138-
code: `
139-
<dependency>
140-
<groupId>io.sentry</groupId>
141-
<artifactId>sentry-log4j2</artifactId>
142-
<version>${
143-
sourcePackageRegistries?.isLoading
144-
? t('\u2026loading')
145-
: sourcePackageRegistries?.data?.['sentry.java.log4j2']?.version ?? '6.27.0'
146-
}</version>
147-
</dependency>
148-
`,
149-
},
150-
{
151-
language: 'xml',
152-
partialLoading: sourcePackageRegistries?.isLoading,
153-
description: t(
154-
'To upload your source code to Sentry so it can be shown in stack traces, use our Maven plugin.'
137+
description: (
138+
<p>
139+
{tct(
140+
'The [link:Sentry Maven Plugin] automatically installs the Sentry SDK as well as available integrations for your dependencies. Add the following to your [code:pom.xml] file:',
141+
{
142+
code: <code />,
143+
link: (
144+
<ExternalLink href="https://github.com/getsentry/sentry-maven-plugin" />
145+
),
146+
}
147+
)}
148+
</p>
155149
),
156-
code: `
157-
<build>
150+
code: `<build>
158151
<plugins>
159152
<plugin>
160153
<groupId>io.sentry</groupId>
161154
<artifactId>sentry-maven-plugin</artifactId>
162155
<version>${
163156
sourcePackageRegistries?.isLoading
164157
? t('\u2026loading')
165-
: sourcePackageRegistries?.data?.['sentry.java.mavenplugin']?.version ?? '0.0.4'
158+
: sourcePackageRegistries?.data?.['sentry.java.maven-plugin']?.version ??
159+
'0.0.4'
166160
}</version>
161+
<extensions>true</extensions>
167162
<configuration>
168-
<!-- for showing output of sentry-cli -->
169-
<debugSentryCli>true</debugSentryCli>
163+
<!-- for showing output of sentry-cli -->
164+
<debugSentryCli>true</debugSentryCli>
170165
171-
<org>${organizationSlug}</org>
166+
<org>${organizationSlug}</org>
172167
173-
<project>${projectSlug}</project>
168+
<project>${projectSlug}</project>
174169
175-
<!-- in case you're self hosting, provide the URL here -->
176-
<!--<url>http://localhost:8000/</url>-->
170+
<!-- in case you're self hosting, provide the URL here -->
171+
<!--<url>http://localhost:8000/</url>-->
177172
178-
<!-- provide your auth token via SENTRY_AUTH_TOKEN environment variable -->
179-
<authToken>\${env.SENTRY_AUTH_TOKEN}</authToken>
173+
<!-- provide your auth token via SENTRY_AUTH_TOKEN environment variable -->
174+
<authToken>\${env.SENTRY_AUTH_TOKEN}</authToken>
180175
</configuration>
181176
<executions>
182177
<execution>
183-
<phase>generate-resources</phase>
184178
<goals>
185-
<goal>uploadSourceBundle</goal>
179+
<!--
180+
Generates a JVM (Java, Kotlin, etc.) source bundle and uploads your source code to Sentry.
181+
This enables source context, allowing you to see your source
182+
code as part of your stack traces in Sentry.
183+
-->
184+
<goal>uploadSourceBundle</goal>
186185
</goals>
187186
</execution>
188187
</executions>
189188
</plugin>
190189
</plugins>
191190
...
192-
</build>
193-
`,
191+
</build>`,
194192
},
195193
]
196194
: []),
197195
],
196+
additionalInfo: (
197+
<p>
198+
{tct(
199+
'If you prefer to manually upload your source code to Sentry, please refer to [link:Manually Uploading Source Context].',
200+
{
201+
link: (
202+
<ExternalLink href="https://docs.sentry.io/platforms/java/source-context/#manually-uploading-source-context" />
203+
),
204+
}
205+
)}
206+
</p>
207+
),
198208
},
199209
{
200210
type: StepType.CONFIGURE,

0 commit comments

Comments
 (0)