feat(agents): Update onboarding to display sdk update alert#107575
Conversation
|
|
||
| import {getPythonInstallCodeBlock} from './utils'; | ||
|
|
||
| const MIN_REQUIRED_VERSION = '2.41.0'; |
There was a problem hiding this comment.
@sentrivana I could find only one instance in the docs (see) about the min required version. Can you please confirm that this is the version we would like to surface for all python platforms?
There was a problem hiding this comment.
This is a bit tricky because the integrations are evolving fast to keep pace with the platforms and changes on our insights pages. So even if we added integration A in version X.Y, you might get a suboptimal experience when using that version because some collected data is not in the place where the insights page wants it to be.
That makes it pretty much impossible to pinpoint the correct min version, so I'd just go with some heuristic and set it to for example 2.43.0 for every AI integration, since that's when the last new integrations were added (MCP and Pydantic AI).
Maybe we can add some sort of notice/sentence that it's always good to be on the latest version of the SDK since these integrations move fast and it can be updated via pip install --upgrade sentry-sdk?
There was a problem hiding this comment.
Thanks for the review @sentrivana 🙏
I understand the issue. I’ve updated the code to use 2.43.0 as the minimum version, since that’s used for the alert to be shown. I also updated the copy to remove the minimum version and instead highlight the latest version, which should always be accurate because we fetch releases from the backend to keep things in sync.
javascript preview:
…nitoring-onboarding-prompting-to-update
There was a problem hiding this comment.
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.
Improve SDK update alert messaging to follow Sentry's Plain Speech
brand guidelines. Remove passive voice ("We've detected") and
marketing language ("for the best experience") in favor of direct,
concise messaging.
Changes:
- Replace "We've detected you're using" with "Your version is"
- Replace "for the best experience" with "or later"
- Remove unnecessary words to make copy more direct
Co-Authored-By: Claude <noreply@anthropic.com>
The agentMonitoring function accepts a minVersion parameter but was not passing it to getInstallStep, causing the install instructions to always show the default minimum version instead of the configured one. Co-Authored-By: Claude <noreply@anthropic.com>
…nitoring-onboarding-prompting-to-update
**Problem (Use Case)** 1. A user already has the Sentry SDK installed in their app. 2. Their SDK version is below the minimum required for Agent Monitoring. 3. The user starts the Agent Monitoring onboarding. 4. They skip the Install step because Sentry is already installed. 5. They miss the minimum SDK version requirement. 6. Agent Monitoring does not work, and the user doesn’t understand why. **Solution** During onboarding, detect that the user’s SDK version is below the minimum required for Agent Monitoring (based on incoming events). Surface a prominent alert informing the user that their SDK version is outdated. Preview: **Notes** - Replacing the Install step with an Update step was considered, but this solution was discarded as we depended on an endpoint to return the information we need (its async). - Depending on the selected integration, such as Anthropic, the UI displays another alert (the blue), which can make the UI feel cluttered.

Problem (Use Case)
Solution
During onboarding, detect that the user’s SDK version is below the minimum required for Agent Monitoring (based on incoming events).
Surface a prominent alert informing the user that their SDK version is outdated. Preview:
Notes
closes https://linear.app/getsentry/issue/TET-1583/ai-onboarding-detect-latest-sdk-version-in-selected-project-and-prompt