Skip to content

Conversation

@ArthurKnaus
Copy link
Member

Add first POC of a detector for Autopilot, that detects outdated SDKs.
This version simply emits metrics for checking the system's behavior.

@ArthurKnaus ArthurKnaus requested a review from a team December 22, 2025 14:33
@ArthurKnaus ArthurKnaus requested a review from a team as a code owner December 22, 2025 14:33
@linear
Copy link

linear bot commented Dec 22, 2025

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Dec 22, 2025

updates_list = [update for update in updates_list if len(update["suggestions"]) > 0]

logger.warning("updates_list: %s", updates_list)
Copy link
Contributor

Choose a reason for hiding this comment

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

Debug logging using WARNING level in production task

The logger.warning("updates_list: %s", updates_list) statement logs the entire updates list at WARNING level. This appears to be debug/diagnostic code that is inappropriate for production. WARNING level logs are typically monitored and may trigger alerts. Since this task runs every 5 minutes for all allowlisted organizations, this will generate significant log volume with potentially large data structures containing SDK names, versions, and project IDs. Consider using logger.debug or logger.info instead, or removing it if the metrics call on the next line provides sufficient observability.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

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

info logs are filtered out. for version, we want it to be visible

@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

❌ Patch coverage is 80.00000% with 10 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/autopilot/tasks.py 79.16% 10 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #105384      +/-   ##
===========================================
+ Coverage   80.24%    80.57%   +0.33%     
===========================================
  Files        9433      9440       +7     
  Lines      404618    404711      +93     
  Branches    25680     25680              
===========================================
+ Hits       324668    326087    +1419     
+ Misses      79481     78155    -1326     
  Partials      469       469              

sorted(sdks_used, key=lambda x: x["sdk.name"]), key=lambda x: x["sdk.name"]
)
]
for project_id, sdks_used in groupby(nonempty_sdks, key=lambda x: x["project.id"])

This comment was marked as outdated.

@ArthurKnaus ArthurKnaus enabled auto-merge (squash) December 22, 2025 15:30
@ArthurKnaus ArthurKnaus merged commit b51099b into master Dec 22, 2025
67 checks passed
@ArthurKnaus ArthurKnaus deleted the aknaus/feat/autopilot/sdk-update-detector-logging branch December 22, 2025 15:34
@github-actions github-actions bot locked and limited conversation to collaborators Jan 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants