feat: include Python version in metrics uploads - #9973
Merged
Conversation
Contributor
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. If the version is collected or interpreted incorrectly, the metrics service will receive an inaccurate or unnecessarily disclosed Python version. Reverting stops future uploads, but values already sent remain in the metrics data and would need bounded cleanup or filtering if that mattered.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
astrbot-docs | 22bbcac | Commit Preview URL Branch Preview URL |
Sep 07 2026, 02:31 PM |
BegoniaHe
pushed a commit
to Xero-Team/AstrBot
that referenced
this pull request
Sep 7, 2026
Add python_version to the telemetry payload alongside os and VERSION. Upstream-Commit: 48d0da7 Upstream-Author: Soulter <37870767+Soulter@users.noreply.github.com> Upstream-PR: AstrBotDevs#9973 Sync-Disposition: adapt Fork-Adaptation: Patch MetricsRuntime._post_metrics instead of the removed Metric class. Tested: uv run pytest tests/unit/test_metrics.py -q AI-Generated: true Generated-At: 2026-09-07T17:03:57Z
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Metrics uploads currently include the AstrBot version and operating system but omit the Python runtime version. Add
python_versionusingplatform.python_version()so runtime usage can be measured.Closes #9960.
Modifications
3.12.12) in the shared metrics payload for both immediate and batched uploads.Verification Steps and Test Results
uv run --no-sync ruff format .: 504 files unchanged.uv run --no-sync ruff check .: all checks passed.git diff --check: passed.Checklist
Summary by Sourcery
New Features: