Skip to content

Conversation

@adinauer
Copy link
Member

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@adinauer adinauer requested a review from a team as a code owner January 19, 2026 09:43
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jan 19, 2026
],
});

export const metrics = <
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the java platforms (java, java-log4j, java-spring, etc) are missing in the withMetricsOnboarding Set in platformCategories.tsx.

Then it shows up in Explore > Metrics.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is changed in #106513

Copy link
Contributor

@lbloder lbloder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

)

<!-- Describe your PR here. -->

<!--

  Sentry employees and contractors can delete or ignore the following.

-->

### Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.

---------

Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment on lines +132 to 142
ProductSolution.LOGS,
ProductSolution.METRICS,
],
'java-spring-boot': [
ProductSolution.PERFORMANCE_MONITORING,
ProductSolution.LOGS,
ProductSolution.METRICS,
],
javascript: [
ProductSolution.PERFORMANCE_MONITORING,
ProductSolution.SESSION_REPLAY,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The 'android' platform is missing from the platformProductAvailability object, which will prevent the product selection UI from rendering during onboarding for Android projects.
Severity: MEDIUM

Suggested Fix

Add an entry for the 'android' platform to the platformProductAvailability object in static/app/components/onboarding/productSelection.tsx, similar to the other platforms. This entry should list the available products for Android, such as profiling, replay, and metrics.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: static/app/components/onboarding/productSelection.tsx#L112-L142

Potential issue: The 'android' platform is missing from the
`platformProductAvailability` object in `productSelection.tsx`. While the PR adds
metrics onboarding documentation for Android, this omission will cause the
`ProductSelection` component to look up `platformProductAvailability['android']`,
receive `undefined`, and consequently return `null`. This prevents users from seeing or
selecting any products (like Metrics, Logs, or Replay) during the onboarding flow for a
new Android project, making the feature incomplete for this platform.

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Product selection is not available on Android platforms. Instead, we offer a command-line wizard or a link to the documentation for manual instrumentation.

Comment on lines +132 to 142
ProductSolution.LOGS,
ProductSolution.METRICS,
],
'java-spring-boot': [
ProductSolution.PERFORMANCE_MONITORING,
ProductSolution.LOGS,
ProductSolution.METRICS,
],
javascript: [
ProductSolution.PERFORMANCE_MONITORING,
ProductSolution.SESSION_REPLAY,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Product selection is not available on Android platforms. Instead, we offer a command-line wizard or a link to the documentation for manual instrumentation.


export const limitedMetricsSupportPrefixes: Set<string> = new Set([
'android',
'java',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we listing only java because it serves as a prefix for java-logback, java-log4j2, java-spring, and java-spring-boot?

Comment on lines +79 to +89
text: tct(
"To start using metrics, make sure your Sentry Android SDK version is [code] or higher. If you're on an older version of the SDK, follow our [link:migration guide] to upgrade.",
{
code: (
<code>{getPackageVersion(params, 'sentry.java.android', '8.30.0')}</code>
),
link: (
<ExternalLink href="https://docs.sentry.io/platforms/android/migration/" />
),
}
),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
text: tct(
"To start using metrics, make sure your Sentry Android SDK version is [code] or higher. If you're on an older version of the SDK, follow our [link:migration guide] to upgrade.",
{
code: (
<code>{getPackageVersion(params, 'sentry.java.android', '8.30.0')}</code>
),
link: (
<ExternalLink href="https://docs.sentry.io/platforms/android/migration/" />
),
}
),
text: tct(
"To start using metrics, make sure your Sentry Android SDK version is [version] or higher. If you're on an older version of the SDK, follow our [link:migration guide] to upgrade.",
{
version: (
<code>{getPackageVersion(params, 'sentry.java.android', '8.30.0')}</code>
),
link: (
<ExternalLink href="https://docs.sentry.io/platforms/android/migration/" />
),
}
),

Comment on lines +38 to +68
export const metricsVerify = <
PlatformOptions extends BasePlatformOptions = BasePlatformOptions,
>(
params: DocsParams<PlatformOptions>
): ContentBlock => ({
type: 'conditional',
condition: params.isMetricsSelected,
content: [
{
type: 'text',
text: t(
'Send test metrics from your app to verify metrics are arriving in Sentry.'
),
},
{
type: 'code',
tabs: [
{
label: 'Java',
language: 'java',
code: getMetricsVerifyJavaSnippet(),
},
{
label: 'Kotlin',
language: 'kotlin',
code: getMetricsVerifyKotlinSnippet(),
},
],
},
],
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears that this function is not used anywhere. Knip may be failing in this PR, though I haven’t confirmed yet.

${getMetricsCodeJava()}`;

export const getMetricsVerifyKotlinSnippet = () => `import io.sentry.Sentry
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is only being used in the metricsVerify which is not used anywhere. we should do a cleanup in this file.

{
type: 'text',
text: tct(
"To start using metrics, make sure your Sentry Java SDK version is [code:8.30.0] or higher. If you're on an older version of the SDK, follow our [link:migration guide] to upgrade.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should we say version here?

Comment on lines +72 to +74
docsPlatform,
}: {
docsPlatform: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe java can be the default? or do we want to force developers to always inform the platform?

replayOnboardingJsLoader,
feedbackOnboardingJsLoader,
logsOnboarding: logs,
metricsOnboarding: metrics({docsPlatform: 'spring'}),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on what I observed, if we remove the java- prefix, the names are identical. I propose we avoid making the metrics a function and instead use something like params.platformKey.split('java-')[1] directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants